Camel choice processor

2013-01-10 Thread dhruv.sachdeva
Hi ,
I have to write a unit test case for myclass which routes a message to
queues using choice processor and checking predicates such as when.

Here is a code snippet:-

from("direct:setMessageIdentifier").
choice().

when(ns.xpath("/cus:CustomerUpdateRoot")).setHeader("MessageIdentifier",ns.xpath("/cus:CustomerUpdateRoot/cus",String.class)).setHeader("MessageType",
constant("Customer")).to("direct:applyIdempotent").

when(ns.xpath("/customer:some")).setHeader("BusinessKey",
ns.xpath("/cust",String.class)).setHeader("MessageType",
constant("Cust")).to("direct:applyIdempotent");



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-choice-processor-tp5725214.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Issue using camel-cxf and wss4j

2013-01-10 Thread Charles Moulliard
Different things should be done to improve what we have

Why : The warn message which is created by wss4j has nothing to do with the
existing problem ?

We get this message in the log when we use WS-SECURITTY and camel-cxf with
dataFormat=MESSAGE

qtp370155726-26 DEBUG [org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor]
- WSS4JInInterceptor: enter handleMessage()
qtp370155726-26 WARN [org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor]
- Security processing failed (actions mismatch)
qtp370155726-26 WARN [org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor]
-
org.apache.ws.security.WSSecurityException: An error was discovered
processing the  header
 at
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.checkActions(WSS4JInInterceptor.java:383)

This message means that action provided for the interceptor (and in fact
for Apache WSS4J) "UsernameToken Timestamp" in my case were not correct ...

This is ABSOLUTELY false and can be verified in debug mode where it appears
that the actions have been checked. In WSS4JInterceptor class , there is a
missing control because when it detects that this object is null
--> Element elem = WSSecurityUtil.getSecurityHeader(doc.getSOAPPart(),
actor) then no ERROR message is created. So it continues to process the
handle message till it reach this control generating the warning message
because wsResult is also empty

http://grepcode.com/file/repo1.maven.org/maven2/org.apache.cxf/cxf-rt-ws-security/2.2.9/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java#WSS4JInInterceptor.checkActions%28org.apache.cxf.binding.soap.SoapMessage%2Corg.apache.cxf.ws.security.wss4j.RequestData%2Cjava.util.Vector%2Cjava.util.Vector%29

I will raise a ticket regarding to what I describe here to improve CXF.









On Thu, Jan 10, 2013 at 8:43 AM, Willem jiang wrote:

> In the MESSAGE data format, camel-cxf will not let the interceptor which
> can build the SOAP message from the input stream to be called.
> So the WSS4JInInterceptor will not work any more.
> I think that is why CXF_MESSAGE is introduced, I will dig the code to see
> if I see the whole picture of it.
>
>
> --
> Willem Jiang
>
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Web: http://www.fusesource.com | http://www.redhat.com
> Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/)
> (English)
>   http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
> Twitter: willemjiang
> Weibo: 姜宁willem
>
>
>
>
>
> On Thursday, January 10, 2013 at 7:00 AM, Charles Moulliard wrote:
>
> > Find the issue. When we setup camel-cxf endpoint using as
> > DataFormat=MESSAGE, SOAP securityHeaders are removed.
> >
> >
> > On Wed, Jan 9, 2013 at 5:30 PM, Charles Moulliard  ch0...@gmail.com)> wrote:
> >
> > > Hi,
> > >
> > > When I try to authenticate an HTTP request using WS-Security with
> > > camel-cxf & wss4j interceptor, I get the following error :
> > >
> > > org.apache.camel.spring.Main.main() INFO
> > > [org.apache.camel.spring.SpringCamelContext] - Total 1 routes, of
> which 1
> > > is started.
> > > org.apache.camel.spring.Main.main() INFO
> > > [org.apache.camel.spring.SpringCamelContext] - Apache Camel 2.10.0
> > > (CamelContext: camel-1) started in 0.993 seconds
> > > qtp370155726-26 INFO
> > >
> [org.apache.cxf.services.CustomerServiceService.CustomerServicePort.CustomerService]
> > > - Inbound Message
> > > 
> > > ID: 1
> > > Address: http://127.0.0.1:9090/training/WebService
> > > Encoding: UTF-8
> > > Http-Method: POST
> > > Content-Type: text/xml;charset=UTF-8
> > > Headers: {accept-encoding=[gzip,deflate], connection=[keep-alive],
> > > Content-Length=[1590], content-type=[text/xml;charset=UTF-8], Host=[
> > > 127.0.0.1:9090], SOAPAction=["
> http://training.fusesource.com/saveCustomer";],
> > > User-Agent=[Apache-HttpClient/4.1.1 (java 1.5)]}
> > > Payload: http://schemas.xmlsoap.org/soap/envelope/"; xmlns:tra="
> > > http://training.fusesource.com/";>
> > > 
> > > http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
> > > "
> > > soap:mustUnderstand="1">
> > > http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
> "
> > > xmlns:wsu="
> > >
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
> "
> > > wsu:Id="UsernameToken-1">
> > > charles
> > > http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest
> > > ">TVzWGxNvhlixNVWol8poD9DHxl8=
> > > http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary
> > > ">WsMNSm/C4dzdPS3OhUi94Q==
> > > 2013-01-09T15:46:14.908Z
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > ?
> > > 
> > > ?
> > > ?
> > > ?
> > > 
> > > ?
> > > 
> > > ?
> > > 
> > > ?
> > > 
> > > 
> > > 
> > > 
> > > --
> > > qtp370155726-26 DEBUG
> > > [org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor] -
> WSS4JInInterceptor:
> > > enter handleMessage

Re: Failing over in-flight exchanges

2013-01-10 Thread narita

Component/Node Event Logging Feature - Where in hook a Processor after every
component/node to log the message details (an efficient logging mechanism
can be in place File/DB/Mongo etc). This is how a savepoint/milestone can be
captured, so that on re-start (after crash), you have the intellignce(for DB
logging, essentially a query) for finding the messages to recover, from a
particular savepoint/milestone to replay to process it further. We have the
implementation in our product where in we log in to DB (using DataSource -
DBPool - C3P0). We are doing analysis for the feasibility of replacing DB
logging with MongoDB, though.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Failing-over-in-flight-exchanges-tp5725162p5725216.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Setting JMS header

2013-01-10 Thread narita
Apologies for the late reply. I realized the difference and hooked a
Processor to set the header prior to the JMSConsumer in the route, which
worked. Thanks again, Claus.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Setting-JMS-header-tp5723165p5725217.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel choice processor

2013-01-10 Thread Claus Ibsen
On Thu, Jan 10, 2013 at 9:10 AM, dhruv.sachdeva
 wrote:
> Hi ,
> I have to write a unit test case for myclass which routes a message to
> queues using choice processor and checking predicates such as when.
>

Okay good luck with writing that test.
Do you have any questions?


> Here is a code snippet:-
>
> from("direct:setMessageIdentifier").
> choice().
>
> when(ns.xpath("/cus:CustomerUpdateRoot")).setHeader("MessageIdentifier",ns.xpath("/cus:CustomerUpdateRoot/cus",String.class)).setHeader("MessageType",
> constant("Customer")).to("direct:applyIdempotent").
> 
> when(ns.xpath("/customer:some")).setHeader("BusinessKey",
> ns.xpath("/cust",String.class)).setHeader("MessageType",
> constant("Cust")).to("direct:applyIdempotent");
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-choice-processor-tp5725214.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Issue using camel-cxf and wss4j

2013-01-10 Thread Charles Moulliard
I don't find info about this dataFormat (CXF_MESSAGE) in CXF. Does it exist
?

On Thu, Jan 10, 2013 at 8:43 AM, Willem jiang wrote:

> CXF_MESSAGE




-- 
Charles Moulliard
Apache Committer / Sr. Enterprise Architect (RedHat)
Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com


Re: Issue using camel-cxf and wss4j

2013-01-10 Thread Claus Ibsen
On Thu, Jan 10, 2013 at 10:37 AM, Charles Moulliard  wrote:
> I don't find info about this dataFormat (CXF_MESSAGE) in CXF. Does it exist
> ?

Its in camel-cxf, and was recently added to it (eg within the last 6
months or so I think)

>
> On Thu, Jan 10, 2013 at 8:43 AM, Willem jiang wrote:
>
>> CXF_MESSAGE
>
>
>
>
> --
> Charles Moulliard
> Apache Committer / Sr. Enterprise Architect (RedHat)
> Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Issue using camel-cxf and wss4j

2013-01-10 Thread Charles Moulliard
That works now with this dataformat=CXF_MESSAGE when using Ws-Security &
wss4j. Thx.


On Thu, Jan 10, 2013 at 10:45 AM, Claus Ibsen  wrote:

> On Thu, Jan 10, 2013 at 10:37 AM, Charles Moulliard 
> wrote:
> > I don't find info about this dataFormat (CXF_MESSAGE) in CXF. Does it
> exist
> > ?
>
> Its in camel-cxf, and was recently added to it (eg within the last 6
> months or so I think)
>
> >
> > On Thu, Jan 10, 2013 at 8:43 AM, Willem jiang  >wrote:
> >
> >> CXF_MESSAGE
> >
> >
> >
> >
> > --
> > Charles Moulliard
> > Apache Committer / Sr. Enterprise Architect (RedHat)
> > Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
>
>
>
> --
> Claus Ibsen
> -
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: cib...@redhat.com
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>



-- 
Charles Moulliard
Apache Committer / Sr. Enterprise Architect (RedHat)
Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com


Re: Camel choice processor

2013-01-10 Thread Claus Ibsen
On Thu, Jan 10, 2013 at 10:29 AM, dhruv.sachdeva
 wrote:
> Yes.Actually it was correctly how to test that.
>

Hi

I suggest to read the docs at
http://camel.apache.org/testing

.. and the links from that page.

And then give it a try and see how far you get.



>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-choice-processor-tp5725214p5725219.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Issue using camel-cxf and wss4j

2013-01-10 Thread Claus Ibsen
On Thu, Jan 10, 2013 at 10:53 AM, Charles Moulliard  wrote:
> That works now with this dataformat=CXF_MESSAGE when using Ws-Security &
> wss4j. Thx.
>

Ah great.

Would someone with love for CXF and Camel mind helping with adding
docs about these new data formats
added to camel-cxf?

I dislike when people add important new stuff, that they dont take the
time to add docs about it.
For example is solves an important issue such as Charles having here.

There is a JIRA ticket about the missing pieces I added a while back,
when I encountered this the first time.
Sorry I am not the main maintainer of camel-cxf so I would like ppl
from the CXF side of things to help with the docs
as they are the best candidates for that.


>
> On Thu, Jan 10, 2013 at 10:45 AM, Claus Ibsen  wrote:
>
>> On Thu, Jan 10, 2013 at 10:37 AM, Charles Moulliard 
>> wrote:
>> > I don't find info about this dataFormat (CXF_MESSAGE) in CXF. Does it
>> exist
>> > ?
>>
>> Its in camel-cxf, and was recently added to it (eg within the last 6
>> months or so I think)
>>
>> >
>> > On Thu, Jan 10, 2013 at 8:43 AM, Willem jiang > >wrote:
>> >
>> >> CXF_MESSAGE
>> >
>> >
>> >
>> >
>> > --
>> > Charles Moulliard
>> > Apache Committer / Sr. Enterprise Architect (RedHat)
>> > Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
>>
>>
>>
>> --
>> Claus Ibsen
>> -
>> Red Hat, Inc.
>> FuseSource is now part of Red Hat
>> Email: cib...@redhat.com
>> Web: http://fusesource.com
>> Twitter: davsclaus
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen
>>
>
>
>
> --
> Charles Moulliard
> Apache Committer / Sr. Enterprise Architect (RedHat)
> Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Issue using camel-cxf and wss4j

2013-01-10 Thread Willem jiang
I can take care of the document. It looks like we need to do a clean up before 
release Camel 2.11.0.


--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
  http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem




On Thursday, January 10, 2013 at 6:04 PM, Claus Ibsen wrote:

> On Thu, Jan 10, 2013 at 10:53 AM, Charles Moulliard  (mailto:ch0...@gmail.com)> wrote:
> > That works now with this dataformat=CXF_MESSAGE when using Ws-Security &
> > wss4j. Thx.
>  
>  
>  
> Ah great.
>  
> Would someone with love for CXF and Camel mind helping with adding
> docs about these new data formats
> added to camel-cxf?
>  
> I dislike when people add important new stuff, that they dont take the
> time to add docs about it.
> For example is solves an important issue such as Charles having here.
>  
> There is a JIRA ticket about the missing pieces I added a while back,
> when I encountered this the first time.
> Sorry I am not the main maintainer of camel-cxf so I would like ppl
> from the CXF side of things to help with the docs
> as they are the best candidates for that.
>  
>  
> >  
> > On Thu, Jan 10, 2013 at 10:45 AM, Claus Ibsen  > (mailto:claus.ib...@gmail.com)> wrote:
> >  
> > > On Thu, Jan 10, 2013 at 10:37 AM, Charles Moulliard  > > (mailto:ch0...@gmail.com)>
> > > wrote:
> > > > I don't find info about this dataFormat (CXF_MESSAGE) in CXF. Does it
> > >  
> > >  
> > > exist
> > > > ?
> > >  
> > >  
> > >  
> > > Its in camel-cxf, and was recently added to it (eg within the last 6
> > > months or so I think)
> > >  
> > > >  
> > > > On Thu, Jan 10, 2013 at 8:43 AM, Willem jiang  > > > (mailto:willem.ji...@gmail.com)
> > > > wrote:
> > > >  
> > > > > CXF_MESSAGE
> > > >  
> > > >  
> > > >  
> > > >  
> > > > --
> > > > Charles Moulliard
> > > > Apache Committer / Sr. Enterprise Architect (RedHat)
> > > > Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
> > >  
> > >  
> > >  
> > >  
> > >  
> > > --
> > > Claus Ibsen
> > > -
> > > Red Hat, Inc.
> > > FuseSource is now part of Red Hat
> > > Email: cib...@redhat.com (mailto:cib...@redhat.com)
> > > Web: http://fusesource.com
> > > Twitter: davsclaus
> > > Blog: http://davsclaus.com
> > > Author of Camel in Action: http://www.manning.com/ibsen
> >  
> >  
> >  
> >  
> >  
> > --
> > Charles Moulliard
> > Apache Committer / Sr. Enterprise Architect (RedHat)
> > Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
>  
>  
>  
>  
>  
> --  
> Claus Ibsen
> -
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: cib...@redhat.com (mailto:cib...@redhat.com)
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen





onException does not kick in, redelivery does not work with TransactionErrorHandler

2013-01-10 Thread Lampis Flavio
Hello Camel users

I am new to this forum / mailing list.

We are experiencing problems in our project with the combination of onError and 
TransactionErrorHandler. Our set up is a bit complicated. I hope you read 
through anyway.

We want to distinguish between recoverable and nonrecoverable 
errors/exceptions. We want to decide in our code what's recoverable and what's 
not for any Exception that occurs.

This is the setup of our errorHandlers and onException definitions:

...

http://camel.apache.org/schema/spring";>
















java.lang.Exception





true






java.lang.Exception






...



We have transacted routes - jms and jpa. Therefore we have defined two 
TransactionErrorHandler with different transactionTemplates.
The first onException definition calls myErrorBean.isNonrecoverable() which 
returns true or false.
The second onException definition calls myErrorBean.isRecoverable(), which 
returns the opposite of isNonRecoverable.
I always expect one onException definition to kick in. And it ususally does 
e.g. for this test route:








myExceptionThrowingBean is a simple bean which I can configure: how many times 
to throw an exception, what exception to throw etc.

With the route optimisticLockMulticast I want to update one existing entity on 
a database with two different threads and cause an optimistic lock exception.





































The entity is merged in myUpdateBean. The framework is not able to commit both 
transactions as expected. That is a good thing, because this is the behaviour 
we are trying to test.
This is what I see in the log:

The first Transaction could be committed:
08:08:07.166 [Thread-7] DEBUG TransactionErrorHandler  -
Transaction commit (0x1fdbe17) redelivered(unknown) for (MessageId: 
ID-MOB10086289-62103-1357628876915-0-3 on ExchangeId: 
ID-MOB10086289-62103-1357628876915-0-1))

