Uploaded image for project: 'FUSE ESB'
  1. FUSE ESB
  2. ESB-243

ClassCastException when creating Camel RmiEndpoint inside Fuse ESB

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 3.3.1.0-fuse
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Deploying a service assembly containing a Camel RmiEndpoint I get a ClassCastException if I try to deploy it twice. Stopping the ESB and the starting again doesn't reproduce the exception, but if I try to redeploy again the assembly I get the exception again.

      java.lang.Exception: <?xml version="1.0" encoding="UTF-8"?>
      <jbi-task xmlns="http://java.sun.com/xml/ns/jbi/management-message" version="1.0">
      <jbi-task-result>
      <frmwk-task-result>
      <frmwk-task-result-details>
      <task-result-details>
      <task-id>deploy</task-id>
      <task-result>FAILED</task-result>
      <message-type>ERROR</message-type>
      </task-result-details>
      </frmwk-task-result-details>
      </frmwk-task-result>
      <component-task-result xmlns="http://java.sun.com/xml/ns/jbi/management-message">
      	<component-name>servicemix-camel</component-name>
      	<component-task-result-details>
      		<task-result-details>
      			<task-id>deploy</task-id>
      			<task-result>FAILED</task-result>
      			<message-type>ERROR</message-type>
      			<task-status-msg>
      <msg-loc-info>
      <loc-token/>
      <loc-message>Could not deploy xbean service unit</loc-message>
      </msg-loc-info>
      </task-status-msg>
      			<exception-info>
      				<nesting-level>1</nesting-level>
      				<msg-loc-info>
      					<loc-token/>
      					<loc-message>org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'camel:beanPostProcessor': Cannot resolve reference to bean 'camel' while setting bean property 'camelContext'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'camel': Invocation of init method failed; nested exception is java.lang.ClassCastException: org.apache.camel.component.rmi.RmiEndpoint</loc-message>
      					<stack-trace><![CDATA[org.apache.xbean.kernel.ServiceRegistrationException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'camel:beanPostProcessor': Cannot resolve reference to bean 'camel' while setting bean property 'camelContext'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'camel': Invocation of init method failed; nested exception is java.lang.ClassCastException: org.apache.camel.component.rmi.RmiEndpoint
      	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.updateServiceAssembly(AutoDeploymentService.java:353)
      	at org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:256)
      	at org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:658)
      	at org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:62)
      	at org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:622)
      	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 'camel:beanPostProcessor': Cannot resolve reference to bean 'camel' while setting bean property 'camelContext'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'camel': Invocation of init method failed; nested exception is java.lang.ClassCastException: org.apache.camel.component.rmi.RmiEndpoint
      	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)
      	at org.apache.xbean.kernel.standard.ServiceManager.start(ServiceManager.java:420)
      	at org.apache.xbean.kernel.standard.ServiceManager.initialize(ServiceManager.java:200)
      	at org.apache.xbean.kernel.standard.RegistryFutureTask$RegisterCallable.call(RegistryFutureTask.java:110)
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:123)
      	at org.apache.xbean.kernel.standard.ServiceManagerRegistry.registerService(ServiceManagerRegistry.java:409)
      	... 14 more
      Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'camel': Invocation of init method failed; nested exception is java.lang.ClassCastException: org.apache.camel.component.rmi.RmiEndpoint
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1174)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:425)
      	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.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:261)
      	... 33 more
      Caused by: java.lang.ClassCastException: org.apache.camel.component.rmi.RmiEndpoint
      	at com.iona.cs.denali.spike.rmi.mockserver.MockserverRmiRouteBuilder.configure(MockserverRmiRouteBuilder.java:28)
      	at org.apache.camel.builder.RouteBuilder.checkInitialized(RouteBuilder.java:175)
      	at org.apache.camel.builder.RouteBuilder.getRouteList(RouteBuilder.java:154)
      	at org.apache.camel.impl.DefaultCamelContext.addRoutes(DefaultCamelContext.java:303)
      	at org.apache.camel.spring.CamelContextFactoryBean.installRoutes(CamelContextFactoryBean.java:295)
      	at org.apache.camel.spring.CamelContextFactoryBean.afterPropertiesSet(CamelContextFactoryBean.java:137)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1201)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1171)
      	... 39 more
      ]]></stack-trace>
      				</msg-loc-info>
      			</exception-info>
      		</task-result-details>
      	</component-task-result-details>
      </component-task-result>
      </jbi-task-result>
      </jbi-task>
       
      	at org.apache.servicemix.jbi.framework.ManagementSupport.failure(ManagementSupport.java:125)
      	at org.apache.servicemix.jbi.framework.ManagementSupport.failure(ManagementSupport.java:111)
      	at org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:543)
      	at org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:353)
      	at org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:256)
      	at org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:658)
      	at org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:62)
      	at org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:622)
      	at java.util.TimerThread.mainLoop(Timer.java:512)
      	at java.util.TimerThread.run(Timer.java:462)
      WARN  - AutoDeploymentService          - Directory: hotdeploy: Automatic install of /opt/iona/fuse-esb-3.3.1.0/hotdeploy/denali-mockserver-rmi-sa-1.0-SNAPSHOT.jar failed
      javax.jbi.management.DeploymentException: Failed to update Service Assembly: denali-mockserver-rmi-sa
      	at org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:368)
      	at org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:256)
      	at org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:658)
      	at org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:62)
      	at org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:622)
      	at java.util.TimerThread.mainLoop(Timer.java:512)
      	at java.util.TimerThread.run(Timer.java:462)
      Caused by: java.lang.Exception: <?xml version="1.0" encoding="UTF-8"?>
      <jbi-task xmlns="http://java.sun.com/xml/ns/jbi/management-message" version="1.0">
      <jbi-task-result>
      <frmwk-task-result>
      <frmwk-task-result-details>
      <task-result-details>
      <task-id>deploy</task-id>
      <task-result>FAILED</task-result>
      <message-type>ERROR</message-type>
      </task-result-details>
      </frmwk-task-result-details>
      </frmwk-task-result>
      <component-task-result xmlns="http://java.sun.com/xml/ns/jbi/management-message">
      	<component-name>servicemix-camel</component-name>
      	<component-task-result-details>
      		<task-result-details>
      			<task-id>deploy</task-id>
      			<task-result>FAILED</task-result>
      			<message-type>ERROR</message-type>
      			<task-status-msg>
      <msg-loc-info>
      <loc-token/>
      <loc-message>Could not deploy xbean service unit</loc-message>
      </msg-loc-info>
      </task-status-msg>
      			<exception-info>
      				<nesting-level>1</nesting-level>
      				<msg-loc-info>
      					<loc-token/>
      					<loc-message>org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'camel:beanPostProcessor': Cannot resolve reference to bean 'camel' while setting bean property 'camelContext'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'camel': Invocation of init method failed; nested exception is java.lang.ClassCastException: org.apache.camel.component.rmi.RmiEndpoint</loc-message>
      					<stack-trace><![CDATA[org.apache.xbean.kernel.ServiceRegistrationException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'camel:beanPostProcessor': Cannot resolve reference to bean 'camel' while setting bean property 'camelContext'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'camel': Invocation of init method failed; nested exception is java.lang.ClassCastException: org.apache.camel.component.rmi.RmiEndpoint
      	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.updateServiceAssembly(AutoDeploymentService.java:353)
      	at org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:256)
      	at org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:658)
      	at org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:62)
      	at org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:622)
      	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 'camel:beanPostProcessor': Cannot resolve reference to bean 'camel' while setting bean property 'camelContext'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'camel': Invocation of init method failed; nested exception is java.lang.ClassCastException: org.apache.camel.component.rmi.RmiEndpoint
      	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)
      	at org.apache.xbean.kernel.standard.ServiceManager.start(ServiceManager.java:420)
      	at org.apache.xbean.kernel.standard.ServiceManager.initialize(ServiceManager.java:200)
      	at org.apache.xbean.kernel.standard.RegistryFutureTask$RegisterCallable.call(RegistryFutureTask.java:110)
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:123)
      	at org.apache.xbean.kernel.standard.ServiceManagerRegistry.registerService(ServiceManagerRegistry.java:409)
      	... 14 more
      Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'camel': Invocation of init method failed; nested exception is java.lang.ClassCastException: org.apache.camel.component.rmi.RmiEndpoint
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1174)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:425)
      	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.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:261)
      	... 33 more
      Caused by: java.lang.ClassCastException: org.apache.camel.component.rmi.RmiEndpoint
      	at com.iona.cs.denali.spike.rmi.mockserver.MockserverRmiRouteBuilder.configure(MockserverRmiRouteBuilder.java:28)
      	at org.apache.camel.builder.RouteBuilder.checkInitialized(RouteBuilder.java:175)
      	at org.apache.camel.builder.RouteBuilder.getRouteList(RouteBuilder.java:154)
      	at org.apache.camel.impl.DefaultCamelContext.addRoutes(DefaultCamelContext.java:303)
      	at org.apache.camel.spring.CamelContextFactoryBean.installRoutes(CamelContextFactoryBean.java:295)
      	at org.apache.camel.spring.CamelContextFactoryBean.afterPropertiesSet(CamelContextFactoryBean.java:137)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1201)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1171)
      	... 39 more
      ]]></stack-trace>
      				</msg-loc-info>
      			</exception-info>
      		</task-result-details>
      	</component-task-result-details>
      </component-task-result>
      </jbi-task-result>
      </jbi-task>
       
      	at org.apache.servicemix.jbi.framework.ManagementSupport.failure(ManagementSupport.java:125)
      	at org.apache.servicemix.jbi.framework.ManagementSupport.failure(ManagementSupport.java:111)
      	at org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:543)
      	at org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:353)
      	... 6 more
       

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                willem.jiang Willem Jiang
                Reporter:
                dgreco David Greco
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: