git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

unable to work apache.camel (latest version) with Spring.Boot 2.1.0 Release


Hello

I am using apache.camel version 2.23.0 with spring.boot.version 2.1.0.
RELEASE but I get " error crating bean with name 'camelContext'  defined in
.." error while executing my Spring Boot application.

Do you know the reason why I come across with such kind of error? It was
working fine before upgrading camel version and spring boot version. But,
after I upgraded apache.camel.version and Spring Boot version I got those
errors.
You can find my dependency and error below.
Please let me know if you have more thing.

Thank you for your helps.

Best Regards
Alper

Pom.Xml Dependencies :

<dependencyManagement>
    <dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.1.0.RELEASE</version>
        <type>pom</type>
        <scope>import</scope>
    </dependency>
    </dependencies>
</dependencyManagement>


<dependency>

        <groupId>org.apache.camel</groupId>
        <artifactId>camel-bom</artifactId>
        <version>2.23.0</version>
        <type>pom</type>
        <scope>import</scope>
    </dependency>

</dependencies>

Error :

Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'camelContext' defined in class path resource
[org/apache/camel/spring/boot/CamelAutoConfiguration.class]:
Post-processing of merged bean definition failed; nested exception is
java.lang.IllegalStateException: Failed to introspect Class
[org.apache.camel.impl.DefaultCamelContext] from ClassLoader
[jdk.internal.loader.ClassLoaders$AppClassLoader@77556fd]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498)
at
org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at
org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:273)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1239)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1166)
at
org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:855)
at
org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:758)
... 77 common frames omitted
Caused by: java.lang.IllegalStateException: Failed to introspect Class
[org.apache.camel.impl.DefaultCamelContext] from ClassLoader
[jdk.internal.loader.ClassLoaders$AppClassLoader@77556fd]
at
org.springframework.util.ReflectionUtils.getDeclaredFields(ReflectionUtils.java:779)
at
org.springframework.util.ReflectionUtils.doWithLocalFields(ReflectionUtils.java:711)
at
org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.buildResourceMetadata(CommonAnnotationBeanPostProcessor.java:365)
at
org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.findResourceMetadata(CommonAnnotationBeanPostProcessor.java:350)
at
org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(CommonAnnotationBeanPostProcessor.java:298)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:1044)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:550)
... 87 common frames omitted
Caused by: java.lang.NoClassDefFoundError: Ljavax/xml/bind/JAXBContext;
at java.base/java.lang.Class.getDeclaredFields0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredFields(Class.java:3062)
at java.base/java.lang.Class.getDeclaredFields(Class.java:2249)
at
org.springframework.util.ReflectionUtils.getDeclaredFields(ReflectionUtils.java:774)
... 93 common frames omitted
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBContext
at
java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at
java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 97 common frames omitted

Process finished with exit code 1





-- 
*   ALPER KOPUZ*
*Software Engineer  *