deployed route misses dependencies

Highlighted
One Star

deployed route misses dependencies

Hi all,
after creating in Studio a route with some beans from Spring configuration, what used to work in Studio doesn't even deploy in ESB. The error is:
18:12:07,974 | ERROR | ExtenderThread-7 | BundleApplicationContextListener   50 | 94 - org.springframework.osgi.extender - 1.2.1 | Application context refresh failed (OsgiBundleXmlApplicationContext(bundle=routes.ProxyRoute, config=osgibundle:/META-INF/spring/*.xml))
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class for bean with name 'org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor' defined in null; nested exception is java.lang.ClassNotFoundException: org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor not found from bundle
    at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1275)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:575)
    at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1344)
    at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:910)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:609)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
    at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)
    at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)
    at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
    at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
    at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor not found from bundle
    at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:103)
    at org.springframework.osgi.util.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:156)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    at org.springframework.util.ClassUtils.forName(ClassUtils.java:260)
    at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:416)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1296)
    at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1267)
    ... 11 more
Caused by: java.lang.ClassNotFoundException: org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:340)
    at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229)
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1212)
    at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:99)
    ... 17 more

FWIW, I looked into the generated KAR and lo, there's no trace of the dependencies I entered (with lots of sweat) one by one in Studio in the cConfig. Somewhere it says the container should be smart and figure these dependencies out (why then not also smart in Studio is another question), but in my case look it can't figure even the basic Spring things. Am I doing something completely wrong?
Moderator

Re: deployed route misses dependencies

Hi,
after creating in Studio a route with some beans from Spring configuration, what used to work in Studio doesn't even deploy in ESB

Would you mind sharing your route configuration screenshots with us?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: deployed route misses dependencies

@slsh: check the manifest (context menu - edit route manifest)
One Star

Re: deployed route misses dependencies

Thank you for the idea, the manifest editor ALMOST worked.
Only problem, none the JARs I select there will be exported when I build the route (as the documentation suggested). Some of these dependencies already exist in the target container so adding them (by hand, one by one, eww) to Require-Bundles section would help I guess, but what about my local ones?? They even show up all in the editor as "built-in items" (notice, everything is greyed out) so I strongly think the editor is quite a buggy tool...
One Star

Re: deployed route misses dependencies

To answer myself: looks like the known bug TESB-14958
One Star

Re: deployed route misses dependencies

@slsh: according to your manifest a lot of deps configured manually using cConfig. Try to use Camel component dependencies at advanced settings on cMessagingEndpoint (from screensot at least cxf, jetty)