Hello everyone,
Need your all help in resolving the below issue.

I have developed a camel route which just connects to a jboss jms queue,
reads from it and then displays a log message.

My Camel-route.xml is :
<beans xmlns="http://www.springframework.org/schema/beans";
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
       xmlns:osgi="http://camel.apache.org/schema/osgi";
       xmlns:osgix="http://www.springframework.org/schema/osgi-compendium";
       xmlns:ctx="http://www.springframework.org/schema/context";
       xmlns:amq="http://activemq.apache.org/schema/core";
       xmlns:jee="http://www.springframework.org/schema/jee";
       
       xsi:schemaLocation="
       http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
       http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd
       http://camel.apache.org/schema/osgi
http://camel.apache.org/schema/osgi/camel-osgi.xsd
       http://www.springframework.org/schema/osgi-compendium
http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd
       http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
           http://activemq.apache.org/schema/core
http://activemq.apache.org/schema/core/activemq-core-5.2.0.xsd
           http://www.springframework.org/schema/jee
http://www.springframework.org/schema/jee/spring-jee-2.5.xsd";>

  
  <osgi:camelContext xmlns="http://camel.apache.org/schema/spring";>
    <route>
     <from uri="jbossjms:queue:input" />
         
     <to uri="bean:inQueueReader?method=grabFromQueue" />
        
     <to uri="log:ObjectsReadsuccessfulyfrominQueue" />
    </route>
  </osgi:camelContext>

  <bean id="jbossjms" class="org.apache.camel.component.jms.JmsComponent">
         <property name="connectionFactory" ref="jbossConnectionFactory"/>
         <property name="brokerURL" value="tcp://localhost:1099"/>
  </bean>
  
  <jee:jndi-lookup id="jbossConnectionFactory"
jndi-name="/ConnectionFactory">
        <jee:environment>
      java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
      java.naming.provider.url=jnp://localhost:1099
      java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
    </jee:environment>
  </jee:jndi-lookup>
    
        
  <bean id="inQueueReader" class="com.shailesh.ReadJbossQueue" />
  
   <osgix:cm-properties id="preProps"
persistent-id="com.shailesh.CamelWithJmsAndSpring3">
      <prop key="prefix">MyTransform</prop>
  </osgix:cm-properties>

  <ctx:property-placeholder properties-ref="preProps" />
 
</beans>


When i deploy the route to servicemix , I am getting the below exception :

org.springframework.beans.factory.BeanDefinitionStoreException: Failed to
create the JAXB binder; nested exception is javax.xml.bind.JAXBException:
Provider com.sun.xml.internal.bind.v2.ContextFactory could not be
instantiated: javax.xml.bind.JAXBException: ClassCastException: attempting
to cast
jar:file:/C:/Program%20Files/Java/jdk1.6.0_21/jre/lib/rt.jar!/javax/xml/bind/JAXBContext.class
to bundle://80.0:1/javax/xml/bind/JAXBContext.class.  Please make sure that
you are specifying the proper ClassLoader.      
 - with linked exception:
[javax.xml.bind.JAXBException: ClassCastException: attempting to cast
jar:file:/C:/Program%20Files/Java/jdk1.6.0_21/jre/lib/rt.jar!/javax/xml/bind/JAXBContext.class
to bundle://80.0:1/javax/xml/bind/JAXBContext.class.  Please make sure that
you are specifying the proper ClassLoader.    ]


I see here that, even though servicemix is having its own JAXB
implementation , it is still accessing the JDK's JAXB api. 
I am using JDK 6 update 21 and servicemix version is 4.4.2.

Could anyone please suggest me what can be done here to resolve this
exception ? I am in urgent need and already spent 2 days in googling this
stuff. Quick response will be appreaciated .

Thanks





--
View this message in context: 
http://servicemix.396122.n5.nabble.com/Servicemix-4-4-2-JaxbException-ClassCastException-after-deploying-a-camel-route-tp5714220.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to