The second could not be committed:
08:08:07.166 [Thread-6] WARN  TransactionErrorHandler  -
Transaction rollback (0x1fdbe17) redelivered(unknown) for (MessageId: 
ID-MOB10086289-62103-1357628876915-0-3 on ExchangeId: 
ID-MOB10086289-62103-1357628876915-0-1)
caught: Object of class [com.mycompany.model.MyModelEntityClass] with 
identifier [103ace6d-19de-4dd4-b305-0716456e644f]: optimistic locking failed; 
nested exception is org.hibernate.StaleObjectStateException: Row was updated or 
deleted by another transaction (or unsaved-value mapping was incorrect): 
[com.mycompany.model.MyModelEntityClass#103ace6d-19de-4dd4-b305-0716456e644f]

And now at last we come to the problems: No redelivery occurs and no 
onException kicks in. The exchange seems to end here. In other scenarios it 
works.

In the documentation on http://camel.apache.org/error-handler.html:
"Exception Clause
Using Error Handler combined with Exception Clause is a very powerful 
combination. We encourage end-users to use this combination in your error 
handling strategies. See samples and Exception Clause."

But who is doing the rollback if an onException(MyTechnicalException) kicks in?

I hope I could make the problem clear and that someone might help. Thank you.

Kindest regards, Flavio

Freundliche Grüsse
Flavio Lampis
LIBSR

Zürcher Kantonalbank, Geschäftshaus Hard F
Briefadresse: Postfach, 8010 Zürich / www.zkb.ch

Sie drucken diese E-Mail nicht aus? Die Umwelt dankt!





Disclaimer :


Diese Mitteilung ist nur für die Empfängerin / den Empfänger bestimmt.

Für den Fall, dass sie von nichtberechtigten Personen empfangen wird, bitten 
wir diese höflich, die Mitteilung an die Zürcher Kantonalbank zurüc

Question camel cxf & CXF_MESSAGE

2013-01-10 Thread Charles Moulliard
Hi,

Why do I get this cast error message using CXF_MESSAGE as dataformat for my
camel cxf endpoint

Here is the SOAP enveloppe created by camel using SOAP Dataformat

qtp521246104-20 INFO [cxf-to-client] - >>> Response generated : 
http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns3="http://training.fusesource.com/";>



Fuse
FuseSource Office
38
7179.0
100.0
BUSINESS





But camel generates this error during call
of 
org.apache.camel.component.cxf.DefaultCxfBinding.populateCxfResponseFromExchange(DefaultCxfBinding.java:344)

qtp521246104-20 WARN [org.apache.cxf.phase.PhaseInterceptorChain] -
Interceptor for {
http://training.fusesource.com/}CustomerServiceService#{http://training.fusesource.com/}getCustomerByNamehas
thrown exception, unwinding now
java.lang.ClassCastException: [B cannot be cast to [Ljava.lang.Object;
at
org.apache.camel.component.cxf.DefaultCxfBinding.populateCxfResponseFromExchange(DefaultCxfBinding.java:344)
at
org.apache.camel.component.cxf.CxfConsumer$1.setResponseBack(CxfConsumer.java:180)
at
org.apache.camel.component.cxf.CxfConsumer$1.asyncInvoke(CxfConsumer.java:107)
at org.apache.camel.component.cxf.CxfConsumer$1.invoke(CxfConsumer.java:72)

Regards,

-- 
Charles Moulliard
Apache Committer / Sr. Enterprise Architect (RedHat)
Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com


Re: Issue using camel-cxf and wss4j

2013-01-10 Thread Charles Moulliard
Willem,

That could be nice to create in camel cxf page doc a table describing for
each DataFormat if we keep or skip headers and what is changed according to
CXF interceptors (out and in) ...

MESSAGE should be also marked as DEPRECATED now as it is replaces by RAW

Regards,

Charles


On Thu, Jan 10, 2013 at 11:09 AM, Willem jiang wrote:

> I can take care of the document. It looks like we need to do a clean up
> before release Camel 2.11.0.
>
>
> --
> Willem Jiang
>
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Web: http://www.fusesource.com | http://www.redhat.com
> Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/)
> (English)
>   http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
> Twitter: willemjiang
> Weibo: 姜宁willem
>
>
>
>
> On Thursday, January 10, 2013 at 6:04 PM, Claus Ibsen wrote:
>
> > On Thu, Jan 10, 2013 at 10:53 AM, Charles Moulliard 
> >  ch0...@gmail.com)> wrote:
> > > That works now with this dataformat=CXF_MESSAGE when using Ws-Security
> &
> > > wss4j. Thx.
> >
> >
> >
> > Ah great.
> >
> > Would someone with love for CXF and Camel mind helping with adding
> > docs about these new data formats
> > added to camel-cxf?
> >
> > I dislike when people add important new stuff, that they dont take the
> > time to add docs about it.
> > For example is solves an important issue such as Charles having here.
> >
> > There is a JIRA ticket about the missing pieces I added a while back,
> > when I encountered this the first time.
> > Sorry I am not the main maintainer of camel-cxf so I would like ppl
> > from the CXF side of things to help with the docs
> > as they are the best candidates for that.
> >
> >
> > >
> > > On Thu, Jan 10, 2013 at 10:45 AM, Claus Ibsen 
> > >  claus.ib...@gmail.com)> wrote:
> > >
> > > > On Thu, Jan 10, 2013 at 10:37 AM, Charles Moulliard <
> ch0...@gmail.com (mailto:ch0...@gmail.com)>
> > > > wrote:
> > > > > I don't find info about this dataFormat (CXF_MESSAGE) in CXF. Does
> it
> > > >
> > > >
> > > > exist
> > > > > ?
> > > >
> > > >
> > > >
> > > > Its in camel-cxf, and was recently added to it (eg within the last 6
> > > > months or so I think)
> > > >
> > > > >
> > > > > On Thu, Jan 10, 2013 at 8:43 AM, Willem jiang <
> willem.ji...@gmail.com (mailto:willem.ji...@gmail.com)
> > > > > wrote:
> > > > >
> > > > > > CXF_MESSAGE
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Charles Moulliard
> > > > > Apache Committer / Sr. Enterprise Architect (RedHat)
> > > > > Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Claus Ibsen
> > > > -
> > > > Red Hat, Inc.
> > > > FuseSource is now part of Red Hat
> > > > Email: cib...@redhat.com (mailto:cib...@redhat.com)
> > > > Web: http://fusesource.com
> > > > Twitter: davsclaus
> > > > Blog: http://davsclaus.com
> > > > Author of Camel in Action: http://www.manning.com/ibsen
> > >
> > >
> > >
> > >
> > >
> > > --
> > > Charles Moulliard
> > > Apache Committer / Sr. Enterprise Architect (RedHat)
> > > Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
> >
> >
> >
> >
> >
> > --
> > Claus Ibsen
> > -
> > Red Hat, Inc.
> > FuseSource is now part of Red Hat
> > Email: cib...@redhat.com (mailto:cib...@redhat.com)
> > Web: http://fusesource.com
> > Twitter: davsclaus
> > Blog: http://davsclaus.com
> > Author of Camel in Action: http://www.manning.com/ibsen
>
>
>
>


-- 
Charles Moulliard
Apache Committer / Sr. Enterprise Architect (RedHat)
Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com


Re: onException does not kick in, redelivery does not work with TransactionErrorHandler

2013-01-10 Thread Claus Ibsen
Hi

What Camel version do you use?
And have you tried with a newer release?



On Thu, Jan 10, 2013 at 11:27 AM, Lampis Flavio  wrote:
> Hello Camel users
>
> I am new to this forum / mailing list.
>
> We are experiencing problems in our project with the combination of onError 
> and TransactionErrorHandler. Our set up is a bit complicated. I hope you read 
> through anyway.
>
> We want to distinguish between recoverable and nonrecoverable 
> errors/exceptions. We want to decide in our code what's recoverable and 
> what's not for any Exception that occurs.
>
> This is the setup of our errorHandlers and onException definitions:
>
> ...
>
>  xmlns="http://camel.apache.org/schema/spring";>
>
>  transactionTemplateRef="jmsTransactionTemplate">
>  maximumRedeliveries="-1" 
> retryAttemptedLogLevel="WARN" />
> 
>
>
>  transactionTemplateRef="jpaTransactionTemplate">
>  maximumRedeliveries="-1" 
> retryAttemptedLogLevel="WARN" />
> 
>
>
> 
>
> 
>
> 
> java.lang.Exception
> 
>  bean="myErrorBean"
> method="isNonrecoverable" />
> 
> 
> 
> true
> 
>
> 
> 
>
>  onRedeliveryRef="myRecoverableErrorProcessor">
> java.lang.Exception
> 
>  method="isRecoverable" />
> 
>  redeliveryDelay="2000" logStackTrace="false" 
> retryAttemptedLogLevel="WARN"
> backOffMultiplier="2" 
> useExponentialBackOff="true" />
> 
>
> ...
>
> 
>
> We have transacted routes - jms and jpa. Therefore we have defined two 
> TransactionErrorHandler with different transactionTemplates.
> The first onException definition calls myErrorBean.isNonrecoverable() which 
> returns true or false.
> The second onException definition calls myErrorBean.isRecoverable(), which 
> returns the opposite of isNonRecoverable.
> I always expect one onException definition to kick in. And it ususally does 
> e.g. for this test route:
>
>  errorHandlerRef="eh_jms">
>  
> uri="jms:queue:{{routes.general.queue.1}}?selector=someSelector" />
> 
>  uri="bean:myExceptionThrowingBean?method=throwException" />
> 
> 
>
> myExceptionThrowingBean is a simple bean which I can configure: how many 
> times to throw an exception, what exception to throw etc.
>
> With the route optimisticLockMulticast I want to update one existing entity 
> on a database with two different threads and cause an optimistic lock 
> exception.
>
> 
> 
> 
> 
> 
> 
> 
> 
>
> 
> 
> 
> 
> 
> 
> 
>
> 
> 
> 
> 
> 
> 
> 
>
> 
> 
> 
> 
>
> 
> 
> 
> 
>
>
> The entity is merged in myUpdateBean. The framework is not able to commit 
> both transactions as expected. That is a good thing, because this is the 
> behaviour we are trying to test.
> This is what I see in the log:
>
> The first Transaction could be committed:
> 08:08:07.166 [Thread-7] DEBUG TransactionErrorHandler  -
> Transaction commit (0x1fdbe17) redelivered(unknown) for (MessageId: 
> ID-MOB10086289-62103-1357628876915-0-3 on ExchangeId: 
> ID-MOB10086289-62103-1357628876915-0-1))
>
> The second could not be committed:
> 08:08:07.166 [Thread-6] WARN  TransactionErrorHandler  -
> Transaction rollback (0x1fdbe17) redelivered(unknown) for (MessageId: 
> ID-MOB10086289-62103-1357628876915-0-3 on ExchangeId: 
> ID-MOB10086289-62103-1357628876915-0-1)
> caught: Object of class [com.mycompany.model.MyModelEntityClass] with 
> identifier [103ace6d-19de-4dd4-b305-0716456e644f]: optimistic locki

Re: Question camel cxf & CXF_MESSAGE

2013-01-10 Thread Babak Vahdat
Hi

Don't know much about CXF itself but this is more than obvious as the code
(DefaultCxfBinding line 344) is buggy because one can not simply cast an
array of *primitive* type ("[B" means array of byte) to Object[] which is an
array of *reference* type!

You would get the same stack trace if you would try to run the crappy code
below: 

public static void main(String[] args) {
byte[] bytes = new byte[] {3, 4};

if (bytes.getClass().isArray()) {
System.out.println("yes it's an array BUT of the primitive
type!");
Object array = bytes;
Object[] casted = (Object[]) array; // BOOM
}
}

Babak




--
View this message in context: 
http://camel.465427.n5.nabble.com/Question-camel-cxf-CXF-MESSAGE-tp5725227p5725230.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Question camel cxf & CXF_MESSAGE

2013-01-10 Thread Claus Ibsen
On Thu, Jan 10, 2013 at 11:54 AM, Babak Vahdat
 wrote:
> Hi
>
> Don't know much about CXF itself but this is more than obvious as the code
> (DefaultCxfBinding line 344) is buggy because one can not simply cast an
> array of *primitive* type ("[B" means array of byte) to Object[] which is an
> array of *reference* type!
>
> You would get the same stack trace if you would try to run the crappy code
> below:
>
> public static void main(String[] args) {
> byte[] bytes = new byte[] {3, 4};
>
> if (bytes.getClass().isArray()) {
> System.out.println("yes it's an array BUT of the primitive
> type!");
> Object array = bytes;
> Object[] casted = (Object[]) array; // BOOM
> }
> }
>

Yes there is some code in ObjectHelper or one of the helper/util
classes in the util package
that can check for array and primitives.

And better yet there is an iterator that can deal with that too.
So can can more safely grab the data.


> Babak
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Question-camel-cxf-CXF-MESSAGE-tp5725227p5725230.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Question camel cxf & CXF_MESSAGE

2013-01-10 Thread Charles Moulliard
Should we raise a ticket to solve this issue ?


On Thu, Jan 10, 2013 at 12:04 PM, Claus Ibsen  wrote:

> On Thu, Jan 10, 2013 at 11:54 AM, Babak Vahdat
>  wrote:
> > Hi
> >
> > Don't know much about CXF itself but this is more than obvious as the
> code
> > (DefaultCxfBinding line 344) is buggy because one can not simply cast an
> > array of *primitive* type ("[B" means array of byte) to Object[] which
> is an
> > array of *reference* type!
> >
> > You would get the same stack trace if you would try to run the crappy
> code
> > below:
> >
> > public static void main(String[] args) {
> > byte[] bytes = new byte[] {3, 4};
> >
> > if (bytes.getClass().isArray()) {
> > System.out.println("yes it's an array BUT of the primitive
> > type!");
> > Object array = bytes;
> > Object[] casted = (Object[]) array; // BOOM
> > }
> > }
> >
>
> Yes there is some code in ObjectHelper or one of the helper/util
> classes in the util package
> that can check for array and primitives.
>
> And better yet there is an iterator that can deal with that too.
> So can can more safely grab the data.
>
>
> > Babak
> >
> >
> >
> >
> > --
> > View this message in context:
> http://camel.465427.n5.nabble.com/Question-camel-cxf-CXF-MESSAGE-tp5725227p5725230.html
> > Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: cib...@redhat.com
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>



-- 
Charles Moulliard
Apache Committer / Sr. Enterprise Architect (RedHat)
Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com


Re: Question camel cxf & CXF_MESSAGE

2013-01-10 Thread Claus Ibsen
On Thu, Jan 10, 2013 at 12:24 PM, Charles Moulliard  wrote:
> Should we raise a ticket to solve this issue ?
>

Yeah the class cast exception should not happen. Its a bug in camel-cxf.


>
> On Thu, Jan 10, 2013 at 12:04 PM, Claus Ibsen  wrote:
>
>> On Thu, Jan 10, 2013 at 11:54 AM, Babak Vahdat
>>  wrote:
>> > Hi
>> >
>> > Don't know much about CXF itself but this is more than obvious as the
>> code
>> > (DefaultCxfBinding line 344) is buggy because one can not simply cast an
>> > array of *primitive* type ("[B" means array of byte) to Object[] which
>> is an
>> > array of *reference* type!
>> >
>> > You would get the same stack trace if you would try to run the crappy
>> code
>> > below:
>> >
>> > public static void main(String[] args) {
>> > byte[] bytes = new byte[] {3, 4};
>> >
>> > if (bytes.getClass().isArray()) {
>> > System.out.println("yes it's an array BUT of the primitive
>> > type!");
>> > Object array = bytes;
>> > Object[] casted = (Object[]) array; // BOOM
>> > }
>> > }
>> >
>>
>> Yes there is some code in ObjectHelper or one of the helper/util
>> classes in the util package
>> that can check for array and primitives.
>>
>> And better yet there is an iterator that can deal with that too.
>> So can can more safely grab the data.
>>
>>
>> > Babak
>> >
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> http://camel.465427.n5.nabble.com/Question-camel-cxf-CXF-MESSAGE-tp5725227p5725230.html
>> > Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>>
>> --
>> Claus Ibsen
>> -
>> Red Hat, Inc.
>> FuseSource is now part of Red Hat
>> Email: cib...@redhat.com
>> Web: http://fusesource.com
>> Twitter: davsclaus
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen
>>
>
>
>
> --
> Charles Moulliard
> Apache Committer / Sr. Enterprise Architect (RedHat)
> Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: How to build an outgoing tcp connection gateway that consumes messages?

2013-01-10 Thread Andrea Tarocchi
One option is using camel-mina component: http://camel.apache.org/mina.html
andr, if necessary, writing your own custom codec.


On Thu, Jan 10, 2013 at 11:59 AM, ggalka  wrote:

> Hi,
>
> what do you think, what would be the best/quickest way to implement tcp
> client message consumer in current Camel version ?
>
> Best regards,
> Grzegorz
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/How-to-build-an-outgoing-tcp-connection-gateway-that-consumes-messages-tp5724102p5725231.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
"In a world without walls and fences who needs Windows and Gates?"


Re: Question camel cxf & CXF_MESSAGE

2013-01-10 Thread Babak Vahdat
Claus

unfortunatly the iterator being returned there has got exactly the same bug
marked with a TODO!

See ObjectHelper lines 516..519

} else if (value.getClass().isArray()) {
// TODO we should handle primitive array types?
List list = Arrays.asList((Object[])value);
return list.iterator();

IMHO a possible solution would be to grap into the array content (e.g.
array[0] if it's size > 0) and check for e.g.:

  (array[0] != null && array[0].getClass().isPrimitive())

Or something like that, e.g. byte.class.isPrimitive() returns true.

Babak


Claus Ibsen-2 wrote
> On Thu, Jan 10, 2013 at 11:54 AM, Babak Vahdat
> <

> babak.vahdat@

> > wrote:
>> Hi
>>
>> Don't know much about CXF itself but this is more than obvious as the
>> code
>> (DefaultCxfBinding line 344) is buggy because one can not simply cast an
>> array of *primitive* type ("[B" means array of byte) to Object[] which is
>> an
>> array of *reference* type!
>>
>> You would get the same stack trace if you would try to run the crappy
>> code
>> below:
>>
>> public static void main(String[] args) {
>> byte[] bytes = new byte[] {3, 4};
>>
>> if (bytes.getClass().isArray()) {
>> System.out.println("yes it's an array BUT of the primitive
>> type!");
>> Object array = bytes;
>> Object[] casted = (Object[]) array; // BOOM
>> }
>> }
>>
> 
> Yes there is some code in ObjectHelper or one of the helper/util
> classes in the util package
> that can check for array and primitives.
> 
> And better yet there is an iterator that can deal with that too.
> So can can more safely grab the data.
> 
> 
>> Babak
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://camel.465427.n5.nabble.com/Question-camel-cxf-CXF-MESSAGE-tp5725227p5725230.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
> 
> 
> 
> -- 
> Claus Ibsen
> -
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: 

> cibsen@

> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen





--
View this message in context: 
http://camel.465427.n5.nabble.com/Question-camel-cxf-CXF-MESSAGE-tp5725227p5725245.html
Sent from the Camel - Users mailing list archive at Nabble.com.


AW: onException does not kick in, redelivery does not work with TransactionErrorHandler

2013-01-10 Thread Lampis Flavio
Hi Claus

We're using these Versions

Camel: 2.10.3
Spring: 3.0.7.RELEASE

Kind regards, Flavio

Freundliche Grüsse
Flavio Lampis
LIBSR

Sie drucken diese E-Mail nicht aus? Die Umwelt dankt!


-Ursprüngliche Nachricht-
Von: Claus Ibsen [mailto:claus.ib...@gmail.com]
Gesendet: Donnerstag, 10. Januar 2013 11:48
An: users@camel.apache.org
Betreff: Re: onException does not kick in, redelivery does not work with 
TransactionErrorHandler

Hi

What Camel version do you use?
And have you tried with a newer release?



On Thu, Jan 10, 2013 at 11:27 AM, Lampis Flavio  wrote:
> Hello Camel users
>
> I am new to this forum / mailing list.
>
> We are experiencing problems in our project with the combination of onError 
> and TransactionErrorHandler. Our set up is a bit complicated. I hope you read 
> through anyway.
>
> We want to distinguish between recoverable and nonrecoverable 
> errors/exceptions. We want to decide in our code what's recoverable and 
> what's not for any Exception that occurs.
>
> This is the setup of our errorHandlers and onException definitions:
>
> ...
>
>  xmlns="http://camel.apache.org/schema/spring";>
>
>  transactionTemplateRef="jmsTransactionTemplate">
>  maximumRedeliveries="-1" 
> retryAttemptedLogLevel="WARN" />
> 
>
>
>  transactionTemplateRef="jpaTransactionTemplate">
>  maximumRedeliveries="-1" 
> retryAttemptedLogLevel="WARN" />
> 
>
>
> 
>
>  />
>
> 
> java.lang.Exception
> 
>  bean="myErrorBean"
> method="isNonrecoverable" />
> 
> 
> 
> true
> 
>
> 
> 
>
>  onRedeliveryRef="myRecoverableErrorProcessor">
> java.lang.Exception
> 
>  method="isRecoverable" />
> 
>  redeliveryDelay="2000" logStackTrace="false" 
> retryAttemptedLogLevel="WARN"
> backOffMultiplier="2" 
> useExponentialBackOff="true" />
> 
>
> ...
>
> 
>
> We have transacted routes - jms and jpa. Therefore we have defined two 
> TransactionErrorHandler with different transactionTemplates.
> The first onException definition calls myErrorBean.isNonrecoverable() which 
> returns true or false.
> The second onException definition calls myErrorBean.isRecoverable(), which 
> returns the opposite of isNonRecoverable.
> I always expect one onException definition to kick in. And it ususally does 
> e.g. for this test route:
>
>  errorHandlerRef="eh_jms">
>  
> uri="jms:queue:{{routes.general.queue.1}}?selector=someSelector" />
> 
>  uri="bean:myExceptionThrowingBean?method=throwException" />
> 
> 
>
> myExceptionThrowingBean is a simple bean which I can configure: how many 
> times to throw an exception, what exception to throw etc.
>
> With the route optimisticLockMulticast I want to update one existing entity 
> on a database with two different threads and cause an optimistic lock 
> exception.
>
> 
> 
> 
> 
> 
> 
> 
> 
>
> 
> 
> 
> 
> 
> 
> 
>
> 
> 
> 
> 
> 
> 
> 
>
> 
> 
> 
> 
>
> 
> 
> 
> 
>
>
> The entity is merged in myUpdateBean. The framework is not able to commit 
> both transactions as expected. That is a good thing, because this is the 
> behaviour we are trying to test.
> This is what I see in the log:
>
> The first Transaction could be committed:
> 08:08:07.166 [Thread-7] DEBUG TransactionErrorHandler  - Transaction
> commit (0x1fdbe17) redelivered(unknown) for (MessageId:
> ID-MOB10086289-62103-1357628876915-0-3 on ExchangeId:
> ID-MOB1

Re: Question camel cxf & CXF_MESSAGE

2013-01-10 Thread Babak Vahdat
I logged a ticket for ObjectHelper:

https://issues.apache.org/jira/browse/CAMEL-5948

Babak


Babak Vahdat wrote
> Claus
> 
> unfortunatly the iterator being returned there has got exactly the same
> bug marked with a TODO!
> 
> See ObjectHelper lines 516..519
> 
> } else if (value.getClass().isArray()) {
> // TODO we should handle primitive array types?
> List

>  list = Arrays.asList((Object[])value);
> return list.iterator();
> 
> IMHO a possible solution would be to grap into the array content (e.g.
> array[0] if it's size > 0) and check for e.g.:
> 
>   (array[0] != null && array[0].getClass().isPrimitive())
> 
> Or something like that, e.g. byte.class.isPrimitive() returns true.
> 
> Babak
> Claus Ibsen-2 wrote
>> On Thu, Jan 10, 2013 at 11:54 AM, Babak Vahdat
>> <

>> babak.vahdat@

>> > wrote:
>>> Hi
>>>
>>> Don't know much about CXF itself but this is more than obvious as the
>>> code
>>> (DefaultCxfBinding line 344) is buggy because one can not simply cast an
>>> array of *primitive* type ("[B" means array of byte) to Object[] which
>>> is an
>>> array of *reference* type!
>>>
>>> You would get the same stack trace if you would try to run the crappy
>>> code
>>> below:
>>>
>>> public static void main(String[] args) {
>>> byte[] bytes = new byte[] {3, 4};
>>>
>>> if (bytes.getClass().isArray()) {
>>> System.out.println("yes it's an array BUT of the primitive
>>> type!");
>>> Object array = bytes;
>>> Object[] casted = (Object[]) array; // BOOM
>>> }
>>> }
>>>
>> 
>> Yes there is some code in ObjectHelper or one of the helper/util
>> classes in the util package
>> that can check for array and primitives.
>> 
>> And better yet there is an iterator that can deal with that too.
>> So can can more safely grab the data.
>> 
>> 
>>> Babak
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://camel.465427.n5.nabble.com/Question-camel-cxf-CXF-MESSAGE-tp5725227p5725230.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>> 
>> 
>> 
>> -- 
>> Claus Ibsen
>> -
>> Red Hat, Inc.
>> FuseSource is now part of Red Hat
>> Email: 

>> cibsen@

>> Web: http://fusesource.com
>> Twitter: davsclaus
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen





--
View this message in context: 
http://camel.465427.n5.nabble.com/Question-camel-cxf-CXF-MESSAGE-tp5725227p5725251.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: onException does not kick in, redelivery does not work with TransactionErrorHandler

2013-01-10 Thread Claus Ibsen
On Thu, Jan 10, 2013 at 12:49 PM, Lampis Flavio  wrote:
> Hi Claus
>
> We're using these Versions
>
> Camel: 2.10.3
> Spring: 3.0.7.RELEASE

I think we fixed something related to context scoped onException.
Can you try defining them per route, instead of context scoped, as a workaround.

And you are welcome to test with the 2.10-SNAPSHOT or 2.11-SNAPSHOT.



>
> Kind regards, Flavio
>
> Freundliche Grüsse
> Flavio Lampis
> LIBSR
>
> Sie drucken diese E-Mail nicht aus? Die Umwelt dankt!
>
>
> -Ursprüngliche Nachricht-
> Von: Claus Ibsen [mailto:claus.ib...@gmail.com]
> Gesendet: Donnerstag, 10. Januar 2013 11:48
> An: users@camel.apache.org
> Betreff: Re: onException does not kick in, redelivery does not work with 
> TransactionErrorHandler
>
> Hi
>
> What Camel version do you use?
> And have you tried with a newer release?
>
>
>
> On Thu, Jan 10, 2013 at 11:27 AM, Lampis Flavio  wrote:
>> Hello Camel users
>>
>> I am new to this forum / mailing list.
>>
>> We are experiencing problems in our project with the combination of onError 
>> and TransactionErrorHandler. Our set up is a bit complicated. I hope you 
>> read through anyway.
>>
>> We want to distinguish between recoverable and nonrecoverable 
>> errors/exceptions. We want to decide in our code what's recoverable and 
>> what's not for any Exception that occurs.
>>
>> This is the setup of our errorHandlers and onException definitions:
>>
>> ...
>>
>> > xmlns="http://camel.apache.org/schema/spring";>
>>
>> > transactionTemplateRef="jmsTransactionTemplate">
>> > maximumRedeliveries="-1" 
>> retryAttemptedLogLevel="WARN" />
>> 
>>
>>
>> > transactionTemplateRef="jpaTransactionTemplate">
>> > maximumRedeliveries="-1" 
>> retryAttemptedLogLevel="WARN" />
>> 
>>
>>
>> 
>>
>> > />
>>
>> 
>> java.lang.Exception
>> 
>> > bean="myErrorBean"
>> method="isNonrecoverable" />
>> 
>> 
>> 
>> true
>> 
>>
>> 
>> 
>>
>> > onRedeliveryRef="myRecoverableErrorProcessor">
>> java.lang.Exception
>> 
>> > method="isRecoverable" />
>> 
>> > redeliveryDelay="2000" logStackTrace="false" 
>> retryAttemptedLogLevel="WARN"
>> backOffMultiplier="2" 
>> useExponentialBackOff="true" />
>> 
>>
>> ...
>>
>> 
>>
>> We have transacted routes - jms and jpa. Therefore we have defined two 
>> TransactionErrorHandler with different transactionTemplates.
>> The first onException definition calls myErrorBean.isNonrecoverable() which 
>> returns true or false.
>> The second onException definition calls myErrorBean.isRecoverable(), which 
>> returns the opposite of isNonRecoverable.
>> I always expect one onException definition to kick in. And it ususally does 
>> e.g. for this test route:
>>
>> > errorHandlerRef="eh_jms">
>> > 
>> uri="jms:queue:{{routes.general.queue.1}}?selector=someSelector" />
>> 
>> > uri="bean:myExceptionThrowingBean?method=throwException" />
>> 
>> 
>>
>> myExceptionThrowingBean is a simple bean which I can configure: how many 
>> times to throw an exception, what exception to throw etc.
>>
>> With the route optimisticLockMulticast I want to update one existing entity 
>> on a database with two different threads and cause an optimistic lock 
>> exception.
>>
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> 
>> 
>> 
>> 
>>
>> 
>> 
>> 
>> 
>>
>

camel 2.10 & Spring 3.0.7 issue on Karaf 2.3.0

2013-01-10 Thread Charles Moulliard
Hi,

When I deploy a camel project as a bundle on Karaf 2.3.0, Spring generates
the following error that I don't really understand as classes are well
packaged in the bundle

2013-01-10 13:04:26,204 | ERROR | ExtenderThread-2 | ContextLoaderListener
   | ?   ? | 235 -
org.springframework.osgi.extender - 1.2.1 | Application context refresh
failed (OsgiBundleXmlApplicationContext(bundle=camel-exercises-webservice,
config=osgibundle:/META-INF/spring/*.xml))
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'enrich' defined in URL
[bundle://311.0:0/META-INF/spring/CamelContext.xml]: Instantiation of bean
failed; nested exception is
org.springframework.beans.BeanInstantiationException: Could not instantiate
bean class [com.fusesource.training.camel.Enrich]: Constructor threw
exception; nested exception is java.lang.Error: Unresolved compilation
problems:
Customer cannot be resolved to a type
Customer cannot be resolved to a type
SaveCustomer cannot be resolved to a type
Customer cannot be resolved to a type
Customer cannot be resolved to a type
CustomerType cannot be resolved to a variable
SaveCustomer cannot be resolved to a type
SaveCustomer cannot be resolved to a type
GetAllCustomersResponse cannot be resolved to a type
GetAllCustomersResponse cannot be resolved to a type
GetAllCustomersResponse cannot be resolved to a type

Code has been compiled usin maven 3.0.2 / JDK 1.6 and server runs using JDK
1.6

Regards,

-- 
Charles Moulliard
Apache Committer / Sr. Enterprise Architect (RedHat)
Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com


Re: camel 2.10 & Spring 3.0.7 issue on Karaf 2.3.0

2013-01-10 Thread Claus Ibsen
Hi

You would need Camel 2.11 to run on Karaf 2.3.x.

Camel 2.10 does not support it to well. As its tied to Aries 0.3, and OSGi 4.2.
Where as Karaf is Aries 1.0, and OSGi 4.3 etc.



On Thu, Jan 10, 2013 at 1:13 PM, Charles Moulliard  wrote:
> Hi,
>
> When I deploy a camel project as a bundle on Karaf 2.3.0, Spring generates
> the following error that I don't really understand as classes are well
> packaged in the bundle
>
> 2013-01-10 13:04:26,204 | ERROR | ExtenderThread-2 | ContextLoaderListener
>| ?   ? | 235 -
> org.springframework.osgi.extender - 1.2.1 | Application context refresh
> failed (OsgiBundleXmlApplicationContext(bundle=camel-exercises-webservice,
> config=osgibundle:/META-INF/spring/*.xml))
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'enrich' defined in URL
> [bundle://311.0:0/META-INF/spring/CamelContext.xml]: Instantiation of bean
> failed; nested exception is
> org.springframework.beans.BeanInstantiationException: Could not instantiate
> bean class [com.fusesource.training.camel.Enrich]: Constructor threw
> exception; nested exception is java.lang.Error: Unresolved compilation
> problems:
> Customer cannot be resolved to a type
> Customer cannot be resolved to a type
> SaveCustomer cannot be resolved to a type
> Customer cannot be resolved to a type
> Customer cannot be resolved to a type
> CustomerType cannot be resolved to a variable
> SaveCustomer cannot be resolved to a type
> SaveCustomer cannot be resolved to a type
> GetAllCustomersResponse cannot be resolved to a type
> GetAllCustomersResponse cannot be resolved to a type
> GetAllCustomersResponse cannot be resolved to a type
>
> Code has been compiled usin maven 3.0.2 / JDK 1.6 and server runs using JDK
> 1.6
>
> Regards,
>
> --
> Charles Moulliard
> Apache Committer / Sr. Enterprise Architect (RedHat)
> Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: camel 2.10 & Spring 3.0.7 issue on Karaf 2.3.0

2013-01-10 Thread Charles Moulliard
Claus,

I'm using Fuse ESB 7 and create a container using Fabric -->

FuseESB:karaf@fuse-aviva> info
Karaf
  Karaf version   2.3.0.fuse-71-047
  Karaf home
 /Users/chmoulli/Fuse/servers/fuse-esb-7.1.0.fuse-047
  Karaf base
 /Users/chmoulli/Fuse/servers/fuse-esb-7.1.0.fuse-047
  OSGi Framework  org.apache.felix.framework - 4.0.3.fuse-71-047

[ 234] [Active ] [Created ] [   ] [   60] camel-blueprint
(2.10.0.fuse-71-047)
[ 240] [Active ] [] [   ] [   60] camel-core
(2.10.0.fuse-71-047)
[ 243] [Active ] [] [   ] [   60] camel-spring
(2.10.0.fuse-71-047)
[ 247] [Active ] [Created ] [   ] [   60] camel-karaf-commands
(2.10.0.fuse-71-047)
[ 286] [Active ] [Created ] [   ] [   60] camel-cxf
(2.10.0.fuse-71-047)

[ 242] [Active ] [] [   ] [   60] Spring Context
(3.0.7.RELEASE)

[ 245] [Active ] [] [   ] [   60] spring-osgi-core
(1.2.1)
[ 246] [Active ] [] [   ] [   60] spring-osgi-io (1.2.1)

So if camel 2.10 does not work fine with karaf 2.3. Why have we package
like that ?

Regards,

Charles


On Thu, Jan 10, 2013 at 1:16 PM, Claus Ibsen  wrote:

> Hi
>
> You would need Camel 2.11 to run on Karaf 2.3.x.
>
> Camel 2.10 does not support it to well. As its tied to Aries 0.3, and OSGi
> 4.2.
> Where as Karaf is Aries 1.0, and OSGi 4.3 etc.
>
>
>
> On Thu, Jan 10, 2013 at 1:13 PM, Charles Moulliard 
> wrote:
> > Hi,
> >
> > When I deploy a camel project as a bundle on Karaf 2.3.0, Spring
> generates
> > the following error that I don't really understand as classes are well
> > packaged in the bundle
> >
> > 2013-01-10 13:04:26,204 | ERROR | ExtenderThread-2 |
> ContextLoaderListener
> >| ?   ? | 235 -
> > org.springframework.osgi.extender - 1.2.1 | Application context refresh
> > failed
> (OsgiBundleXmlApplicationContext(bundle=camel-exercises-webservice,
> > config=osgibundle:/META-INF/spring/*.xml))
> > org.springframework.beans.factory.BeanCreationException: Error creating
> > bean with name 'enrich' defined in URL
> > [bundle://311.0:0/META-INF/spring/CamelContext.xml]: Instantiation of
> bean
> > failed; nested exception is
> > org.springframework.beans.BeanInstantiationException: Could not
> instantiate
> > bean class [com.fusesource.training.camel.Enrich]: Constructor threw
> > exception; nested exception is java.lang.Error: Unresolved compilation
> > problems:
> > Customer cannot be resolved to a type
> > Customer cannot be resolved to a type
> > SaveCustomer cannot be resolved to a type
> > Customer cannot be resolved to a type
> > Customer cannot be resolved to a type
> > CustomerType cannot be resolved to a variable
> > SaveCustomer cannot be resolved to a type
> > SaveCustomer cannot be resolved to a type
> > GetAllCustomersResponse cannot be resolved to a type
> > GetAllCustomersResponse cannot be resolved to a type
> > GetAllCustomersResponse cannot be resolved to a type
> >
> > Code has been compiled usin maven 3.0.2 / JDK 1.6 and server runs using
> JDK
> > 1.6
> >
> > Regards,
> >
> > --
> > Charles Moulliard
> > Apache Committer / Sr. Enterprise Architect (RedHat)
> > Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
>
>
>
> --
> Claus Ibsen
> -
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: cib...@redhat.com
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>



-- 
Charles Moulliard
Apache Committer / Sr. Enterprise Architect (RedHat)
Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com


Re: camel 2.10 & Spring 3.0.7 issue on Karaf 2.3.0

2013-01-10 Thread Claus Ibsen
On Thu, Jan 10, 2013 at 1:21 PM, Charles Moulliard  wrote:
> Claus,
>
> I'm using Fuse ESB 7 and create a container using Fabric -->
>
> FuseESB:karaf@fuse-aviva> info
> Karaf
>   Karaf version   2.3.0.fuse-71-047
>   Karaf home
>  /Users/chmoulli/Fuse/servers/fuse-esb-7.1.0.fuse-047
>   Karaf base
>  /Users/chmoulli/Fuse/servers/fuse-esb-7.1.0.fuse-047
>   OSGi Framework  org.apache.felix.framework - 4.0.3.fuse-71-047
>
> [ 234] [Active ] [Created ] [   ] [   60] camel-blueprint
> (2.10.0.fuse-71-047)
> [ 240] [Active ] [] [   ] [   60] camel-core
> (2.10.0.fuse-71-047)
> [ 243] [Active ] [] [   ] [   60] camel-spring
> (2.10.0.fuse-71-047)
> [ 247] [Active ] [Created ] [   ] [   60] camel-karaf-commands
> (2.10.0.fuse-71-047)
> [ 286] [Active ] [Created ] [   ] [   60] camel-cxf
> (2.10.0.fuse-71-047)
>
> [ 242] [Active ] [] [   ] [   60] Spring Context
> (3.0.7.RELEASE)
>
> [ 245] [Active ] [] [   ] [   60] spring-osgi-core
> (1.2.1)
> [ 246] [Active ] [] [   ] [   60] spring-osgi-io (1.2.1)
>
> So if camel 2.10 does not work fine with karaf 2.3. Why have we package
> like that ?
>

Use the fuse forums for talking about fuse.
Or make it clear from the very start that you are using Fuse, when you
talk on the *Apache* forums.

When you say Camel 2.10, I assume you use Apache Camel.
Not Fuse Camel.

There is a difference.

Fuse Camel 2.10 has been upgraded to Aries 1.0 and OSGi 4.3 et all.
Where as Apache has not (eg that happens in Camel 2.11).


> Regards,
>
> Charles
>
>
> On Thu, Jan 10, 2013 at 1:16 PM, Claus Ibsen  wrote:
>
>> Hi
>>
>> You would need Camel 2.11 to run on Karaf 2.3.x.
>>
>> Camel 2.10 does not support it to well. As its tied to Aries 0.3, and OSGi
>> 4.2.
>> Where as Karaf is Aries 1.0, and OSGi 4.3 etc.
>>
>>
>>
>> On Thu, Jan 10, 2013 at 1:13 PM, Charles Moulliard 
>> wrote:
>> > Hi,
>> >
>> > When I deploy a camel project as a bundle on Karaf 2.3.0, Spring
>> generates
>> > the following error that I don't really understand as classes are well
>> > packaged in the bundle
>> >
>> > 2013-01-10 13:04:26,204 | ERROR | ExtenderThread-2 |
>> ContextLoaderListener
>> >| ?   ? | 235 -
>> > org.springframework.osgi.extender - 1.2.1 | Application context refresh
>> > failed
>> (OsgiBundleXmlApplicationContext(bundle=camel-exercises-webservice,
>> > config=osgibundle:/META-INF/spring/*.xml))
>> > org.springframework.beans.factory.BeanCreationException: Error creating
>> > bean with name 'enrich' defined in URL
>> > [bundle://311.0:0/META-INF/spring/CamelContext.xml]: Instantiation of
>> bean
>> > failed; nested exception is
>> > org.springframework.beans.BeanInstantiationException: Could not
>> instantiate
>> > bean class [com.fusesource.training.camel.Enrich]: Constructor threw
>> > exception; nested exception is java.lang.Error: Unresolved compilation
>> > problems:
>> > Customer cannot be resolved to a type
>> > Customer cannot be resolved to a type
>> > SaveCustomer cannot be resolved to a type
>> > Customer cannot be resolved to a type
>> > Customer cannot be resolved to a type
>> > CustomerType cannot be resolved to a variable
>> > SaveCustomer cannot be resolved to a type
>> > SaveCustomer cannot be resolved to a type
>> > GetAllCustomersResponse cannot be resolved to a type
>> > GetAllCustomersResponse cannot be resolved to a type
>> > GetAllCustomersResponse cannot be resolved to a type
>> >
>> > Code has been compiled usin maven 3.0.2 / JDK 1.6 and server runs using
>> JDK
>> > 1.6
>> >
>> > Regards,
>> >
>> > --
>> > Charles Moulliard
>> > Apache Committer / Sr. Enterprise Architect (RedHat)
>> > Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
>>
>>
>>
>> --
>> Claus Ibsen
>> -
>> Red Hat, Inc.
>> FuseSource is now part of Red Hat
>> Email: cib...@redhat.com
>> Web: http://fusesource.com
>> Twitter: davsclaus
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen
>>
>
>
>
> --
> Charles Moulliard
> Apache Committer / Sr. Enterprise Architect (RedHat)
> Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Creating dynamic folder

2013-01-10 Thread tamil13

Hi. I want to create dynamic folder in dd-mm- based on some condition.
how can we do?
Below is the sample code.


${file:onlyname.noext} contains 
${properties:fileName1}




${file:onlyname.noext} contains 
${properties:fileName2}



   .
   .



but it shows error ${ } placeholders is not allowed. Use the fileName option
to set the dynamic expression. 



--
View this message in context: 
http://camel.465427.n5.nabble.com/Creating-dynamic-folder-tp5725259.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel 2.10 & Spring 3.0.7 issue on Karaf 2.3.0

2013-01-10 Thread Claus Ibsen
On Thu, Jan 10, 2013 at 1:13 PM, Charles Moulliard  wrote:
> Hi,
>
> When I deploy a camel project as a bundle on Karaf 2.3.0, Spring generates
> the following error that I don't really understand as classes are well
> packaged in the bundle
>
> 2013-01-10 13:04:26,204 | ERROR | ExtenderThread-2 | ContextLoaderListener
>| ?   ? | 235 -
> org.springframework.osgi.extender - 1.2.1 | Application context refresh
> failed (OsgiBundleXmlApplicationContext(bundle=camel-exercises-webservice,
> config=osgibundle:/META-INF/spring/*.xml))
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'enrich' defined in URL
> [bundle://311.0:0/META-INF/spring/CamelContext.xml]: Instantiation of bean
> failed; nested exception is
> org.springframework.beans.BeanInstantiationException: Could not instantiate
> bean class [com.fusesource.training.camel.Enrich]: Constructor threw
> exception; nested exception is java.lang.Error: Unresolved compilation
> problems:
> Customer cannot be resolved to a type
> Customer cannot be resolved to a type
> SaveCustomer cannot be resolved to a type
> Customer cannot be resolved to a type
> Customer cannot be resolved to a type
> CustomerType cannot be resolved to a variable
> SaveCustomer cannot be resolved to a type
> SaveCustomer cannot be resolved to a type
> GetAllCustomersResponse cannot be resolved to a type
> GetAllCustomersResponse cannot be resolved to a type
> GetAllCustomersResponse cannot be resolved to a type
>

Is the code generated from a wsdl using a wsdl2java maven tool?
And do you have a jaxb.index file in the bundle? The file is located
in the same package as the .class files.

Do you see any more details in the log? Is there a stacktrace?

And the 1$ question, did it work before? And what have changed?


> Code has been compiled usin maven 3.0.2 / JDK 1.6 and server runs using JDK
> 1.6
>
> Regards,
>
> --
> Charles Moulliard
> Apache Committer / Sr. Enterprise Architect (RedHat)
> Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: camel-smpp in trx mode

2013-01-10 Thread Alex Anderson
On 4 January 2013 17:26, Christian Müller  wrote:
> I think we don't have another camel component where the endpoint is a
> consumer and producer. I'm not sure how/if it works or if we hit problems
> in other areas (exception handling, ...).

We do this for the camel-smslib component.  The endpoint represents a
serial connection to an SMS modem, and therefore must deal with either
sending or receiving of messages or both.  I have no idea if this is a
recommended approach from camel perspective, but it works for us.  My
interpretation of the camel doc was that returning `true` from
Endpoint.isSingleton() should allow for one Endpoint per URI, but
multiple consumers/producers tied to the Endpoint.

You can see example at
https://github.com/frontlinesms/camel-smslib/blob/master/src/main/java/net/frontlinesms/camel/smslib/SmslibEndpoint.java


Re: Creating dynamic folder

2013-01-10 Thread Andrea Tarocchi
The error description explains the solution: "Use the fileName option
to set the dynamic expression."

Use fileName option for the dynamic part like this:



Andrea.


On Thu, Jan 10, 2013 at 1:30 PM, tamil13  wrote:

>
> Hi. I want to create dynamic folder in dd-mm- based on some condition.
> how can we do?
> Below is the sample code.
> 
> 
> ${file:onlyname.noext}
> contains ${properties:fileName1}
> 
>  uri="file:target/${date:now:MMdd}" />
> 
> 
> ${file:onlyname.noext}
> contains ${properties:fileName2}
> 
>  uri="file:target/${date:now:MMdd}" />
> 
>.
>.
>
> 
>
> but it shows error ${ } placeholders is not allowed. Use the fileName
> option
> to set the dynamic expression.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Creating-dynamic-folder-tp5725259.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
"In a world without walls and fences who needs Windows and Gates?"


Re: camel 2.10 & Spring 3.0.7 issue on Karaf 2.3.0

2013-01-10 Thread Charles Moulliard
Sorry about my previous but I have posted the question here as I don't have
access from Aviva customer to RedHat IRC channel or even WebMail (blocked)

The project that I deploy is an example that we have in the Fuse Training
and it works fine locally using mvn camel:run



On Thu, Jan 10, 2013 at 1:34 PM, Claus Ibsen  wrote:

> On Thu, Jan 10, 2013 at 1:13 PM, Charles Moulliard 
> wrote:
> > Hi,
> >
> > When I deploy a camel project as a bundle on Karaf 2.3.0, Spring
> generates
> > the following error that I don't really understand as classes are well
> > packaged in the bundle
> >
> > 2013-01-10 13:04:26,204 | ERROR | ExtenderThread-2 |
> ContextLoaderListener
> >| ?   ? | 235 -
> > org.springframework.osgi.extender - 1.2.1 | Application context refresh
> > failed
> (OsgiBundleXmlApplicationContext(bundle=camel-exercises-webservice,
> > config=osgibundle:/META-INF/spring/*.xml))
> > org.springframework.beans.factory.BeanCreationException: Error creating
> > bean with name 'enrich' defined in URL
> > [bundle://311.0:0/META-INF/spring/CamelContext.xml]: Instantiation of
> bean
> > failed; nested exception is
> > org.springframework.beans.BeanInstantiationException: Could not
> instantiate
> > bean class [com.fusesource.training.camel.Enrich]: Constructor threw
> > exception; nested exception is java.lang.Error: Unresolved compilation
> > problems:
> > Customer cannot be resolved to a type
> > Customer cannot be resolved to a type
> > SaveCustomer cannot be resolved to a type
> > Customer cannot be resolved to a type
> > Customer cannot be resolved to a type
> > CustomerType cannot be resolved to a variable
> > SaveCustomer cannot be resolved to a type
> > SaveCustomer cannot be resolved to a type
> > GetAllCustomersResponse cannot be resolved to a type
> > GetAllCustomersResponse cannot be resolved to a type
> > GetAllCustomersResponse cannot be resolved to a type
> >
>
> Is the code generated from a wsdl using a wsdl2java maven tool?
> And do you have a jaxb.index file in the bundle? The file is located
> in the same package as the .class files.
>
> Do you see any more details in the log? Is there a stacktrace?
>
> And the 1$ question, did it work before? And what have changed?
>
>
> > Code has been compiled usin maven 3.0.2 / JDK 1.6 and server runs using
> JDK
> > 1.6
> >
> > Regards,
> >
> > --
> > Charles Moulliard
> > Apache Committer / Sr. Enterprise Architect (RedHat)
> > Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
>
>
>
> --
> Claus Ibsen
> -
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: cib...@redhat.com
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>



-- 
Charles Moulliard
Apache Committer / Sr. Enterprise Architect (RedHat)
Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com


Re: How to build an outgoing tcp connection gateway that consumes messages?

2013-01-10 Thread Andrea Tarocchi
I think that camel-mina works also as a producer ( e.g. in a .to(...) )

Another option could be camel-netty component:
http://camel.apache.org/netty.html

Andrea.


On Thu, Jan 10, 2013 at 1:34 PM, ggalka  wrote:

> camel-mina for consuming messages (from(...)) uses tcp server connection
> (acts as a listener). I need to consume messages using client connection.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/How-to-build-an-outgoing-tcp-connection-gateway-that-consumes-messages-tp5724102p5725261.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
"In a world without walls and fences who needs Windows and Gates?"


Question about camel cxf & blueprint

2013-01-10 Thread Charles Moulliard
Hi,

The following syntax is not supported


http://www.osgi.org/xmlns/blueprint/v1.0.0";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:cxf="http://cxf.apache.org/blueprint/core";
xmlns:camelcxf="http://camel.apache.org/schema/blueprint/cxf";
xsi:schemaLocation="
 http://www.osgi.org/xmlns/blueprint/v1.0.0
http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
 http://cxf.apache.org/blueprint/core
http://cxf.apache.org/schemas/blueprint/core.xsd";>

http://localhost:9090/training/WebService";
serviceClass="com.fusesource.training.CustomerService">










What is the the trick to be used to allow to use  or
 within tag 

Regards,

-- 
Charles Moulliard
Apache Committer / Sr. Enterprise Architect (RedHat)
Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com


[camel-bindy] bindy ignore bean class type

2013-01-10 Thread lb
Hi all,
it looks like camel-bindy does not take into account the class specified in
the method:

bindy(BindyType.Csv, MyCamelBeans.TEST.class)

I have class MyCamelBeans which includes several "bindies" among which I
have a really simple MyCamelBeans.TEST:

class MyCamelBeans {
@CsvRecord(separator=";",isOrdered=true)
public static final class TEST {
@DataField(trim=true,pos=  1) public String tradingDate;
@DataField(trim=true,pos=  2) public String isinCode;
}

... some other @CsvRecord 
}

I also have some @FixedLengthRecord classes defined in the same package.
If I run the following route:

   
from("file:data/test?noop=true&idempotent=true&fileName=test.csv&delay=6")
.split(body(String.class).tokenize("\n")).streaming()
.unmarshal().bindy(BindyType.Csv, MyCamelBeans.TEST.class)
.to("log:DS?level=INFO&showHeaders=true");

Camel (2.10.3) fails with an NPE:

java.lang.NullPointerException
at
org.apache.camel.dataformat.bindy.BindyCsvFactory.setDefaultValuesForFields(BindyCsvFactory.java:583)
at
org.apache.camel.dataformat.bindy.BindyCsvFactory.bind(BindyCsvFactory.java:230)

if I remove the other bindies, camel-bindy works as expected.
It looks like camel ignore the class specified in the fluent method
bindy(type,class): am I wrong?

thx - Luca






--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-bindy-bindy-ignore-bean-class-type-tp5725275.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [camel-bindy] bindy ignore bean class type

2013-01-10 Thread Claus Ibsen
Hi

Try moving your class outside, so its not inlined in another class.
I would assume Bindy requires that.

On Thu, Jan 10, 2013 at 2:58 PM, lb  wrote:
> Hi all,
> it looks like camel-bindy does not take into account the class specified in
> the method:
>
> bindy(BindyType.Csv, MyCamelBeans.TEST.class)
>
> I have class MyCamelBeans which includes several "bindies" among which I
> have a really simple MyCamelBeans.TEST:
>
> class MyCamelBeans {
> @CsvRecord(separator=";",isOrdered=true)
> public static final class TEST {
> @DataField(trim=true,pos=  1) public String tradingDate;
> @DataField(trim=true,pos=  2) public String isinCode;
> }
>
> ... some other @CsvRecord 
> }
>
> I also have some @FixedLengthRecord classes defined in the same package.
> If I run the following route:
>
>
> from("file:data/test?noop=true&idempotent=true&fileName=test.csv&delay=6")
> .split(body(String.class).tokenize("\n")).streaming()
> .unmarshal().bindy(BindyType.Csv, MyCamelBeans.TEST.class)
> .to("log:DS?level=INFO&showHeaders=true");
>
> Camel (2.10.3) fails with an NPE:
>
> java.lang.NullPointerException
> at
> org.apache.camel.dataformat.bindy.BindyCsvFactory.setDefaultValuesForFields(BindyCsvFactory.java:583)
> at
> org.apache.camel.dataformat.bindy.BindyCsvFactory.bind(BindyCsvFactory.java:230)
>
> if I remove the other bindies, camel-bindy works as expected.
> It looks like camel ignore the class specified in the fluent method
> bindy(type,class): am I wrong?
>
> thx - Luca
>
>
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/camel-bindy-bindy-ignore-bean-class-type-tp5725275.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Question about camel cxf & blueprint

2013-01-10 Thread Willem jiang
Hi Charles,

You should be able to set up the outInterceptors and inInterceptors like this  

http://localhost:9090/training/WebService";
serviceClass="com.fusesource.training.CustomerService">








  

--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
  http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Thursday, January 10, 2013 at 9:09 PM, Charles Moulliard wrote:

> Hi,
>  
> The following syntax is not supported
>  
> 
> http://www.osgi.org/xmlns/blueprint/v1.0.0";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xmlns:cxf="http://cxf.apache.org/blueprint/core";
> xmlns:camelcxf="http://camel.apache.org/schema/blueprint/cxf";
> xsi:schemaLocation="
> http://www.osgi.org/xmlns/blueprint/v1.0.0
> http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
> http://cxf.apache.org/blueprint/core
> http://cxf.apache.org/schemas/blueprint/core.xsd";>
>  
>  address="http://localhost:9090/training/WebService";
> serviceClass="com.fusesource.training.CustomerService">
>  
> 
> 
> 
> 
> 
> 
>  
> 
>  
> What is the the trick to be used to allow to use  or
>  within tag 
>  
> Regards,
>  
> --  
> Charles Moulliard
> Apache Committer / Sr. Enterprise Architect (RedHat)
> Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com





camel-mail regarding xml configuration

2013-01-10 Thread tamil13
How to configure below code into camel-context.xml file?

template = context.createProducerTemplate();
ProducerTemplate template;
Map map = new HashMap();
map.put("To", "davscl...@apache.org");
map.put("From", "jstrac...@apache.org");
map.put("Subject", "Camel rocks");

String body = "Hello Claus.\nYes it does.\n\nRegards James.";
template.sendBodyAndHeaders("smtp://davscl...@apache.org", body, map); 



--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-mail-regarding-xml-configuration-tp5725280.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Question about camel cxf & blueprint

2013-01-10 Thread Charles Moulliard
Your are right. I just discover my mistake a few minutes ago. Thx


On Thu, Jan 10, 2013 at 3:27 PM, Willem jiang wrote:

> Hi Charles,
>
> You should be able to set up the outInterceptors and inInterceptors like
> this
>
>  address="http://localhost:9090/training/WebService";
> serviceClass="com.fusesource.training.CustomerService">
>
> 
> 
> 
> 
> 
> 
>
> 
>
> --
> Willem Jiang
>
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Web: http://www.fusesource.com | http://www.redhat.com
> Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/)
> (English)
>   http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
> Twitter: willemjiang
> Weibo: 姜宁willem
>
>
>
>
>
> On Thursday, January 10, 2013 at 9:09 PM, Charles Moulliard wrote:
>
> > Hi,
> >
> > The following syntax is not supported
> >
> > 
> > http://www.osgi.org/xmlns/blueprint/v1.0.0";
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> > xmlns:cxf="http://cxf.apache.org/blueprint/core";
> > xmlns:camelcxf="http://camel.apache.org/schema/blueprint/cxf";
> > xsi:schemaLocation="
> > http://www.osgi.org/xmlns/blueprint/v1.0.0
> > http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
> > http://cxf.apache.org/blueprint/core
> > http://cxf.apache.org/schemas/blueprint/core.xsd";>
> >
> >  > address="http://localhost:9090/training/WebService";
> > serviceClass="com.fusesource.training.CustomerService">
> >
> > 
> > 
> > 
> > 
> > 
> > 
> >
> > 
> >
> > What is the the trick to be used to allow to use  or
> >  within tag 
> >
> > Regards,
> >
> > --
> > Charles Moulliard
> > Apache Committer / Sr. Enterprise Architect (RedHat)
> > Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
>
>
>
>


-- 
Charles Moulliard
Apache Committer / Sr. Enterprise Architect (RedHat)
Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com


Re: recipientList with POST and request body

2013-01-10 Thread Zemin Hu
I added a line:
template.start()
before sending request, it did not help, got same exception. I changed to
context.start() it did not work either.
The code is within bean implementation, so context is build-in variable, and
started already, why do I need to start it again? From other example code,
the pattern to use it should be simple as 2 lines:

def template = context.createProducerTemplate() 
def response = template.requestBodyAndHeaders(endpointUri, xbody, xheaders,
java.lang.String.class) 

Can someone post working code to use producerTemplate to POST request?



--
View this message in context: 
http://camel.465427.n5.nabble.com/recipientList-with-POST-and-request-body-tp5725142p5725283.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: recipientList with POST and request body

2013-01-10 Thread Willem jiang
You just need to start the ProducerTemplate, you don't need to start the camel 
context as it is already started.
Can you check the camel log to see if there is any information shows what's the 
cause exception?  


--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
  http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Thursday, January 10, 2013 at 10:43 PM, Zemin Hu wrote:

> I added a line:
> template.start()
> before sending request, it did not help, got same exception. I changed to
> context.start() it did not work either.
> The code is within bean implementation, so context is build-in variable, and
> started already, why do I need to start it again? From other example code,
> the pattern to use it should be simple as 2 lines:
>  
> def template = context.createProducerTemplate()  
> def response = template.requestBodyAndHeaders(endpointUri, xbody, xheaders,
> java.lang.String.class)  
>  
> Can someone post working code to use producerTemplate to POST request?
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/recipientList-with-POST-and-request-body-tp5725142p5725283.html
> Sent from the Camel - Users mailing list archive at Nabble.com 
> (http://Nabble.com).





Re: recipientList with POST and request body

2013-01-10 Thread Zemin Hu
I posted the exception before, let me copy the exception again:
the exception is:

org.apache.camel.CamelExecutionException: Exception occurred during
execution on the exchange: Exchange[Message:
{"id":["48792683442"],"index":"0"}]
at
org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1237)[camel-core-2.9.1.jar:2.9.1]
at
org.apache.camel.util.ExchangeHelper.extractResultBody(ExchangeHelper.java:509)[camel-core-2.9.1.jar:2.9.1]
at
org.apache.camel.impl.DefaultProducerTemplate.extractResultBody(DefaultProducerTemplate.java:442)[camel-core-2.9.1.jar:2.9.1]
at
org.apache.camel.impl.DefaultProducerTemplate.sendBodyAndHeaders(DefaultProducerTemplate.java:247)[camel-core-2.9.1.jar:2.9.1]
at
org.apache.camel.impl.DefaultProducerTemplate.requestBodyAndHeaders(DefaultProducerTemplate.java:296)[camel-core-2.9.1.jar:2.9.1]
at
org.apache.camel.impl.DefaultProducerTemplate.requestBodyAndHeaders(DefaultProducerTemplate.java:292)[camel-core-2.9.1.jar:2.9.1]
at
org.apache.camel.impl.DefaultProducerTemplate.requestBodyAndHeaders(DefaultProducerTemplate.java:329)[camel-core-2.9.1.jar:2.9.1]
at
org.apache.camel.ProducerTemplate$requestBodyAndHeaders.call(Unknown Source) 



--
View this message in context: 
http://camel.465427.n5.nabble.com/recipientList-with-POST-and-request-body-tp5725142p5725288.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel-mail

2013-01-10 Thread tamil13
It is working now. Can we config below coding in camel-context.xml also? 

ProducerTemplate template;
template = context.createProducerTemplate();
Map map = new HashMap();
map.put("To", "davscl...@apache.org");
map.put("From", "jstrac...@apache.org");
map.put("Subject", "Camel rocks");

String body = "Hello Claus.\nYes it does.\n\nRegards James.";
template.sendBodyAndHeaders("smtp://davscl...@apache.org", body, map); 

Thanks in advance.



--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-mail-tp5725119p5725286.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: recipientList with POST and request body

2013-01-10 Thread Willem jiang
I just recheck the code, the camel context is bind with the variable name of 
"camelContext".


--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
  http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem


Sent with Sparrow (http://www.sparrowmailapp.com/?sig)


On Thursday, January 10, 2013 at 10:47 PM, Zemin Hu wrote:

> Can you be more specific how to reference the context the script since I
> encountered exception regarding context is not found?
> Thanks.
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/recipientList-with-POST-and-request-body-tp5725142p5725284.html
> Sent from the Camel - Users mailing list archive at Nabble.com 
> (http://Nabble.com).





Re: Question about camel cxf & blueprint

2013-01-10 Thread Claus Ibsen
On Thu, Jan 10, 2013 at 3:39 PM, Charles Moulliard  wrote:
> Your are right. I just discover my mistake a few minutes ago. Thx
>

Maybe we should add that to the camel-cxf docs as a little example how
to enable logging when using cxf blueprint.



>
> On Thu, Jan 10, 2013 at 3:27 PM, Willem jiang wrote:
>
>> Hi Charles,
>>
>> You should be able to set up the outInterceptors and inInterceptors like
>> this
>>
>> > address="http://localhost:9090/training/WebService";
>> serviceClass="com.fusesource.training.CustomerService">
>>
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> 
>>
>> --
>> Willem Jiang
>>
>> Red Hat, Inc.
>> FuseSource is now part of Red Hat
>> Web: http://www.fusesource.com | http://www.redhat.com
>> Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/)
>> (English)
>>   http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
>> Twitter: willemjiang
>> Weibo: 姜宁willem
>>
>>
>>
>>
>>
>> On Thursday, January 10, 2013 at 9:09 PM, Charles Moulliard wrote:
>>
>> > Hi,
>> >
>> > The following syntax is not supported
>> >
>> > 
>> > http://www.osgi.org/xmlns/blueprint/v1.0.0";
>> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>> > xmlns:cxf="http://cxf.apache.org/blueprint/core";
>> > xmlns:camelcxf="http://camel.apache.org/schema/blueprint/cxf";
>> > xsi:schemaLocation="
>> > http://www.osgi.org/xmlns/blueprint/v1.0.0
>> > http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
>> > http://cxf.apache.org/blueprint/core
>> > http://cxf.apache.org/schemas/blueprint/core.xsd";>
>> >
>> > > > address="http://localhost:9090/training/WebService";
>> > serviceClass="com.fusesource.training.CustomerService">
>> >
>> > 
>> > 
>> > 
>> > 
>> > 
>> > 
>> >
>> > 
>> >
>> > What is the the trick to be used to allow to use  or
>> >  within tag 
>> >
>> > Regards,
>> >
>> > --
>> > Charles Moulliard
>> > Apache Committer / Sr. Enterprise Architect (RedHat)
>> > Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
>>
>>
>>
>>
>
>
> --
> Charles Moulliard
> Apache Committer / Sr. Enterprise Architect (RedHat)
> Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: [camel-bindy] bindy ignore bean class type

2013-01-10 Thread lb

Hi, it works if the beans are in a different package not if they are in the
same one



--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-bindy-bindy-ignore-bean-class-type-tp5725275p5725291.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel-mail

2013-01-10 Thread Claus Ibsen
On Thu, Jan 10, 2013 at 3:53 PM, tamil13  wrote:
> It is working now. Can we config below coding in camel-context.xml also?
>

What do you mean?

The code below is not a Camel route (which you can configure in XML) but code
that sends a message to a Camel endpoint using the producer template.

And for that you need real Java code to do that.


> ProducerTemplate template;
> template = context.createProducerTemplate();
> Map map = new HashMap();
> map.put("To", "davscl...@apache.org");
> map.put("From", "jstrac...@apache.org");
> map.put("Subject", "Camel rocks");
>
> String body = "Hello Claus.\nYes it does.\n\nRegards James.";
> template.sendBodyAndHeaders("smtp://davscl...@apache.org", body, map);
>
> Thanks in advance.
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/camel-mail-tp5725119p5725286.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: recipientList with POST and request body

2013-01-10 Thread Willem jiang
You should be able to get the cause Exception from the log. That is what I'm 
asking for.
Can you check the log below the exception that you just showed?


--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
  http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Thursday, January 10, 2013 at 11:01 PM, Zemin Hu wrote:

> I posted the exception before, let me copy the exception again:
> the exception is:
>  
> org.apache.camel.CamelExecutionException: Exception occurred during
> execution on the exchange: Exchange[Message:
> {"id":["48792683442"],"index":"0"}]
> at
> org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1237)[camel-core-2.9.1.jar:2.9.1]
> at
> org.apache.camel.util.ExchangeHelper.extractResultBody(ExchangeHelper.java:509)[camel-core-2.9.1.jar:2.9.1]
> at
> org.apache.camel.impl.DefaultProducerTemplate.extractResultBody(DefaultProducerTemplate.java:442)[camel-core-2.9.1.jar:2.9.1]
> at
> org.apache.camel.impl.DefaultProducerTemplate.sendBodyAndHeaders(DefaultProducerTemplate.java:247)[camel-core-2.9.1.jar:2.9.1]
> at
> org.apache.camel.impl.DefaultProducerTemplate.requestBodyAndHeaders(DefaultProducerTemplate.java:296)[camel-core-2.9.1.jar:2.9.1]
> at
> org.apache.camel.impl.DefaultProducerTemplate.requestBodyAndHeaders(DefaultProducerTemplate.java:292)[camel-core-2.9.1.jar:2.9.1]
> at
> org.apache.camel.impl.DefaultProducerTemplate.requestBodyAndHeaders(DefaultProducerTemplate.java:329)[camel-core-2.9.1.jar:2.9.1]
> at
> org.apache.camel.ProducerTemplate$requestBodyAndHeaders.call(Unknown Source)  
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/recipientList-with-POST-and-request-body-tp5725142p5725288.html
> Sent from the Camel - Users mailing list archive at Nabble.com 
> (http://Nabble.com).





Re: recipientList with POST and request body

2013-01-10 Thread Zemin Hu
Thanks. The camelContext is not causing exception anymore.
The cause of the exception is:
Caused by: org.apache.camel.component.http.HttpOperationFailedException:
HTTP operation failed invoking
https://locker.att.net/service/content/1/playlists/158040465976 with
statusCode: 302, redirectLocation:
https://cprodctnxsf.att.net/commonLogin/igate_edam/controller.do?TAM_OP=login&USERNAME=unauthenticated&ERROR_CODE=0x&ERROR_TEXT=HPDBA0521I%20%20%20Successful%20completion&METHOD=POST&URL=%2Fservice%2Fcontent%2F1%2Fplaylists%2F158040465976&REFERER=&HOSTNAME=locker.att.net&AUTHNLEVEL=&FAILREASON=&PROTOCOL=https&OLDSESSION=

at
org.apache.camel.component.http.HttpProducer.populateHttpOperationFailedException(HttpProducer.java:222)

at
org.apache.camel.component.http.HttpProducer.process(HttpProducer.java:157)

at
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)

at
org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150)

at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117)

at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:99)

at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:86)

at
org.apache.camel.processor.UnitOfWorkProducer.process(UnitOfWorkProducer.java:63)

at
org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:352)

at
org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:324)

at 
org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:223)

at 
org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:324)

at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:186)

at
org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:115)

at
org.apache.camel.impl.DefaultProducerTemplate.sendBodyAndHeaders(DefaultProducerTemplate.java:238)

... 107 more




--
View this message in context: 
http://camel.465427.n5.nabble.com/recipientList-with-POST-and-request-body-tp5725142p5725296.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: recipientList with POST and request body

2013-01-10 Thread Willem jiang
Hi,  

It looks like the URL you want to access need you to login first.
Can you double check it?


--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
  http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Thursday, January 10, 2013 at 11:26 PM, Zemin Hu wrote:

> Thanks. The camelContext is not causing exception anymore.
> The cause of the exception is:
> Caused by: org.apache.camel.component.http.HttpOperationFailedException:
> HTTP operation failed invoking
> https://locker.att.net/service/content/1/playlists/158040465976 with
> statusCode: 302, redirectLocation:
> https://cprodctnxsf.att.net/commonLogin/igate_edam/controller.do?TAM_OP=login&USERNAME=unauthenticated&ERROR_CODE=0x&ERROR_TEXT=HPDBA0521I%20%20%20Successful%20completion&METHOD=POST&URL=%2Fservice%2Fcontent%2F1%2Fplaylists%2F158040465976&REFERER=&HOSTNAME=locker.att.net&AUTHNLEVEL=&FAILREASON=&PROTOCOL=https&OLDSESSION=
>  
> at
> org.apache.camel.component.http.HttpProducer.populateHttpOperationFailedException(HttpProducer.java:222)
>  
> at
> org.apache.camel.component.http.HttpProducer.process(HttpProducer.java:157)
>  
> at
> org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
>  
> at
> org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150)
>  
> at
> org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117)
>  
> at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:99)
>  
> at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:86)
>  
> at
> org.apache.camel.processor.UnitOfWorkProducer.process(UnitOfWorkProducer.java:63)
>  
> at
> org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:352)
>  
> at
> org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:324)
>  
> at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:223)
>  
> at org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:324)
>  
> at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:186)
>  
> at
> org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:115)
>  
> at
> org.apache.camel.impl.DefaultProducerTemplate.sendBodyAndHeaders(DefaultProducerTemplate.java:238)
>  
> ... 107 more
>  
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/recipientList-with-POST-and-request-body-tp5725142p5725296.html
> Sent from the Camel - Users mailing list archive at Nabble.com 
> (http://Nabble.com).





Re: [camel-bindy] bindy ignore bean class type

2013-01-10 Thread lb

I think the problem is in BindyAbstractFactory.java :

/**
 * method uses to initialize the model representing the classes who will
 * bind the data. This process will scan for classes according to the
 * package name provided, check the annotated classes and fields.
 *
 * @throws Exception
 */
public void initModel() throws Exception {
// Find classes defined as Model
if (packageNames != null)  {
initModelClasses(this.packageNames);
} else if (type != null) {
// use the package name from the type as it may refer to types
in the same package
String pckName = type.getPackage().getName();
initModelClasses(pckName);
} else {
throw new IllegalArgumentException("Either packagenames or type
should be configured");
}
}

Looks like bindy scan the package even a class has been specified. 
This force people to write beans in different packages and in my opinion it
is a wrong behavior; isn't it?







--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-bindy-bindy-ignore-bean-class-type-tp5725275p5725298.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Premature end of file on return from HTTP endpoint

2013-01-10 Thread Castyn
I am submitting messages to an HTTP web service through camel.  For some
reason, when I am attempting to call an xpath expression on the result I am
getting a  org.xml.sax.SAXParseException: Premature end of file.

Looking at the body of the SOAP XML that is being returned by the HTTP
endpoint, I see everything is coming back properly and the message is
formatted as expected.  I can change the endpoint to our old JMS endpoint
which returns the exact same message and the error does not occur.  

Any reason this might be happening with HTTP endpoint specifically?

Here is all I am doing:


  

http://hcsqa.hiw.com:9010/HotelContentServiceInterface"/>


   
  //atp:transactionStatus/@transactionSuccessful

   

...




--
View this message in context: 
http://camel.465427.n5.nabble.com/Premature-end-of-file-on-return-from-HTTP-endpoint-tp5725299.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: recipientList with POST and request body

2013-01-10 Thread Zemin Hu
I think I understand now why I can't do this with producerTemplate:
yes, there is intensive security checks for our web service site, at this
point to use producerTemplate I already logged in and got session in
previous steps in the same route, the problem is that the security token
with session information is not passed to this site correctly since
producerTemplate is passing simple body and headers without security tokens,
that's why it failed. Do you have way to take tokens with the template?



--
View this message in context: 
http://camel.465427.n5.nabble.com/recipientList-with-POST-and-request-body-tp5725142p5725300.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Issue using camel-cxf and wss4j

2013-01-10 Thread Daniel Kulp

On Jan 10, 2013, at 4:37 AM, Charles Moulliard  wrote:
> I don't find info about this dataFormat (CXF_MESSAGE) in CXF. Does it exist
> ?

Yes it exists, but I'm really not exactly happy about how it works.   I'd like 
to kind of "redo" it, but it would require a lot of internal CXF changes which 
I haven't had time to figure all out either.

Basically:

MESSAGE/RAW mode sucks from a  CXF standpoint as pretty much all the CXF 
processing is bypassed. (that's the problem you saw)   What's super confusing 
about it is that is also REMOVES things that the user may be relying on (like 
the SAAJ interceptors) that then can result in very strange error messages.  
(again what you saw)   Really, I'm unsure why you wouldn't just use a pure HTTP 
component for most of this OTHER than for the WSDL generation, but even that is 
kind of doable if you have a static WSDL pre-generated.   In any case, my gut 
feeling is that a pure http component would perform slightly better.For the 
most part, the advantage of this over the other two modes is performance 
though.   Keeps the raw byte streaming, very little processing.

PAYLOAD does allow all of the proper CXF processing.  Using StAX, it can also 
do a lot of  "xml streaming", but XML streaming is much slower than byte 
streaming due to the parsing and such.   HOWEVER, PAYLOAD just gives the 
contents of the Body.  If you need to route the soap headers and attachments 
and such along as well, you need to do more work.   

I was hoping that CXF_MESSAGE could be somewhere in the middle where you could 
have CXF process everything correctly, but still be able to route on the full 
message.   HOWEVER, with the way CXF works internally, we have to build up a 
full SAAJ model in this case.  Thus, ALL of the streaming does not work in 
CXF_MESSAGE mode.   This is what I was hoping to somehow change, but would 
require a ton of work in CXF.   :-(I'd like to be able to optimize this 
isn't something closer to how the PAYLOAD mode works with the XML streaming, 
but definitely requires a lot of work in CXF first.

That said, when using WS-Security, we have to build the full SAAJ model anyway 
so the broken streaming wouldn't be an issue.


Dan



> On Thu, Jan 10, 2013 at 8:43 AM, Willem jiang wrote:
> 
>> CXF_MESSAGE
> 
> 
> 
> 
> -- 
> Charles Moulliard
> Apache Committer / Sr. Enterprise Architect (RedHat)
> Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com

-- 
Daniel Kulp
dk...@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com



Re: Transactional aggregator

2013-01-10 Thread orz
Hi,

Unfortunately, I need to go ahead with the Javabean approach. Now I have a
processor that is a bit similar to
org.apache.camel.processor.aggregate.AggregateProcessor. It has a
aggregatorRepository to manage the in-flight exchanges.

However, I need to catch the RollbackExchangeException in this processor so
that I can evict the exchange from the aggregatorRepostory, or else it will
aggregate with itself (cause the original msg remains in queue). Should I
use the try.. catch.. finally or is there any helper/factory method or camel
aware interface that I can use for this?





--
View this message in context: 
http://camel.465427.n5.nabble.com/Transactional-aggregator-tp5725084p5725302.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Output File Name After Exec

2013-01-10 Thread neilac333
Thanks for your responses. 

To answer the first question, here is the route I have so far:

from("servlet:///my-endpoint")
.to("exec:${shellScriptPath}?outFile=${outFilePath}")
.convertBodyTo(String.class)
.bean(new DataProvider())
.marshal(jsonDataFormat)

What I would like to do is replace the convertBodyTo with something that
would send ${outFilePath}--the outFile /name/--as the message body. As it
stands now, the outFile /contents/ are the message body.

As for Claus' solution, I am familiar with the transformer EIP, but I am not
sure how to apply it. In other words, I am not sure how to transform
/org.apache.camel.components.exec.ExecResult/ into a string with the outFile
value.

I would appreciate some clarification on what I'm missing.

Thanks.




--
View this message in context: 
http://camel.465427.n5.nabble.com/Output-File-Name-After-Exec-tp5725152p5725303.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel-mail regarding xml configuration

2013-01-10 Thread David Karlsen
Use setHeader or configure properties on the endpoint.
Den 10. jan. 2013 15:38 skrev "tamil13"  følgende:

> How to configure below code into camel-context.xml file?
>
> template = context.createProducerTemplate();
> ProducerTemplate template;
> Map map = new HashMap();
> map.put("To", "davscl...@apache.org");
> map.put("From", "jstrac...@apache.org");
> map.put("Subject", "Camel rocks");
>
> String body = "Hello Claus.\nYes it does.\n\nRegards James.";
> template.sendBodyAndHeaders("smtp://davscl...@apache.org", body, map);
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/camel-mail-regarding-xml-configuration-tp5725280.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Re: Output File Name After Exec

2013-01-10 Thread Andrea Tarocchi
Hi,

outFile is an option that you use to instruct the exec component on which
file is the output of the executed command;
in other words the component first execs the command then grab the outFile
specified and put it in the body;

that said, assuming ${outFilePath} is a property correctly resolved, I
would do something similar to:
from("servlet:///my-endpoint")
.to("exec:${shellScriptPath}?outFile=${outFilePath}")
.setBody(${outFilePath})
.bean(new DataProvider())
.marshal(jsonDataFormat)

Even if executing a command that produce an output in a file and discarding
that file seems odd to me.

Andrea.




On Thu, Jan 10, 2013 at 5:11 PM, neilac333  wrote:

> Thanks for your responses.
>
> To answer the first question, here is the route I have so far:
>
> from("servlet:///my-endpoint")
> .to("exec:${shellScriptPath}?outFile=${outFilePath}")
> .convertBodyTo(String.class)
> .bean(new DataProvider())
> .marshal(jsonDataFormat)
>
> What I would like to do is replace the convertBodyTo with something that
> would send ${outFilePath}--the outFile /name/--as the message body. As it
> stands now, the outFile /contents/ are the message body.
>
> As for Claus' solution, I am familiar with the transformer EIP, but I am
> not
> sure how to apply it. In other words, I am not sure how to transform
> /org.apache.camel.components.exec.ExecResult/ into a string with the
> outFile
> value.
>
> I would appreciate some clarification on what I'm missing.
>
> Thanks.
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Output-File-Name-After-Exec-tp5725152p5725303.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
"In a world without walls and fences who needs Windows and Gates?"


Re: Failing over in-flight exchanges

2013-01-10 Thread Christian Müller
Why you do not use ActiveMQ for this?

Best,
Christian
Am 10.01.2013 09:56 schrieb "narita" :

>
> Component/Node Event Logging Feature - Where in hook a Processor after
> every
> component/node to log the message details (an efficient logging mechanism
> can be in place File/DB/Mongo etc). This is how a savepoint/milestone can
> be
> captured, so that on re-start (after crash), you have the intellignce(for
> DB
> logging, essentially a query) for finding the messages to recover, from a
> particular savepoint/milestone to replay to process it further. We have the
> implementation in our product where in we log in to DB (using DataSource -
> DBPool - C3P0). We are doing analysis for the feasibility of replacing DB
> logging with MongoDB, though.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Failing-over-in-flight-exchanges-tp5725162p5725216.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Jetty to ActiveMQ Failure

2013-01-10 Thread Alan Smithee
I am seeing the exception listed below after running a fairly straightforward
load test against jetty/activemq/camel. As best as I can make out, it occurs
only after I have run the test a few times (i.e.
start,finish,start,finish,start,exception), at which time all connections in
the test fail. One variable that seems to make a difference is how I define
the jms bean in the spring config. For performance reasons, I would really
like to use the maxConnections and concurrentConsumers values, but this
exception seems to only happen when I use the config that has those values.

I'd be willing to share the project with interested parties if it's helpful
(its a fairly simple maven project)

Details below


My Route

from("jetty:http://localhost:8085/incoming?sessionSupport=true";).routeId("Jetty
Endpoint to ActiveMQ")


.to("jms:incoming");

from("jms:incoming").routeId("ActiveMQ Incoming")

.unmarshal(customGsonParser)

.beanRef("dispatcher", "dispatch")

.marshal(customGsonParser);

My JMS Config That Does Not Produce The Exception









My JMS Config That Produces The Exception















   



System Details

java version : "1.7.0_07"
MacOS : 10.8.2
maven-jetty-plugin : 6.1.26
Jetty : 7.5.4.v20111024
Camel : 2.10.2
Apache ActiveMQ : 5.7.0

The Exception:

[INFO] Started Jetty Server
2013-01-10 16:53:54,426 [er[temporary]-1] WARN 
efaultMessageListenerContainer - Setup of JMS message listener invoker
failed for destination 'temporary' - trying to recover. Cause: The Consumer
is closed
2013-01-10 16:53:54,430 [er[temporary]-1] INFO  PooledConnection  
- failed to delete Temporary Queue
"temp-queue://ID:Ks-MacBook-Pro.local-64733-1357854558059-3:2:1" on closing
pooled connection: The connection is already closed
2013-01-10 16:53:54,432 [sumer[incoming]] WARN 
ultJmsMessageListenerContainer - Setup of JMS message listener invoker
failed for destination 'incoming' - trying to recover. Cause: The Consumer
is closed
2013-01-10 16:53:54,447 [sumer[incoming]] INFO 
ultJmsMessageListenerContainer - Successfully refreshed JMS Connection
2013-01-10 16:53:54,451 [er[temporary]-1] INFO 
efaultMessageListenerContainer - Successfully refreshed JMS Connection
2013-01-10 16:53:54,462 [sumer[incoming]] WARN  EndpointMessageListener   
- Execution of JMS message listener failed. Caused by:
[org.apache.camel.RuntimeCamelException -
org.springframework.jms.InvalidDestinationException: Cannot publish to a
deleted Destination:
temp-queue://ID:Ks-MacBook-Pro.local-64733-1357854558059-3:2:1; nested
exception is javax.jms.InvalidDestinationException: Cannot publish to a
deleted Destination:
temp-queue://ID:Ks-MacBook-Pro.local-64733-1357854558059-3:2:1]
org.apache.camel.RuntimeCamelException:
org.springframework.jms.InvalidDestinationException: Cannot publish to a
deleted Destination:
temp-queue://ID:Ks-MacBook-Pro.local-64733-1357854558059-3:2:1; nested
exception is javax.jms.InvalidDestinationException: Cannot publish to a
deleted Destination:
temp-queue://ID:Ks-MacBook-Pro.local-64733-1357854558059-3:2:1
at
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1270)
at
org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:125)
at
org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:560)
at
org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:498)
at
org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:467)
at
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:325)
at
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:263)
at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1058)
at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1050)
at
org.springframework.jms.listener.Def

Re: Failing over in-flight exchanges

2013-01-10 Thread Rakesh Sharma
Hi Ashwin, Narita, and Christian,

Thanks for very valuable ideas. I was already considering few of the ideas
you put forward. MOM fits in some use cases and it does not fit in many
others. Also, I do not want to create dependence on another infrastructure
if there are other ways of doing it. Also, not all routes are idempotent and
many of them are very long running and will not be a good fit for MOM where
commit may happen after hours.

I would like to explore further on Narita's idea. It works fine when you
understand the message body in the exchange. You can apply the appropriate
marshaller in that case. However, it makes it very specific solution to that
exchange. I am looking at the ways where I could save the payload of
in-flight exchanges and reconstruct it in a generic and non-invasive way. I
was hoping to capture it using camel interceptors. However, I realized that
neither message nor body of an exchange is serializable.

Thanks,
Rakesh



--
View this message in context: 
http://camel.465427.n5.nabble.com/Failing-over-in-flight-exchanges-tp5725162p5725321.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: What's the best way to resequence message

2013-01-10 Thread Willem jiang
Camel supports the resequence[1], you can consider to put a index in the 
message header before routing the message from the web service endpoint.

[1]http://camel.apache.org/resequencer.html  

--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
  http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Friday, January 11, 2013 at 6:38 AM, jipchix wrote:

> I'm consuming about 4-5 web service operation types via an endpoint. Only 1
> of those operation types needs to be pre-processed. What method would you
> recommend I use to make sure that at the end of the day, all messages end up
> in a single jms queue in the same sequence they came into the web service
> endpoint?  
>  
> Thanks
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/What-s-the-best-way-to-resequence-message-tp5725327.html
> Sent from the Camel - Users mailing list archive at Nabble.com 
> (http://Nabble.com).





Re: camel-mail regarding xml configuration

2013-01-10 Thread tamil13
I tried. but dont know how to do it. Could any one post respective xml code
for sending mail?



--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-mail-regarding-xml-configuration-tp5725280p5725346.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: CamelExecutionException is caught but stack trace still dumped on screen

2013-01-10 Thread Claus Ibsen
Hi

You can customize the error handler to not log exceptions
http://camel.apache.org/error-handler.html

There is some options on the default error handler etc to do that.


On Fri, Jan 11, 2013 at 8:52 AM, demetrios
 wrote:
> Hi All
> Using camel 2.10.3.
> During the execution of my program I am having a
> org.apache.camel.CamelExecutionException raised when using the
> sendBodyAndHeader function.  I manage to catch this in my camel context so I
> can deal with it however regardless of catching it the stack trace is still
> being dumped to my console screen.
>
> I know that it is being caught because after the stack trace is dumped a log
> message as part of the catch is still outputted to screen.
>
> The reason that this is occuring is because I am passing an invalid file
> name to the sendBodyAndHeader  function, to which I am writing some
> validation around as part of the exception catch.
>
> I am not sure why this is occuring considering I am catching this exception
> as you can see in the 2nd last line of the output below.
>
> Any ideas?
>
> Here is the output
> [2013-01-11 17:35:38,619] 9 ERROR: {Sample.XMLToCSV}:Failed delivery for
> (MessageId: ID-demetrios-61146-1357885653360-0-31 on ExchangeId:
> ID-demetrios-61146-1357885653360-0-34). Exhausted after delivery attempt: 1
> caught: org.apache.camel.CamelExecutionException: Exception occurred during
> execution on the exchange: Exchange[Message: BHP,20120715,235959,57.98,R
> MUTINY,20120228,145959,22.65,B
> ]
> org.apache.camel.CamelExecutionException: Exception occurred during
> execution on the exchange: Exchange[Message: BHP,20120715,235959,57.98,R
> MUTINY,20120228,145959,22.65,B
> ]
> at
> org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1287)[cmdapp-1.0.0-SNAPSHOT.jar:]
> at
> org.apache.camel.util.ExchangeHelper.extractResultBody(ExchangeHelper.java:618)[cmdapp-1.0.0-SNAPSHOT.jar:]
> at
> org.apache.camel.impl.DefaultProducerTemplate.extractResultBody(DefaultProducerTemplate.java:454)[cmdapp-1.0.0-SNAPSHOT.jar:]
> at
> org.apache.camel.impl.DefaultProducerTemplate.extractResultBody(DefaultProducerTemplate.java:450)[cmdapp-1.0.0-SNAPSHOT.jar:]
> at
> org.apache.camel.impl.DefaultProducerTemplate.sendBodyAndHeader(DefaultProducerTemplate.java:152)[cmdapp-1.0.0-SNAPSHOT.jar:]
> at
> org.apache.camel.impl.DefaultProducerTemplate.sendBodyAndHeader(DefaultProducerTemplate.java:146)[cmdapp-1.0.0-SNAPSHOT.jar:]
> at
> com.dstgs.integration.exchange.ExchangeUtils.writeBodyToFile(ExchangeUtils.java:44)[cmdapp-1.0.0-SNAPSHOT.jar:]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)[:1.6.0_18]
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_18]
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_18]
> at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_18]
> at
> org.apache.camel.component.bean.MethodInfo.invoke(MethodInfo.java:341)[cmdapp-1.0.0-SNAPSHOT.jar:]
> at
> org.apache.camel.component.bean.MethodInfo$1.proceed(MethodInfo.java:238)[cmdapp-1.0.0-SNAPSHOT.jar:]
> at
> org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:166)[cmdapp-1.0.0-SNAPSHOT.jar:]
> at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[cmdapp-1.0.0-SNAPSHOT.jar:]
> at
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)[cmdapp-1.0.0-SNAPSHOT.jar:]
> at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[cmdapp-1.0.0-SNAPSHOT.jar:]
> at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)[cmdapp-1.0.0-SNAPSHOT.jar:]
> at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[cmdapp-1.0.0-SNAPSHOT.jar:]
> at
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)[cmdapp-1.0.0-SNAPSHOT.jar:]
> at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[cmdapp-1.0.0-SNAPSHOT.jar:]
> at
> org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:163)[cmdapp-1.0.0-SNAPSHOT.jar:]
> at
> org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)[cmdapp-1.0.0-SNAPSHOT.jar:]
> at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[cmdapp-1.0.0-SNAPSHOT.jar:]
> at
> org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:303)[cmdapp-1.0.0-SNAPSHOT.jar:]
> at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[cmdapp-1.0.0-SNAPSHOT.jar:]
> at
> org.apache.camel.processor.Pipeline.process(Pipeline.j