L.S.,

Is this perhaps in another SU where you haven't added the <classpath><library>...</library></classpath> yet? If ServiceMix is able to find one class, it should be able to find others from the SL as well, but only if that SU has the correct reference.

Regards,

Gert

pratibhaG wrote:
I have created shared library which has following files.
CustomDelegateProcessor
ErrorConstants
ErrorEnrich
ErrorMessage

 All are in same package com.in2m.servicemix.operations.errorhandler

I have kept zip file of this library in smx/hotdeploy

I have a custom operation which uses this shared library. I have added
dependency for shared library in the pom.xml of SUs which are using the
shared library.

Everything goes fine while mvn install, but when I deploy it, I get
following error:
<exception-info>
                                <nesting-level>1</nesting-level>
                                <msg-loc-info>
                                        <loc-token/>
<loc-message>org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'Routing:beanPostProcessor': Cannot resolve
reference to bean 'Routing' while setting bean property 'camelContext';
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'Routing': Invocation of init method failed;
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name
'com.in2m.servicemix.operations.updateprofile.MessageRouting': Instantiation
of bean failed; nested exception is java.lang.NoClassDefFoundError:
com/in2m/servicemix/operations/errorhandler/CustomDelegateProcessor</loc-message>
<stack-trace><![CDATA[org.apache.xbean.kernel.ServiceRegistrationException:
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'Routing:beanPostProcessor': Cannot resolve reference to bean
'Routing' while setting bean property 'camelContext'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'Routing': Invocation of init method failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'com.in2m.servicemix.operations.updateprofile.MessageRouting':
Instantiation of bean failed; nested exception is
java.lang.NoClassDefFoundError:
com/in2m/servicemix/operations/errorhandler/CustomDelegateProcessor
        at
org.apache.xbean.kernel.standard.ServiceManagerRegistry.registerService(ServiceManagerRegistry.java:424)
        at
org.apache.xbean.kernel.standard.StandardKernel.registerService(StandardKernel.java:220)
        at
org.apache.xbean.server.spring.loader.SpringLoader.load(SpringLoader.java:152)
        at
org.apache.servicemix.common.xbean.AbstractXBeanDeployer.deploy(AbstractXBeanDeployer.java:83)
        at
org.apache.servicemix.camel.CamelSpringDeployer.deploy(CamelSpringDeployer.java:83)
        at
org.apache.servicemix.common.BaseServiceUnitManager.doDeploy(BaseServiceUnitManager.java:88)
        at
org.apache.servicemix.common.BaseServiceUnitManager.deploy(BaseServiceUnitManager.java:69)
        at
org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:508)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.checkPendingSAs(AutoDeploymentService.java:482)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.checkPendingComponents(AutoDeploymentService.java:535)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateSharedLibrary(AutoDeploymentService.java:317)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:254)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:664)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:62)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:628)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'Routing:beanPostProcessor': Cannot resolve
reference to bean 'Routing' while setting bean property 'camelContext';
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'Routing': Invocation of init method failed;
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name
'com.in2m.servicemix.operations.updateprofile.MessageRouting': Instantiation
of bean failed; nested exception is java.lang.NoClassDefFoundError:
com/in2m/servicemix/operations/errorhandler/CustomDelegateProcessor
        at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
        at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:109)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1099)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:861)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:421)
        at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
        at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
        at
org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:733)
        at
org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:511)
        at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:337)
        at
org.apache.xbean.server.spring.configuration.SpringConfiguration.<init>(SpringConfiguration.java:63)
        at
org.apache.xbean.server.spring.configuration.SpringConfigurationServiceFactory.createService(SpringConfigurationServiceFactory.java:106)


Other classes it is finding. why it is not finding CustomDelegateProcessor?

Pratibha

Reply via email to