You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by lavanya <la...@gmail.com> on 2012/01/18 20:08:40 UTC

Issue with loading TypeConverter in Camel 2.8.2 on JBOSS 7.2

Hi,

I am new to camel and Jboss, as the camel 2.8 has built in support for
jboss, I directly deployed camel spring based web app. I am getting the
below exception: 

Caused by: org.apache.camel.TypeConverterLoaderException: Failed to load
type converters because of: Cannot find any type converter classes from the
following packages: [org.apache.activemq.camel.converter]
	at
org.apache.camel.impl.converter.AnnotationTypeConverterLoader.load(AnnotationTypeConverterLoader.java:116)
[camel-core-2.8.2.jar:]
	at
org.apache.camel.impl.converter.BaseTypeConverterRegistry.loadTypeConverters(BaseTypeConverterRegistry.java:406)
[camel-core-2.8.2.jar:]
	at
org.apache.camel.impl.converter.DefaultTypeConverter.doStart(DefaultTypeConverter.java:42)
[camel-core-2.8.2.jar:]
	at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)
[camel-core-2.8.2.jar:]
	at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)
[camel-core-2.8.2.jar:]
	at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:56)
[camel-core-2.8.2.jar:]
	at
org.apache.camel.impl.DefaultCamelContext.startServices(DefaultCamelContext.java:1624)
[camel-core-2.8.2.jar:]
	at
org.apache.camel.impl.DefaultCamelContext.addService(DefaultCamelContext.java:903)
[camel-core-2.8.2.jar:]
	at
org.apache.camel.impl.DefaultCamelContext.getTypeConverter(DefaultCamelContext.java:986)
[camel-core-2.8.2.jar:]

FYI: the same war is working as expected with Tomcat.

Thanks in advance for your response.

--
View this message in context: http://camel.465427.n5.nabble.com/Issue-with-loading-TypeConverter-in-Camel-2-8-2-on-JBOSS-7-2-tp5155618p5155618.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Issue with loading TypeConverter in Camel 2.8.2 on JBOSS 7.2

Posted by lavanya <la...@gmail.com>.
Hi Babak,

Really appreciate your immediate response, due to licensing issues, we will
have to switch to JBoss 5.0, in which case, the camel-jboss would suffice. I
will give a try and update the forum.

Thanks once again.

--
View this message in context: http://camel.465427.n5.nabble.com/Issue-with-loading-TypeConverter-in-Camel-2-8-2-on-JBOSS-7-2-tp5155618p5158238.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Issue with loading TypeConverter in Camel 2.8.2 on JBOSS 7.2

Posted by Babak Vahdat <ba...@swissonline.ch>.
Hi again,

Apache Camel team has already taken care for the ticket [1] I asked you for
to open (by my first post) by ActiveMQ JIRA. However this doesn't solve your
current problem.

[1] https://issues.apache.org/jira/browse/AMQ-3458

Babak

--
View this message in context: http://camel.465427.n5.nabble.com/Issue-with-loading-TypeConverter-in-Camel-2-8-2-on-JBOSS-7-2-tp5155618p5156164.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Issue with loading TypeConverter in Camel 2.8.2 on JBOSS 7.2

Posted by Babak Vahdat <ba...@swissonline.ch>.
So just add the following repository to your pom:

<repository>
  <id>camel-extra-release</id>
  <name>Camel Extra Maven repository of releases</name>
 
<url>http://svn.codespot.com/a/apache-extras.org/camel-extra/maven2/releases</url>
</repository>

To make use of the jar artifacts at:

http://svn.codespot.com/a/apache-extras.org/camel-extra/maven2/releases/org/apache-extras/camel-extra/camel-jboss6/

And be aware that the JBossPackageScanClassResolver there is built against
JBoss 6.x however you seem to need it for JBoss 7.2. So if this approach
doesn't work then you should generate the jar by yourself compiled for JBoss
7.2.:

http://svn.codespot.com/a/apache-extras.org/camel-extra/trunk/components/camel-jboss6/

I've already built and generated the jar a year ago for one of my projects
under JBoss 5.1. So believe me it's possible to generate that but *maybe*
you have to adjust the code [1] a bit.

[1]
http://svn.codespot.com/a/apache-extras.org/camel-extra/trunk/components/camel-jboss6/src/main/java/org/apachextras/camel/jboss/JBossPackageScanClassResolver.java

Good luck!

Babak


--
View this message in context: http://camel.465427.n5.nabble.com/Issue-with-loading-TypeConverter-in-Camel-2-8-2-on-JBOSS-7-2-tp5155618p5155737.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Issue with loading TypeConverter in Camel 2.8.2 on JBOSS 7.2

Posted by Babak Vahdat <ba...@swissonline.ch>.
Hi,

The problem is that apparently ActiveMQ seems to make use of the package
scan feature of Camel (inside META-INF/org/apache/camel/TypeConverter)
instead of specifying the FQN [1]. So it seems to me you've got no other
choice other than using JBossPackageScanClassResolver given by [2].

As an example ActiveMQ (5.5.1) seems to have two converters in that package:

- ActiveMQConverter
- ActiveMQMessageConverter

Do you mind to open a JIRA ticket on the ActiveMQ-JIRA to improve this?

[1] http://camel.apache.org/camel-jboss.html
[2] http://code.google.com/a/apache-extras.org/p/camel-extra/

Babak

--
View this message in context: http://camel.465427.n5.nabble.com/Issue-with-loading-TypeConverter-in-Camel-2-8-2-on-JBOSS-7-2-tp5155618p5155683.html
Sent from the Camel - Users mailing list archive at Nabble.com.