Jhipster Error in running server - spring

I am using jhipster-4.5.1 with h2 database, I am getting error in running server after changing the code, but there is no error in codes but only error I am getting in running server when code modifies.it says
2017-06-14 17:43:03.578 WARN 19964 --- [ restartedMain] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'bloodPressureResource' defined in file [/home/rajeev/Devapp_Maven/target/classes/com/devapp/web/rest/BloodPressureResource.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bloodPressureRepository': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Validation failed for query for method public abstract java.util.List com.devapp.repository.BloodPressureRepository.findAllByTimestampBetweenOrderByTimestampDesc(java.time.LocalDate,java.time.LocalDate)!
2017-06-14 17:43:03.916 DEBUG 19964 --- [ restartedMain] c.e.c.Ehcache-com.devapp.domain.Points : Close successful.
2017-06-14 17:43:03.919 DEBUG 19964 --- [ restartedMain] c.e.c.Ehcache-com.devapp.domain.Weight : Close successful.
2017-06-14 17:43:03.921 DEBUG 19964 --- [ restartedMain] c.e.c.E.devapp.domain.BloodPressure : Close successful.
2017-06-14 17:43:03.923 DEBUG 19964 --- [ restartedMain] c.e.c.E.devapp.domain.Preferences : Close successful.
2017-06-14 17:43:03.925 DEBUG 19964 --- [ restartedMain] c.e.c.E.devapp.domain.Authority : Close successful.
2017-06-14 17:43:03.930 DEBUG 19964 --- [ restartedMain] c.e.core.Ehcache-com.devapp.domain.User : Close successful.
2017-06-14 17:43:03.932 DEBUG 19964 --- [ restartedMain] c.e.c.E.devapp.domain.User.authorities : Close successful.
2017-06-14 17:43:03.994 WARN 19964 --- [ restartedMain] o.s.boot.SpringApplication : Error handling failed (Error creating bean with name 'delegatingApplicationListener' defined in class path resource [org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.class]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cache.config.internalCacheAdvisor' defined in class path resource [org/springframework/cache/annotation/ProxyCachingConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cache.interceptor.BeanFactoryCacheOperationSourceAdvisor]: Factory method 'cacheAdvisor' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cacheAutoConfigurationValidator' defined in class path resource [org/springframework/boot/autoconfigure/cache/CacheAutoConfiguration.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'spring.cache-org.springframework.boot.autoconfigure.cache.CacheProperties': Initialization of bean failed; nested exception is java.lang.IllegalStateException: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#60ee6558 has not been refreshed yet)
2017-06-14 17:43:04.016 ERROR 19964 --- [ restartedMain] o.s.boot.SpringApplication : Application startup failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'bloodPressureResource' defined in file [/home/rajeev/Devapp_Maven/target/classes/com/devapp/web/rest/BloodPressureResource.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bloodPressureRepository': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Validation failed for query for method public abstract java.util.List com.devapp.repository.BloodPressureRepository.findAllByTimestampBetweenOrderByTimestampDesc(java.time.LocalDate,java.time.LocalDate)!
Thanks in Advance

Your Query findAllByTimestampBetweenOrderByTimestampDesc within BloodPressureRepository is invalid.
That's what's being told in that error at least:
Validation failed for query for method public abstract java.util.List com.devapp.repository.BloodPressureRepository.findAllByTimestampBetweenOrderByTimestampDesc(java.time.LocalDate,java.time.LocalDate)!

Related

Sailpoint iiq installatin I am facing BeanCreation Exception

WARN main springframework.context.support.ClassPathXmlApplicationContext:551 - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'versionChecker' defined in class path resource [configBeans.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Unable to check IdentityIQ database version: Cannot create JDBC driver of class '' for connect URL 'null'
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'versionChecker' defined in class path resource [configBeans.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Unable to check IdentityIQ database version: Cannot create JDBC driver of class '' for connect URL 'null'

Jhipster on Heroku problem with jawsdb MariaDB addon at startup

I'm trying to deploy a basic jhipster app with maven, angular and maria-db. Following the jhipster guide I've configured the application and deployed the locally compiled project. All the upload was ok but during the startup I received this issue:
2020-11-12T16:15:57.719036+00:00 app[web.1]: 2020-11-12 16:15:57.701 INFO 4 --- [ main] com.gate42.advpoint.AdvpointApp : Starting AdvpointApp on cd5ce05d-5f60-4f27-a236-8c53eab442f9 with PID 4 (/app/target/advpoint-0.0.1-SNAPSHOT.jar started by u32323 in /app)
2020-11-12T16:15:57.735456+00:00 app[web.1]: 2020-11-12 16:15:57.728 INFO 4 --- [ main] com.gate42.advpoint.AdvpointApp : The following profiles are active: prod,heroku
2020-11-12T16:16:05.779094+00:00 app[web.1]: 2020-11-12 16:16:05.776 ERROR 4 --- [ main] com.zaxxer.hikari.HikariConfig : Failed to load driver class com.mysql.cj.jdbc.Driver from HikariConfig class classloader org.springframework.boot.loader.LaunchedURLClassLoader#6d00a15d
2020-11-12T16:16:05.781901+00:00 app[web.1]: 2020-11-12 16:16:05.781 WARN 4 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'servletEndpointRegistrar' defined in class path resource [org/springframework/boot/actuate/autoconfigure/endpoint/web/ServletEndpointManagementContextConfiguration$WebMvcServletEndpointManagementContextConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar]: Factory method 'servletEndpointRegistrar' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'healthEndpoint' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Unsatisfied dependency expressed through method 'healthEndpoint' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthContributorRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthContributorRegistry]: Factory method 'healthContributorRegistry' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under '' to com.zaxxer.hikari.HikariDataSource
2020-11-12T16:16:05.820063+00:00 app[web.1]: 2020-11-12 16:16:05.819 ERROR 4 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
2020-11-12T16:16:05.820065+00:00 app[web.1]:
2020-11-12T16:16:05.820066+00:00 app[web.1]: ***************************
2020-11-12T16:16:05.820066+00:00 app[web.1]: APPLICATION FAILED TO START
2020-11-12T16:16:05.820067+00:00 app[web.1]: ***************************
2020-11-12T16:16:05.820067+00:00 app[web.1]:
2020-11-12T16:16:05.820068+00:00 app[web.1]: Description:
2020-11-12T16:16:05.820068+00:00 app[web.1]:
2020-11-12T16:16:05.820069+00:00 app[web.1]: Failed to bind properties under '' to com.zaxxer.hikari.HikariDataSource:
2020-11-12T16:16:05.820069+00:00 app[web.1]:
2020-11-12T16:16:05.820070+00:00 app[web.1]: Property: driverclassname
2020-11-12T16:16:05.820071+00:00 app[web.1]: Value: com.mysql.cj.jdbc.Driver
2020-11-12T16:16:05.820072+00:00 app[web.1]: Origin: "driverClassName" from property source "source"
2020-11-12T16:16:05.820073+00:00 app[web.1]: Reason: Failed to load driver class com.mysql.cj.jdbc.Driver in either of HikariConfig class loader or Thread context classloader
2020-11-12T16:16:05.820073+00:00 app[web.1]:
2020-11-12T16:16:05.820073+00:00 app[web.1]: Action:
2020-11-12T16:16:05.820074+00:00 app[web.1]:
2020-11-12T16:16:05.820074+00:00 app[web.1]: Update your application's configuration
2020-11-12T16:16:05.820074+00:00 app[web.1]:
2020-11-12T16:16:05.957077+00:00 heroku[web.1]: Process exited with status 1
2020-11-12T16:16:06.003260+00:00 heroku[web.1]: State changed from starting to crashed
2020-11-12T16:42:37.888949+00:00 heroku[web.1]: State changed from crashed to starting
My heroku config is application-heroku.yml and was created automatically:
eureka:
instance:
hostname: advpoint.herokuapp.com
non-secure-port: 80
prefer-ip-address: false
spring:
datasource:
type: com.zaxxer.hikari.HikariDataSource
url: ${JDBC_DATABASE_URL}
username: ${JDBC_DATABASE_USERNAME}
password: ${JDBC_DATABASE_PASSWORD}
hikari:
maximumPoolSize: 8
The db connection information were created by jawsdb-addon automatically.
What can I do to solve this issue?
Thanks to all that will answer.
To solve this issue I 've added this dependency in my pom file:
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
I've supposed that during heroku configuration it was been added automatically.
I don't know if this could be an issue or not, but in my opinion this could be done automatically by the jawsdb-addon when used.

Expected type 'Upload' to be a GraphQLInputType Was a type only permitted for object types incorrectly used as an input type, or vice-versa

Here i'm trying to receive Upload file in Graphql. My Code as follows
Graphql schema example.graphqls
scalar Upload
type Mutation {
uploadFile(input: CreateFileUploadInput): Boolean
}
input CreateFileUploadInput {
files: Upload
id: String
}
Graphql Scalar upload defined in GraphqlConfig.java
#Configuration
public class GraphqlConfig {
#Bean
public SchemaParserOptions schemaParserOptions(
GraphQlObjectMapperConfigurer customObjectMapperConfigurer) {
return SchemaParserOptions.newOptions().objectMapperConfigurer(customObjectMapperConfigurer)
.build();
}
#Bean
GraphQLScalarType upload() {
return graphql.servlet.ApolloScalars.Upload;
}
}
Graphql Objectmapper configurer GraphQlObjectMapperConfigurer.java
#Component
public class GraphQlObjectMapperConfigurer implements ObjectMapperConfigurer {
#Override
public void configure(ObjectMapper mapper, ObjectMapperConfigurerContext context) {
mapper.registerModule(new JavaTimeModule())
.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false)
.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false)
.setTimeZone(TimeZone.getDefault());
}
}
my Model class CreateFileUploadInput.java
#Data
#NoArgsConstructor
#AllArgsConstructor
public class CreateFileUploadInput {
private Part files;
private String id;
}
I'm using graphql spring boot version in build.gradle is 5.8.1 and gradle gradle-5.6.2-bin
Im getting below Exception while i run my Spring Boot application!
2020-01-17 15:20:24.618 WARN 37316 --- [ main] c.c.graphql.tools.SchemaClassScanner : Cannot find definition for field 'files: Upload' on input type 'CreateFileUploadInput' -> javax.servlet.http.Part. Try adding it manually to the dictionary
2020-01-17 15:20:24.665 WARN 37316 --- [ main] c.c.graphql.tools.SchemaClassScanner : Schema type was defined but can never be accessed, and can be safely deleted: Upload
2020-01-17 15:20:24.665 WARN 37316 --- [ main] c.c.graphql.tools.SchemaClassScanner : Schema type was defined but can never be accessed, and can be safely deleted: PageInfo
2020-01-17 15:20:24.752 ERROR 37316 --- [ main] o.s.b.web.embedded.tomcat.TomcatStarter : Error starting Tomcat context. Exception: org.springframework.beans.factory.UnsatisfiedDependencyException. Message: Error creating bean with name 'graphQLServletRegistrationBean' defined in class path resource [com/oembedler/moon/graphql/boot/GraphQLWebAutoConfiguration.class]: Unsatisfied dependency expressed through method 'graphQLServletRegistrationBean' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'graphQLHttpServlet' defined in class path resource [com/oembedler/moon/graphql/boot/GraphQLWebAutoConfiguration.class]: Unsatisfied dependency expressed through method 'graphQLHttpServlet' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'graphQLServletConfiguration' defined in class path resource [com/oembedler/moon/graphql/boot/GraphQLWebAutoConfiguration.class]: Unsatisfied dependency expressed through method 'graphQLServletConfiguration' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'invocationInputFactory' defined in class path resource [com/oembedler/moon/graphql/boot/GraphQLWebAutoConfiguration.class]: Unsatisfied dependency expressed through method 'invocationInputFactory' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'graphQLSchemaProvider' defined in class path resource [com/oembedler/moon/graphql/boot/GraphQLWebAutoConfiguration.class]: Unsatisfied dependency expressed through method 'graphQLSchemaProvider' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'graphQLSchema' defined in class path resource [com/oembedler/moon/graphql/boot/GraphQLJavaToolsAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [graphql.schema.GraphQLSchema]: Factory method 'graphQLSchema' threw exception; nested exception is com.coxautodev.graphql.tools.SchemaError: Expected type 'Upload' to be a GraphQLInputType, but it wasn't! Was a type only permitted for object types incorrectly used as an input type, or vice-versa?
2020-01-17 15:20:24.789 INFO 37316 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2020-01-17 15:20:24.794 WARN 37316 --- [ main] o.a.c.loader.WebappClassLoaderBase : The web application [ROOT] appears to have started a thread named [HikariPool-1 housekeeper] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
sun.misc.Unsafe.park(Native Method)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [graphql.schema.GraphQLSchema]: Factory method 'graphQLSchema' threw exception; nested exception is com.coxautodev.graphql.tools.SchemaError: Expected type 'Upload' to be a GraphQLInputType, but it wasn't! Was a type only permitted for object types incorrectly used as an input type, or vice-versa?
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:622) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
... 128 common frames omitted
Caused by: com.coxautodev.graphql.tools.SchemaError: Expected type 'Upload' to be a GraphQLInputType, but it wasn't! Was a type only permitted for object types incorrectly used as an input type, or vice-versa?
at com.coxautodev.graphql.tools.SchemaParser.determineType(SchemaParser.kt:350) ~[graphql-java-tools-5.6.0.jar:na]
I have been spending lot of times to investigate this issue, still i could't solve it. Pls help!
I encountered this error when I tried to use a type rather than input as an input, which isn't allowed. This is slightly different from the original question, but you'll see the same error:
So this was NOT working:
scalar Upload
type Mutation {
uploadFile(input: CreateFileUploadInput): Boolean
}
type CreateFileUploadInput {
files: Upload
id: String
}
This fixed it:
input CreateFileUploadInput {
files: Upload
id: String
}
(Just changed it from type to input)
I was having the same problem over here and was able to solve it (be it not in a very nice way) after reading something mentioned on https://github.com/graphql-java-kickstart/graphql-java-tools/issues/77.
It states that by using the type explicitly in the root of a query/mutation, it will also be available on a nested level. In your case this would mean adding an additional method e.g. typLoaderDummy, as shown in the sample below (which will not actually be used) to your definition. Keep in mind that you will need to provide an implementation for this "dummy" method on your Java implementation.
scalar Upload
type Mutation {
uploadFile(input: CreateFileUploadInput): Boolean
typeLoaderDummy(upload: Upload): Boolean
}
For me this workaround solved the problem.

UnsatisfiedDependencyException by Maven Packed war but not Intellij IDE why?

i am using Intellij IDE for my springboot project, while running my spring boot project it works fine. but when i create a war with mvn package and run with java -jar project.war it throwing the following error
Warning
2018-05-23 11:05:08.635 WARN 13025 --- [ main]
ationConfigEmbeddedWebApplicationContext : Exception encountered
during context initialization - cancelling refresh attempt:
org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name HibernateJpaAutoConfiguration':
Unsatisfied dependency expressed through constructor parameter 0;
nested exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'dataSource' defined in class path resource
[com/myproject/config/DefaultDataSource.class]: Bean instantiation via
factory method failed; nested exception is
org.springframework.beans.BeanInstantiationException: Failed to
instantiate [com.mchange.v2.c3p0.ComboPooledDataSource]: Factory method
'dataSource' threw exception; nested exception is
java.lang.ExceptionInInitializerError
Exception
Error starting ApplicationContext. To display the auto-configuration
report re-run your application with 'debug' enabled.
2018-05-23 11:05:10.854 ERROR 13025 --- [ main]
o.s.boot.SpringApplication : Application startup failed
org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name
'org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [com/myproject/config/DefaultDataSource.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.mchange.v2.c3p0.ComboPooledDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.ExceptionInInitializerError
Code
#Configuration
public class DefaultDataSource {
#Autowired
DataBaseCreds dataBaseCreds;
#Bean
#Primary
public ComboPooledDataSource dataSource() {
ComboPooledDataSource dataSource = new ComboPooledDataSource();
try {
dataSource.setDriverClass(dataBaseCreds.getDB_DRIVER());
} catch (PropertyVetoException e) {
}
dataSource.setJdbcUrl(dataBaseCreds.getDB_URL());
dataSource.setUser(dataBaseCreds.getDB_USERNAME());
dataSource.setPassword(dataBaseCreds.getDB_PASSWORD());
dataSource.setMaxPoolSize(200);
return dataSource;
}
}
Sorry guys my mistake there were two versions of c3p0 libraries packed war file /WEB-INF/lib removed one works like charm - Thanks for reading

Activating Avro message converter in Spring Cloud Dataflow

I am implementing a stream app on Spring Cloud Dataflow. I would like to use Avro based schema registry client for serialization and schema control.
My basic goal is to feed Source app with some external data, transform it to prepared avro-based schema and send it to a Sink app which will accept only this schema.
I would like to use the schema from external schema registry server, not the file version of the schema.
My code looks like:
#EnableBinding(Source.class)
#EnableSchemaRegistryClient
public class DisSampleSource {
private final DisSampleSourceProperties properties;
#Inject
public DisSampleSource(DisSampleSourceProperties properties) {
this.properties = properties;
}
#InboundChannelAdapter(Source.OUTPUT)
public String feed() throws IOException {
if (!Paths.get(properties.getPath()).toFile().exists()) {
throw new InvalidPathException(this.properties.getPath(),
"The file does not exists or is of not proper type.");
}
return new String(Files.readAllBytes(Paths.get(properties.getPath())), StandardCharsets.UTF_8);
}
}
POM:
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-stream-schema</artifactId>
<version>1.1.1.RELEASE</version>
</dependency>
During starting application I am passing property:
--spring.cloud.stream.bindings.output.contentType=application/foo.bar.v1+avro
At the moment, the application fails to start with following exception:
2017-02-13 16:25:30.430 WARN 2444 --- [ main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'disSampleSource' defined in URL [jar:file:/D:/git/dis/sample/source/target/dis-sample-source-1.0.0-SNAPSHOT.jar!/BOOT-INF/classes!/com/atsisa/bit/dis/sample/DisSampleSource.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.cloud.stream.config.ChannelBindingAutoConfiguration': Unsatisfied dependency expressed through field 'adapters'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cloud.stream.messaging.Source': Invocation of init method failed; nested exception is org.springframework.cloud.stream.converter.ConversionException: No message converter is registered for application/foo.bar.v1+avro
2017-02-13 16:25:30.440 INFO 2444 --- [ main] o.apache.catalina.core.StandardService : Stopping service Tomcat
2017-02-13 16:25:30.480 INFO 2444 --- [ main] utoConfigurationReportLoggingInitializer :
Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2017-02-13 16:25:30.485 ERROR 2444 --- [ main] o.s.boot.SpringApplication : Application startup failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'disSampleSource' defined in URL [jar:file:/D:/git/dis/sample/source/target/dis-sample-source-1.0.0-SNAPSHOT.jar!/BOOT-INF/classes!/com/atsisa/bit/dis/sample/DisSampleSource.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.cloud.stream.config.ChannelBindingAutoConfiguration': Unsatisfied dependency expressed through field 'adapters'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cloud.stream.messaging.Source': Invocation of init method failed; nested exception is org.springframework.cloud.stream.converter.ConversionException: No message converter is registered for application/foo.bar.v1+avro
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:562) ~[spring-beans-4.3.4.RELEASE.jar!/:4.3.4.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.3.4.RELEASE.jar!/:4.3.4.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.4.RELEASE.jar!/:4.3.4.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.4.RELEASE.jar!/:4.3.4.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.4.RELEASE.jar!/:4.3.4.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.4.RELEASE.jar!/:4.3.4.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:754) ~[spring-beans-4.3.4.RELEASE.jar!/:4.3.4.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866) ~[spring-context-4.3.4.RELEASE.jar!/:4.3.4.RELEASE]
What am I doing wrong?
Avro is an optional dependency of Spring Cloud Stream Schema (as the intent is to support other formats in the future. In order to activate schema support, you should simply add
<dependency>
<groupId>org.apache.avro</groupId>
<artifactId>avro</artifactId>
<version>1.8.1</version>
</dependency>
to the project.

Resources