Мы запускаем Караф 4.1.5 с верблюдом 2.21.0
У меня есть очень простой тестовый маршрут для составления карты бульдозера.
from("timer:test?repeatCount=1")
.bean(First.class)
.to("dozer:test?targetModel=xyz.Second")
.log("Done");
Сборка пакета с использованием maven-bundle-plugin (используя это для нескольких других маршрутов без проблем) и развертывание мы получаем:
Caused by: java.lang.ClassNotFoundException: com.sun.el.ExpressionFactoryImpl not found by dozer [501]
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1639) ~[?:?]
at org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80) ~[?:?]
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2053) ~[?:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:?]
at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1927) ~[?:?]
at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:978) ~[?:?]
at org.apache.camel.core.osgi.utils.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:47) ~[?:?]
at org.apache.camel.core.osgi.utils.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:69) ~[?:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:?]
at javax.el.FactoryFinder.newInstance(FactoryFinder.java:87) ~[?:?]
at javax.el.FactoryFinder.find(FactoryFinder.java:197) ~[?:?]
at javax.el.ExpressionFactory.newInstance(ExpressionFactory.java:197) ~[?:?]
at javax.el.ExpressionFactory.newInstance(ExpressionFactory.java:168) ~[?:?]
at org.dozer.loader.xml.ELEngine.<init>(ELEngine.java:44) ~[?:?]
at org.apache.camel.converter.dozer.MapperFactory.configureBeanContainer(MapperFactory.java:162) ~[?:?]
at org.apache.camel.converter.dozer.MapperFactory.parseConfiguration(MapperFactory.java:98) ~[?:?]
at org.apache.camel.converter.dozer.MapperFactory.create(MapperFactory.java:56) ~[?:?]
at org.apache.camel.component.dozer.DozerEndpoint.initDozerBeanContainerAndMapper(DozerEndpoint.java:151) ~[?:?]
at org.apache.camel.component.dozer.DozerEndpoint.doStart(DozerEndpoint.java:115) ~[?:?]
Я попытался добавить необходимый класс в Import-Package:
*; Com.sun.el
Что приводит к java.lang.ClassCastException: com.sun.el.ExpressionFactoryImpl не может быть приведен к javax.el.ExpressionFactor :
Caused by: java.lang.ClassCastException: com.sun.el.ExpressionFactoryImpl cannot be cast to javax.el.ExpressionFactory
at org.apache.camel.converter.dozer.MapperFactory.configureBeanContainer(MapperFactory.java:154) ~[?:?]
at org.apache.camel.converter.dozer.MapperFactory.parseConfiguration(MapperFactory.java:98) ~[?:?]
at org.apache.camel.converter.dozer.MapperFactory.create(MapperFactory.java:56) ~[?:?]
at org.apache.camel.component.dozer.DozerEndpoint.initDozerBeanContainerAndMapper(DozerEndpoint.java:151) ~[?:?]
at org.apache.camel.component.dozer.DozerEndpoint.doStart(DozerEndpoint.java:115) ~[?:?]
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) ~[?:?]
at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:75) ~[?:?]
at org.apache.camel.processor.SendProcessor.doStart(SendProcessor.java:241) ~[?:?]
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) ~[?:?]
at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:75) ~[?:?]
at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:60) ~[?:?]
at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:104) ~[?:?]
at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:90) ~[?:?]
at org.apache.camel.processor.RedeliveryErrorHandler.doStart(RedeliveryErrorHandler.java:1472) ~[?:?]
at org.apache.camel.support.ChildServiceSupport.start(ChildServiceSupport.java:44) ~[?:?]
at org.apache.camel.support.ChildServiceSupport.start(ChildServiceSupport.java:31) ~[?:?]
Кажется, dozer пытается загрузить com.sun.el.ExpressionFactoryImpl, но уже существует javax.el.ExpressionFactoryImpl.
Кто-нибудь может дать мне какое-то указание, почему не будет работать ванильный Караф 4.1.5 с верблюдом 2.21.0 и верблюжьим бульдозером?