OSGi is a kinda different beast though ...
I'll try to have a look at that.

On Thu, May 29, 2008 at 1:46 PM, Claus Ibsen <[EMAIL PROTECTED]> wrote:
> Hi
>
> Try adding log4j trace level debugging as Camel ResolverUtil does trace 
> logging while it tries to load the class ressource.
>
>
> And for fix of the bug could potential look how Spring does ressource loading 
> as they have fought with all kind of weird situations with loading from 
> WebSphere, WebLogic, JBoss etc. that does strange tricks
>
>
> Med venlig hilsen
>
> Claus Ibsen
> ......................................
> Silverbullet
> Skovsgårdsvænget 21
> 8362 Hørning
> Tlf. +45 2962 7576
> Web: www.silverbullet.dk
>
> -----Original Message-----
> From: Ivan Stojic [mailto:[EMAIL PROTECTED]
> Sent: 29. maj 2008 13:24
> To: [email protected]
> Subject: Re: Problem with TypeConverters in OSGi
>
>
> Hi,
>
> I tried using this Camel route builder:
>
> package test;
> import org.apache.camel.builder.RouteBuilder;
> public class MyRouteBuilder extends RouteBuilder {
>    public void configure() throws Exception {
>
>        from("timer://myTimer?period=2000")
>            .setBody(constant(new byte[]{'H','e','l','l','o'}))
>            .convertBodyTo(String.class)
>            .to("log:Test");
>    }
> }
>
> Running it in normal Java SE (without OSGi) I get correct log output:
>
> INFO: Exchange[Message: Hello]
>
> Runing it inside SMX Kernel, I get:
>
> 12:51:02,415 | ERROR | xtenderThread-28 | ResolverUtil |
> er.AnnotationTypeConverterLoader   58 | Could not search jar file
> '/org/apache/camel/converter' for classes matching criteria: annotated with
> @Converterdue to an IOException: /org/apache/camel/converter (No such file
> or directory)
> [...]
> 12:51:06,449 | INFO  | myTimer          | Test|
> che.camel.impl.ProcessorEndpoint   72 | Exchange[Message: [EMAIL PROTECTED]
>
> It should be 'Hello' instead of '[EMAIL PROTECTED]'
>
> Btw, I also just noticed that if I define my OSGi CamelContext with Spring
> like this:
>
> <osgi:camelContext xmlns="http://activemq.apache.org/camel/schema/spring";>
>  <package>test</package>
> </osgi:camelContext>
>
> I also get an error:
>
> 13:08:06,790 | ERROR | xtenderThread-33 | ResolverUtil |
> .camel.spring.RouteBuilderFinder   73 | Could not search jar file '/test'
> for classes matching criteria: is assignable to RouteBuilderdue to an
> IOException: /test (No such file or directory)
>
> and no routes get created. Instead I had to use:
>
> <osgi:camelContext/>
> <bean class="test.MyRouteBuilder" />
>
> Let me know if there is anything else I could do to help.
>
> Thanks,
> Ivan
>
>
> gnodet wrote:
>>
>> Thx, could you give some informations on how to reproduce the problem ?
>> Maybe the code of a simple OSGi bundle that fails ?
>>
>> On Thu, May 29, 2008 at 10:35 AM, Ivan Stojic <[EMAIL PROTECTED]> wrote:
>>>
>>> Sure:
>>>
>>> https://issues.apache.org/activemq/browse/CAMEL-558
>>>
>>>
>>> Ivan
>>>
>>
>>
>> --
>> Cheers,
>> Guillaume Nodet
>> ------------------------
>> Blog: http://gnodet.blogspot.com/
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/Problem-with-TypeConverters-in-OSGi-tp17517233s22882p17532737.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Reply via email to