On Fri, Jan 15, 2010 at 5:56 PM, pmmerritt <[email protected]> wrote:
>
> I implemented the VFSPackageScanClassResolver as discussed
> http://codeandtell.wordpress.com/2009/03/03/apache-camel-jboss-5-spring/
> Apache Camel JBoss 5
> and plugged it in to the camel route and it is recognized by camel as is
> evident by the following log statements
> 2010-01-15 11:40:21,513 INFO
> [org.apache.camel.spring.CamelContextFactoryBean] (main) Using custom
> PackageScanClassResolver: vfspackagescanclassresol...@3b567997g//
> 2010-01-15 11:40:27,595 DEBUG [VFSPackageScanClassResolver] (main) Searching
> for annotations of org.apache.camel.Converter in packages:
> [org.apache.camel.component.file, org.apache.camel.converter,
> org.apache.camel.spring.converter, org.apache.activemq.camel.converter,
> org.apache.camel.component.http]
> 2010-01-15 11:40:27,596 TRACE
> [mil.dod.nga.jbosscamel.VFSPackageScanClassResolver] (main) The thread
> context class loader:
> org.jboss.web.tomcat.service.webctxloader$encloa...@641c6370  is used to
> load the class
>
> I am still getting the same error as described above. Any ideas on what else
> I might try?
> For completeness we are using Camel 2.0.0 and JBoss 5.1.0.GA
>

You can enable TRACE logging at your resolver and the:
     org.apache.camel.impl.DefaultPackageScanClassResolver

This may help to figure out why JBoss cannot find those .jars in the
classpath and let Camel auto find the type converters.

You are welcome to zip together a small project with your custom
classloader and instructions how to try it out.
Also how to start JBoss etc. as I havent used JBoss in a very long time.

Then we/others can take a look as well. And if we get the code working
and if possible we can add it as a camel-jboss component and ship it
with Camel in the future.


> Thanks
> Phillip Merritt
>
> Claus Ibsen-2 wrote:
>>
>> On Thu, Jan 14, 2010 at 2:28 PM, pmmerritt <[email protected]>
>> wrote:
>>>
>>> Camel fails to load the timer component in the following route
>>> <camel:route errorHandlerRef="transactionErrorHandler">
>>>                <camel:from uri="timer:dm?period=2000"/>
>>>                <camel:to
>>> uri="bean:dmScheduler?method=getNewTransactions"/>
>>>   </camel:route>
>>>
>>> Camel is configured as a war file which is being loaded into the JBoss
>>> Application Server.
>>>
>>> The following error is thrown while attempting to load the Camel Context
>>> 08:18:26,339 ERROR Exception sending context initialized event to
>>> listener
>>> instance of class org.springframework.web.context.ContextLoaderListener
>>> org.apache.camel.ResolveEndpointFailedException: Failed to resolve
>>> endpoint:
>>> timer://dm?period=2000 due to: Could not find a suitable setter for
>>> property: period as there isn't a setter method with same type:
>>> java.lang.String nor type conversion possible: No type converter
>>> available
>>> to convert from type: java.lang.String to the required type: long with
>>> value
>>> 2000
>>>
>>
>> Hi
>>
>> JBoss has a classloading issue which causes Camel not being able to
>> pickup type converters from the classpath.
>>
>> You need to use a special JBoss class loader with Camel to resolve that.
>> There are some links here to some people who did that
>> http://camel.apache.org/articles.html
>>
>> Basically what would be desirable is to create a camel-jboss component
>> and ship that with Camel. However I do not know if there is any
>> licensing implications.
>>
>>
>>
>>>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/Timer-fails-to-resolve-parameters-tp27161260p27161260.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Author of Camel in Action: http://www.manning.com/ibsen/
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>>
>>
>
> --
> View this message in context: 
> http://old.nabble.com/Timer-fails-to-resolve-parameters-tp27161260p27180116.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Reply via email to