It seems to me like a classloading issue. I can not even see the
TypeConverters loaded in the debug log. I can see them in the debug log
with the all camel example.


-----Original Message-----
From: rabi [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 26, 2008 1:13 PM
To: [email protected]
Subject: Re: TypeConverters not available when using Camel JBI Endpoint
from ServiceMix


Gret,

I am using Servicemix 3.3-SNAPSHOT build from trunk and Camel 3.1
SNAPSHOT.


Here are the deatils..
--------------------------

All Camel example with the following Route works fine

from("file:inbox/data1?noop=true").convertBodyTo(PersonDocument.class)
        //  .intercept(transactionInterceptor())
            .to("jpa:org.apache.camel.example.etl.CustomerEntity");

When I change this use smx filepoller with the following route, this
gives me errors as it is not able to convert the types. I am using a
servicemix-bean inbetween (passthrough)


from("jbi:endpoint:http://camel.apache.org/example/etl/persist/person";)
      .convertBodyTo(PersonDocument.class)
        //  .intercept(transactionInterceptor())
            .to("jpa:org.apache.camel.example.etl.CustomerEntity");

fillePoller su config..
-------------------------
<beans xmlns:file="http://servicemix.apache.org/file/1.0";
       xmlns:ls="http://servicemix.apache.org/samples/logging-sample";>
<file:poller service="ls:filePoller"
                      endpoint="poller"
                      targetService="ls:beanRouter"
                      targetEndpoint="router"
                      file="inbox/data1"> </file:poller> </beans>

Bean su
----------------

<beans xmlns:bean="http://servicemix.apache.org/bean/1.0";
      xmlns:ls="http://servicemix.apache.org/samples/logging-sample";>
  <bean:endpoint service="ls:beanRouter" endpoint="router">
      <bean:bean>
          <bean class="org.apache.servicemix.samples.logging.BeanRouter"
/>
      </bean:bean>
  </bean:endpoint>

</beans>

Bean su code..
----------------------
 public void onMessageExchange(MessageExchange exchange) throws
MessagingException {

    InOnly in = (InOnly) exchange;
        if (in.getStatus() == ExchangeStatus.DONE) {
            return;
        } else if (in.getStatus() == ExchangeStatus.ERROR) {
            return;
        }
        System.err.println(in.getService().getLocalPart() + "
requested");
  try {
    NormalizedMessage message = exchange.getMessage("in");
    Source content = message.getContent();
    QName targetService = new
QName("http://camel.apache.org/example/etl","persist";);
    MessageExchangeFactory exchangeFact =
channel.createExchangeFactoryForService(targetService);
    InOnly response = exchangeFact.createInOnlyExchange();
    NormalizedMessage jpaMessage = response.createMessage();
    jpaMessage.setContent(content);
    response.setInMessage(jpaMessage);
    channel.sendSync(response);
    exchange.setStatus(ExchangeStatus.DONE);
    channel.send(exchange);
    } catch (Exception e) {
            in.setError(e);
            channel.sendSync(in);
        }

    }


Regards,
Rabi


Gert Vanthienen wrote:
>
> Rabi Mishra,
>
> What version of ServiceMix are you using?  This sounds like an issue
> from ServiceMix 3.2.0, which has been solved in 3.2.1 however.  Can
> you post the xbean.xml for the file SU as well as the Camel route?
>
> Regards,
>
> Gert
>
> [EMAIL PROTECTED] wrote:
>> Hi,
>>
>> TypeConverters (including the custom TypeConverters) are not loaded
>> when using "Camel JBI Endpoint" from as a target from servicemix
component.
>>
>> servicemix-file->camel-jpa
>>
>> This issue does not arise when the complete flow is in Camel (in the
>> RouteBuilder).
>>
>> camel-file->camel-jpa
>>
>> Any thoughts..
>>
>> Regards,
>> Rabi Mishra
>> Wipro Technologies
>> Hinjewadi, Pune
>> Cell: +91(0)9765391877
>> http://rabisblog.blogspot.com/
>>
>> The information contained in this electronic message and any
>> attachments to this message are intended for the exclusive use of the

>> addressee(s) and may contain proprietary, confidential or privileged
>> information. If you are not the intended recipient, you should not
>> disseminate, distribute or copy this e-mail. Please notify the sender

>> immediately and destroy all copies of this message and any
attachments.
>>
>> WARNING: Computer viruses can be transmitted via email. The recipient

>> should check this email and any attachments for the presence of
viruses.
>> The company accepts no liability for any damage caused by any virus
>> transmitted by this email.
>>
>> www.wipro.com
>>
>>
>>
>
>
>
> -----
> ---
> Gert Vanthienen
> http://www.anova.be
>

--
View this message in context:
http://www.nabble.com/TypeConverters-not-available-when-using-Camel-JBI-
Endpoint-from-ServiceMix-tp16277241s12049p16297034.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.

www.wipro.com

Reply via email to