Re: Not writing to Error queue

2012-07-27 Thread Willem Jiang

On 7/27/12 1:25 PM, nishant.rupani wrote:

Hi,

Yes, I've setup JMS. I checked the setup by putting "" directly into the router and it worked well.

Few more things I noticed,

-   if I call a method directly from main route that throws test exception 
then it gets written to error queue fine. But if any of the recipient throws 
exception then it is not getting written to error queue.



When the recipient throws exception, is your onException being executed?
If not, it could be easy for us to create a simple unit test to 
reproduce the error.



-   It is not that onException is not being executed at all. exceptionPrint 
method of exceptionHandler is being called fine always.

Regards,
Nishant

From: Willem.Jiang [via Camel] [mailto:ml-node+s465427n5716539...@n5.nabble.com]
Sent: Friday, July 27, 2012 10:48 AM
To: Rupani, Nishant (ISGT)
Subject: Re: Not writing to Error queue

Hi,

Why are you using the scheme of wmqError?
Did you setup up jms component with id of wmqError rightly?


On 7/25/12 5:50 PM, nishant.rupani wrote:


I don't see any reference of retry or error queue write in logs. Method 
exceptionPrint is being called fine.

Snippet of my context is -

1)
  http://camel.apache.org/schema/spring"; trace="true">

  
  
java.sql.SQLException
  
  
  true
  
  
  
  

  
  
  
  
  recipients
  

  
  

2)
http://camel.apache.org/schema/spring"; 
trace="true">

  
  
  
  
  recipients
  
  

  
  
  
  

  
  
  
  
  
  
  
  
  
  
  .
  .
  .


From: iocanel [via Camel] [mailto:[hidden 
email]]
Sent: Wednesday, July 25, 2012 2:46 PM
To: Rupani, Nishant (ISGT)
Subject: Re: Not writing to Error queue

Can you please share your full camel context?
Also do you see anything in the logs?
--
*Ioannis Canellos*
*
FuseSource 

**
Blog: http://iocanel.blogspot.com
**
Twitter: iocanel
*
Ioannis Canellos http://iocanel.blogspot.com


If you reply to this email, your message will be added to the discussion below:

NAML

--
NOTICE: Morgan Stanley is not acting as a municipal advisor and the opinions or 
views contained herein are not intended to be, and do not constitute, advice 
within the meaning of Section 975 of the Dodd-Frank Wall Street Reform and 
Consumer Protection Act. If you have received this communication in error, 
please destroy all electronic and paper copies and notify the sender 
immediately. Mistransmission is not intended to waive confidentiality or 
privilege. Morgan Stanley reserves the right, to the extent permitted under 
applicable law, to monitor electronic communications. This message is subject 
to terms available at the following link: 
http://www.morganstanley.com/disclaimers. If you cannot access these links, 
please notify us by reply message and we will send the contents to you. By 
messaging with Morgan Stanley you consent to the foregoing.




--
View this message in context: 
http://camel.465427.n5.nabble.com/Not-writing-to-Error-queue-tp5716435p5716446.html
Sent from the Camel - Users mailing list archive at Nabble.com.




--
Willem
--
FuseSource
Web: http://www.fusesource.com
Blog:http://willemjiang.blogspot.com (English)
   http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang


If you reply to this email, your message will be added to the discussion below:
htt

Re: How to invoke CXF webservice from processor bean

2012-07-27 Thread Willem Jiang
Yeah, this example is setting the right headers on the message which is 
passed by the exchange.


On Sat Jul 28 06:17:56 2012, ychawla wrote:

I have something like this working in a unit test.  Maybe you can try
something similar:

public static final String CXF_OPERATION_NAME = "operation";
public static final String CXF_OPERATION_NAMESPACE = 
"http://opNamespace";;

@Test
@DirtiesContext
 public void myTest() throws Exception
 {

String
pathToFileForExchangeBody="src/test/resources/xmlInstances/mypayload.xml";

Exchange senderExchange = createCXFExchange(pathToFileForExchangeBody);

//Send the one-way exchange.  Using template.send will send a one way
message
Exchange returnExchange =
template.send("cxf:bean:mybean?dataFormat=PAYLOAD&loggingFeatureEnabled=true&synchronous=true",
senderExchange);

//Use getException to see if we received an exception
if (returnExchange.getException() != null)
{   
throw new Exception(returnExchange.getException());
}   
 }

 private Exchange createCXFExchange(String pathToFileForExchangeBody)
 {
//Create a new exchange
Exchange senderExchange = new DefaultExchange(context);

//Set the operation name and operation namespace for the CXF exchange
senderExchange.getIn().setHeader(CxfConstants.OPERATION_NAME,
CXF_OPERATION_NAME);
senderExchange.getIn().setHeader(CxfConstants.OPERATION_NAMESPACE,
CXF_OPERATION_NAMESPACE);

//Read the icotns request file from the file system, this one has no
endpoint to route to
File inputFile = new File(pathToFileForExchangeBody);

assertTrue(inputFile.exists());
log.debug("Does input file exist: " + inputFile.exists());

//Set it as the message message body
senderExchange.getIn().setBody(inputFile);

return senderExchange;

 }



--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-invoke-CXF-webservice-from-processor-bean-tp5716272p5716569.html
Sent from the Camel - Users mailing list archive at Nabble.com.





--
Willem
--
FuseSource
Web: http://www.fusesource.com
Blog:http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang



Re: How to invoke CXF webservice from processor bean

2012-07-27 Thread ychawla
I have something like this working in a unit test.  Maybe you can try
something similar:

public static final String CXF_OPERATION_NAME = "operation";
public static final String CXF_OPERATION_NAMESPACE = 
"http://opNamespace";;

@Test
@DirtiesContext
public void myTest() throws Exception
{

String
pathToFileForExchangeBody="src/test/resources/xmlInstances/mypayload.xml";

Exchange senderExchange = createCXFExchange(pathToFileForExchangeBody);

//Send the one-way exchange.  Using template.send will send a one way
message
   Exchange returnExchange =
template.send("cxf:bean:mybean?dataFormat=PAYLOAD&loggingFeatureEnabled=true&synchronous=true",
senderExchange);

//Use getException to see if we received an exception
if (returnExchange.getException() != null)
{   
throw new Exception(returnExchange.getException());
}   
}

private Exchange createCXFExchange(String pathToFileForExchangeBody)
{
//Create a new exchange
Exchange senderExchange = new DefaultExchange(context);

//Set the operation name and operation namespace for the CXF exchange
senderExchange.getIn().setHeader(CxfConstants.OPERATION_NAME,
CXF_OPERATION_NAME);
senderExchange.getIn().setHeader(CxfConstants.OPERATION_NAMESPACE,
CXF_OPERATION_NAMESPACE);

//Read the icotns request file from the file system, this one has no
endpoint to route to
File inputFile = new File(pathToFileForExchangeBody);

assertTrue(inputFile.exists());
log.debug("Does input file exist: " + inputFile.exists());

//Set it as the message message body
senderExchange.getIn().setBody(inputFile);

return senderExchange;

}



--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-invoke-CXF-webservice-from-processor-bean-tp5716272p5716569.html
Sent from the Camel - Users mailing list archive at Nabble.com.


TCP MINA With network elment

2012-07-27 Thread Omar Atia
Dears,

I have a project that has tcp mina to endpoint deployed on Fuse and is 
communicated with Network element .

The network element doesn't  return textdelimiter as normal per configuration , 
and the incoming response from Network element to Fuse is textlimited with semi 
column ;.

The Text line in camel MINA doesn't support this delimiter .

Should I use codec option and create customized encoder and decoder that looks 
for (semi column) as delimiter; or there is another way to change the 
textlinedelimter from its constant value to semi column.

If u can provide with sample code it would be really appreciate .

Appreciate your response ,

Thanks,
Omar Atia






Re: Several WMQ Managers

2012-07-27 Thread Babak Vahdat
Hi

I've added a unit-test based on your issue, however based on ActiveMQ which
we use for JMS testing.

http://svn.apache.org/viewvc?view=revision&revision=1366483

So I wonder what's exactly the issue you're facing. Maybe provide more
information like stacktrace, logs, etc..

Babak



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


Re: Not writing to Error queue

2012-07-27 Thread Christian Müller
You use the same WebShere MQ queue manager for receiving the messages and
writing the failed messages, correct?

Could you please share the entire Spring XML configuration (including the
JMS component configuration). I'm a bit confused because you use 'wmq' and
'wmqError' as schema name. Did you also configured two JMS components? If
yes, why? If no, it cannot work...

Best,
Christian

On Fri, Jul 27, 2012 at 10:10 AM, nishant.rupani <
nishant.rup...@morganstanley.com> wrote:

> Nope it doesn't. It just has print. I've removed it too but still same
> issues.
>
> Regards,
> Nishant
>
>
> From: Christian Mueller [via Camel] [mailto:
> ml-node+s465427n5716543...@n5.nabble.com]
> Sent: Friday, July 27, 2012 1:32 PM
> To: Rupani, Nishant (ISGT)
> Subject: Re: Not writing to Error queue
>
> May be the exceptionPrint method of exceptionHandler throws an exception?
>
> Christian
>
> On Fri, Jul 27, 2012 at 7:25 AM, nishant.rupani <
> [hidden email]> wrote:
>
> > Hi,
> >
> > Yes, I've setup JMS. I checked the setup by putting " > uri="wmqError:${error.queue}" />" directly into the router and it worked
> > well.
> >
> > Few more things I noticed,
> >
> > -   if I call a method directly from main route that throws test
> > exception then it gets written to error queue fine. But if any of the
> > recipient throws exception then it is not getting written to error queue.
> >
> > -   It is not that onException is not being executed at all.
> > exceptionPrint method of exceptionHandler is being called fine always.
> >
> > Regards,
> > Nishant
> >
> > From: Willem.Jiang [via Camel] [mailto:
> > [hidden email]]
> > Sent: Friday, July 27, 2012 10:48 AM
> > To: Rupani, Nishant (ISGT)
> > Subject: Re: Not writing to Error queue
> >
> > Hi,
> >
> > Why are you using the scheme of wmqError?
> > Did you setup up jms component with id of wmqError rightly?
> >
> >
> > On 7/25/12 5:50 PM, nishant.rupani wrote:
> >
> > > I don't see any reference of retry or error queue write in logs. Method
> > exceptionPrint is being called fine.
> > >
> > > Snippet of my context is -
> > >
> > > 1)
> > >  http://camel.apache.org/schema/spring"; trace="true">
> > >
> > >  
> > >
> >  java.sql.SQLException
> > >   > logRetryAttempted="true" logRetryStackTrace="true"
> maximumRedeliveries="3"
> > >
> >  retryAttemptedLogLevel="DEBUG" retriesExhaustedLogLevel="ERROR" />
> > >  
> > >
> >  true
> > >  
> > >   > method="exceptionPrint" />
> > >   />
> > >  
> > >
> > >  
> > >  
> > >   > ref="xmlToBeanProcessor" />
> > >  
> > >
> >  recipients
> > >  
> > >
> > >  
> > >  
> > >
> > > 2)
> > > http://camel.apache.org/schema/spring"; trace="true">
> > >
> > >   > errorHandlerRef="myDeadLetterErrorHandler">
> > >  
> > >   > ref="xmlToBeanProcessor" />
> > >  
> > >
> >  recipients
> > >  
> > >  
> > >
> > >   > class="org.apache.camel.builder.DeadLetterChannelBuilder">
> > >   > value="wmq:${error.queue}" />
> > >   > ref="myRedeliveryPolicyConfig" />
> > >  
> > >
> > >   > class="org.apache.camel.processor.RedeliveryPolicy">
> > >   > />
> > >  
> > >  
> > >  
> > >  
> > >   value="true"
> > />
> > >   > value="true" />
> > >  
> > >  
> > >  .
> > >  .
> > >  .
> > > 
> > >
> > > From: iocanel [via Camel] [mailto:[hidden
> > email]]
> > > Sent: Wednesday, July 25, 2012 2:46 PM
> > > To: Rupani, Nishant (ISGT)
> > > Subject: Re: Not writing to Error queue
> > >
> > > Can you please share your full camel context?
> > > Also do you see anything in the logs?
> > > --
> > > *Ioannis Canellos*
> > > *
> > > FuseSource 
> > >
> > > **
> > > Blog: http://iocanel.blogspot.com
> > > **
> > > Twitter: iocanel
> > > *
> > > Ioannis Canellos http://iocanel.blogspot.com
> > >
> > > 
> > > If you reply to this email, your message will be added to the
> discussion
> > below:
> > >
> > > NAML<
> >
> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nab

Re: After split, get Stream closed on original message

2012-07-27 Thread Christian Müller
You have to cache the stream if you want to read it multiple times:
http://camel.apache.org/stream-caching.html

Best,
Christian

On Fri, Jul 27, 2012 at 6:08 PM, marnold  wrote:

> Camel Users,
>
> I need to take a large XML message, split into smaller messages, send each
> small message to a JMS destination, then apply XSLT to original message and
> send that somewhere else...
>
> The split works well, the smaller messages are processed correctly, but
> when
> I try to apply an XSLT to the original (pre-split) message, I get stream
> closed.
>
> My route:
>
> 
>   
>  shareUnitOfWork="true">
>  inheritNamespaceTagName="outsideTag"
> xml="true"/>
> 
> 
> 
> 
> 
>
> I get this exception:
>
> [ampPoll] TimerConsumer  ERROR Error processing exchange.
> Exchange[Message: [Body is instance of java.io.InputStream]]. Caused by:
> [javax.xml.transform.TransformerException -
> javax.xml.transform.TransformerException:
> com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Stream
> closed]
> javax.xml.transform.TransformerException:
> javax.xml.transform.TransformerException:
> com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Stream
> closed
>
> If I replace the  with , I
> get
> this exception:
>
> [ampPoll] TimerConsumer  ERROR Error processing exchange.
> Exchange[Message: [Body is instance of java.io.InputStream]]. Caused by:
> [org.apache.camel.component.file.GenericFileOperationFailedException -
> Cannot store file: output.log\my-hostname-57144-1343404520362-0-3]
> org.apache.camel.component.file.GenericFileOperationFailedException: Cannot
> store file: output.log\my-hostname-57144-1343404520362-0-3
>
> Thanks in advance for any help,
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/After-split-get-Stream-closed-on-original-message-tp5716557.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Re: After split, get Stream closed on original message

2012-07-27 Thread marnold
Sorry - should've mentioned.  As is apparent from the exception, I am using
 at the top of my route, followed by http://";> .  Not
sure if that makes a difference...




--
View this message in context: 
http://camel.465427.n5.nabble.com/After-split-get-Stream-closed-on-original-message-tp5716557p5716559.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel JMX Component query

2012-07-27 Thread gilboy
Hi

I need to interact with a vendor product which exposes a number of readable
mbean attributes. Unfortunatly, no notifications exist for these attributes.
I need to poll these managed attributes every 2 mins to see if any have
updated. 

Since the JMX component does not appear to support polling I was planning on
writing my own custom component which has a scheduledpoll consumer which
runs every 2 mins and has an MBeanServerConnection and just queries the
attribute of interest and forwards to a processor.

This is what I was planning on doing. However, just wanted to check as it
seems a little strange that I am not using the JMX component with camel as
it only appears to support notifications

Thanks
Joe



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


After split, get Stream closed on original message

2012-07-27 Thread marnold
Camel Users,

I need to take a large XML message, split into smaller messages, send each
small message to a JMS destination, then apply XSLT to original message and
send that somewhere else...

The split works well, the smaller messages are processed correctly, but when
I try to apply an XSLT to the original (pre-split) message, I get stream
closed.

My route: 


  








I get this exception: 

[ampPoll] TimerConsumer  ERROR Error processing exchange.
Exchange[Message: [Body is instance of java.io.InputStream]]. Caused by:
[javax.xml.transform.TransformerException -
javax.xml.transform.TransformerException:
com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Stream
closed]
javax.xml.transform.TransformerException:
javax.xml.transform.TransformerException:
com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Stream closed

If I replace the  with , I get
this exception:

[ampPoll] TimerConsumer  ERROR Error processing exchange.
Exchange[Message: [Body is instance of java.io.InputStream]]. Caused by:
[org.apache.camel.component.file.GenericFileOperationFailedException -
Cannot store file: output.log\my-hostname-57144-1343404520362-0-3]
org.apache.camel.component.file.GenericFileOperationFailedException: Cannot
store file: output.log\my-hostname-57144-1343404520362-0-3

Thanks in advance for any help,

  



--
View this message in context: 
http://camel.465427.n5.nabble.com/After-split-get-Stream-closed-on-original-message-tp5716557.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Several WMQ Managers

2012-07-27 Thread Babak Vahdat


Am 27.07.12 14:16 schrieb "Caa_man" unter :

>Hello everyone!
>
>I would like to use several MQ managers in my Camel application (I use
>Camel
>2.9.2) like this:
>
>
>
>...
>
>
>
>
>...
>
>
> 
> 
>   
>   
>   
>   
>   
>   
> 
>   
>
> 
> 
>   
>   
>   
>   
>   
>   
> 
>   
>
>But it doesnt work and i have to use one JmsComponent with name "wmq". So
>i
>hope use this JmsComponent in from's uri with specified QueueManager's
>name
>(not only Queue's name) for several queuemanager/queue pairs. Is it
>possible? Or... Are there other ways exist?
>

No you can't specify a QueueManager name inside the URI by the from
clause, as the concept of QueueManager is an IBM abstraction which is
*not* part of the JMS specification, so why not supported. For example
AFAIK ActiveMQ doesn't have the notion of QueueManager and whatnot.

To my understanding the way you've tried should already work (using
different bean id's). So what is exactly the problem? What do you mean
with "But it doesn't work"?

Babak 

>
>
>--
>View this message in context:
>http://camel.465427.n5.nabble.com/Several-WMQ-Managers-tp5716548.html
>Sent from the Camel - Users mailing list archive at Nabble.com.




Several WMQ Managers

2012-07-27 Thread Caa_man
Hello everyone!

I would like to use several MQ managers in my Camel application (I use Camel
2.9.2) like this:



...




...


 
  






  


 
  






  


But it doesnt work and i have to use one JmsComponent with name "wmq". So i
hope use this JmsComponent in from's uri with specified QueueManager's name
(not only Queue's name) for several queuemanager/queue pairs. Is it
possible? Or... Are there other ways exist?



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


RE: Strange behavior with Camel Validator Component

2012-07-27 Thread DEPREZ Arnaud AWL-IT
Yeah it's solve, it was just a problem of bad coding that sent the following 
message :
""com.awl.acq.wlsi.sips.xsd" doesnt contain ObjectFactory.class or jaxb.index 
to validate with a xsd."

To the validation endpoint.

Thanks for your help and your time :-)

KR,


Arnaud Deprez

-Original Message-
From: Christian Müller [mailto:christian.muel...@gmail.com]
Sent: jeudi 26 juillet 2012 21:30
To: users@camel.apache.org
Subject: Re: Strange behavior with Camel Validator Component

Hey Arnaud,

did you could solve the issue by yourself?

Best,
Christian

On Thu, Jul 26, 2012 at 3:55 PM, DEPREZ Arnaud AWL-IT <
arnaud.dep...@atos.net> wrote:

> Sorry, for this mail !
>
> It was a very bad code that send this message "com.awl.acq.wlsi.sips.xsd"
> doesnt contain ObjectFactory.class or jaxb.index to validate with a xsd.
>
> KR,
>
>
> Arnaud Deprez
>
> -Original Message-
> From: DEPREZ Arnaud AWL-IT [mailto:arnaud.dep...@atos.net]
> Sent: jeudi 26 juillet 2012 14:59
> To: users@camel.apache.org
> Subject: Strange behavior with Camel Validator Component
>
> Hi all,
>
> I'm very surprised with this strange behavior.
> I'm using Camel 2.6.0-fuse-02-05 with Servicemix 4.3.1-fuse02-05.
>
> When I try to validate an xml file with the endpoint :
> validator:file:path_to_the_file, I get the following exception :
>
> 14:11:49,633 | ERROR | 82 - org.apache.camel.camel-core - 2.6.0.fuse-02-05
> | processSynchronize |  Failed delivery for exchangeId:
> ID-sqsia0005ap-52996-1343303938957-27-1. Exhausted after delivery attempt:
> 1 caught: org.apache.camel.processor.validation.SchemaValidationException:
> Validation failed for:
> com.sun.org.apache.xerces.internal.jaxp.validation.SimpleXMLSchema@78cd3e08
>  com.sun.org.apache.xerces.internal.jaxp.validation.SimpleXMLSchema@78cd3e08>
> fatal errors: [org.xml.sax.SAXParseException: Content is not allowed in
> prolog.]. Exchange[Message: "com.awl.acq.wlsi.sips.xsd" doesnt contain
> ObjectFactory.class or jaxb.index]
> org.apache.camel.processor.validation.SchemaValidationException:
> Validation failed for:
> com.sun.org.apache.xerces.internal.jaxp.validation.SimpleXMLSchema@78cd3e08
>  com.sun.org.apache.xerces.internal.jaxp.validation.SimpleXMLSchema@78cd3e08>
> fatal errors: [org.xml.sax.SAXParseException: Content is not allowed in
> prolog.]. Exchange[Message: "com.awl.acq.wlsi.sips.xsd" doesnt contain
> ObjectFactory.class or jaxb.index]
>at
> org.apache.camel.processor.validation.ValidatingProcessor.process(ValidatingProcessor.java:91)[82:org.apache.camel.camel-core:2.6.0.fuse-02-05]
>at
> org.apache.camel.impl.ProcessorEndpoint.onExchange(ProcessorEndpoint.java:102)[82:org.apache.camel.camel-core:2.6.0.fuse-02-05]
>at
> org.apache.camel.impl.ProcessorEndpoint$1.process(ProcessorEndpoint.java:72)[82:org.apache.camel.camel-core:2.6.0.fuse-02-05]
>at
> org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)[82:org.apache.camel.camel-core:2.6.0.fuse-02-05]
>at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:91)[82:org.apache.camel.camel-core:2.6.0.fuse-02-05]
>at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:62)[82:org.apache.camel.camel-core:2.6.0.fuse-02-05]
>at
> org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:104)[82:org.apache.camel.camel-core:2.6.0.fuse-02-05]
>at
> org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:272)[82:org.apache.camel.camel-core:2.6.0.fuse-02-05]
>at
> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:98)[82:org.apache.camel.camel-core:2.6.0.fuse-02-05]
>at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:91)[82:org.apache.camel.camel-core:2.6.0.fuse-02-05]
>at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:62)[82:org.apache.camel.camel-core:2.6.0.fuse-02-05]
>at
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[82:org.apache.camel.camel-core:2.6.0.fuse-02-05]
>at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[82:org.apache.camel.camel-core:2.6.0.fuse-02-05]
>at
> org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:99)[82:org.apache.camel.camel-core:2.6.0.fuse-02-05]
>at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:91)[82:org.apache.camel.camel-core:2.6.0.fuse-02-05]
>at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:62)[82:org.apache.camel.camel-core:2.6.0.fuse-02-05]
>at
> org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:299)[82:org.apache.camel.camel-core:2.6.0.fuse-02-05]
>at
> or

RE: Not writing to Error queue

2012-07-27 Thread nishant.rupani
Nope it doesn't. It just has print. I've removed it too but still same issues.

Regards,
Nishant


From: Christian Mueller [via Camel] 
[mailto:ml-node+s465427n5716543...@n5.nabble.com]
Sent: Friday, July 27, 2012 1:32 PM
To: Rupani, Nishant (ISGT)
Subject: Re: Not writing to Error queue

May be the exceptionPrint method of exceptionHandler throws an exception?

Christian

On Fri, Jul 27, 2012 at 7:25 AM, nishant.rupani <
[hidden email]> wrote:

> Hi,
>
> Yes, I've setup JMS. I checked the setup by putting " uri="wmqError:${error.queue}" />" directly into the router and it worked
> well.
>
> Few more things I noticed,
>
> -   if I call a method directly from main route that throws test
> exception then it gets written to error queue fine. But if any of the
> recipient throws exception then it is not getting written to error queue.
>
> -   It is not that onException is not being executed at all.
> exceptionPrint method of exceptionHandler is being called fine always.
>
> Regards,
> Nishant
>
> From: Willem.Jiang [via Camel] [mailto:
> [hidden email]]
> Sent: Friday, July 27, 2012 10:48 AM
> To: Rupani, Nishant (ISGT)
> Subject: Re: Not writing to Error queue
>
> Hi,
>
> Why are you using the scheme of wmqError?
> Did you setup up jms component with id of wmqError rightly?
>
>
> On 7/25/12 5:50 PM, nishant.rupani wrote:
>
> > I don't see any reference of retry or error queue write in logs. Method
> exceptionPrint is being called fine.
> >
> > Snippet of my context is -
> >
> > 1)
> >  http://camel.apache.org/schema/spring"; trace="true">
> >
> >  
> >
>  java.sql.SQLException
> >   logRetryAttempted="true" logRetryStackTrace="true" maximumRedeliveries="3"
> >
>  retryAttemptedLogLevel="DEBUG" retriesExhaustedLogLevel="ERROR" />
> >  
> >
>  true
> >  
> >   method="exceptionPrint" />
> >  
> >  
> >
> >  
> >  
> >   ref="xmlToBeanProcessor" />
> >  
> >
>  recipients
> >  
> >
> >  
> >  
> >
> > 2)
> > http://camel.apache.org/schema/spring"; trace="true">
> >
> >   errorHandlerRef="myDeadLetterErrorHandler">
> >  
> >   ref="xmlToBeanProcessor" />
> >  
> >
>  recipients
> >  
> >  
> >
> >   class="org.apache.camel.builder.DeadLetterChannelBuilder">
> >   value="wmq:${error.queue}" />
> >   ref="myRedeliveryPolicyConfig" />
> >  
> >
> >   class="org.apache.camel.processor.RedeliveryPolicy">
> >   />
> >  
> >  
> >  
> >  
> >   />
> >   value="true" />
> >  
> >  
> >  .
> >  .
> >  .
> > 
> >
> > From: iocanel [via Camel] [mailto:[hidden
> email]]
> > Sent: Wednesday, July 25, 2012 2:46 PM
> > To: Rupani, Nishant (ISGT)
> > Subject: Re: Not writing to Error queue
> >
> > Can you please share your full camel context?
> > Also do you see anything in the logs?
> > --
> > *Ioannis Canellos*
> > *
> > FuseSource 
> >
> > **
> > Blog: http://iocanel.blogspot.com
> > **
> > Twitter: iocanel
> > *
> > Ioannis Canellos http://iocanel.blogspot.com
> >
> > 
> > If you reply to this email, your message will be added to the discussion
> below:
> >
> > NAML<
> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >
> >
> >
> --
> > NOTICE: Morgan Stanley is not acting as a municipal advisor and the
> opinions or views contained herein are not intended to be, and do not
> constitute, advice within the meaning of Section 975 of the Dodd-Frank Wall
> Street Reform and Consumer Protection Act. If you have received this
> communication in error, please destroy all electronic and paper copies and
> notify the sender immediately. Mistransmission is not intended to waive
> confidentiality or privilege. Morgan Stanley reserves the right, t

Re: Not writing to Error queue

2012-07-27 Thread Christian Müller
May be the exceptionPrint method of exceptionHandler throws an exception?

Christian

On Fri, Jul 27, 2012 at 7:25 AM, nishant.rupani <
nishant.rup...@morganstanley.com> wrote:

> Hi,
>
> Yes, I've setup JMS. I checked the setup by putting " uri="wmqError:${error.queue}" />" directly into the router and it worked
> well.
>
> Few more things I noticed,
>
> -   if I call a method directly from main route that throws test
> exception then it gets written to error queue fine. But if any of the
> recipient throws exception then it is not getting written to error queue.
>
> -   It is not that onException is not being executed at all.
> exceptionPrint method of exceptionHandler is being called fine always.
>
> Regards,
> Nishant
>
> From: Willem.Jiang [via Camel] [mailto:
> ml-node+s465427n5716539...@n5.nabble.com]
> Sent: Friday, July 27, 2012 10:48 AM
> To: Rupani, Nishant (ISGT)
> Subject: Re: Not writing to Error queue
>
> Hi,
>
> Why are you using the scheme of wmqError?
> Did you setup up jms component with id of wmqError rightly?
>
>
> On 7/25/12 5:50 PM, nishant.rupani wrote:
>
> > I don't see any reference of retry or error queue write in logs. Method
> exceptionPrint is being called fine.
> >
> > Snippet of my context is -
> >
> > 1)
> >  http://camel.apache.org/schema/spring"; trace="true">
> >
> >  
> >
>  java.sql.SQLException
> >   logRetryAttempted="true" logRetryStackTrace="true" maximumRedeliveries="3"
> >
>  retryAttemptedLogLevel="DEBUG" retriesExhaustedLogLevel="ERROR" />
> >  
> >
>  true
> >  
> >   method="exceptionPrint" />
> >  
> >  
> >
> >  
> >  
> >   ref="xmlToBeanProcessor" />
> >  
> >
>  recipients
> >  
> >
> >  
> >  
> >
> > 2)
> > http://camel.apache.org/schema/spring"; trace="true">
> >
> >   errorHandlerRef="myDeadLetterErrorHandler">
> >  
> >   ref="xmlToBeanProcessor" />
> >  
> >
>  recipients
> >  
> >  
> >
> >   class="org.apache.camel.builder.DeadLetterChannelBuilder">
> >   value="wmq:${error.queue}" />
> >   ref="myRedeliveryPolicyConfig" />
> >  
> >
> >   class="org.apache.camel.processor.RedeliveryPolicy">
> >   />
> >  
> >  
> >  
> >  
> >   />
> >   value="true" />
> >  
> >  
> >  .
> >  .
> >  .
> > 
> >
> > From: iocanel [via Camel] [mailto:[hidden
> email]]
> > Sent: Wednesday, July 25, 2012 2:46 PM
> > To: Rupani, Nishant (ISGT)
> > Subject: Re: Not writing to Error queue
> >
> > Can you please share your full camel context?
> > Also do you see anything in the logs?
> > --
> > *Ioannis Canellos*
> > *
> > FuseSource 
> >
> > **
> > Blog: http://iocanel.blogspot.com
> > **
> > Twitter: iocanel
> > *
> > Ioannis Canellos http://iocanel.blogspot.com
> >
> > 
> > If you reply to this email, your message will be added to the discussion
> below:
> >
> > NAML<
> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >
> >
> >
> --
> > NOTICE: Morgan Stanley is not acting as a municipal advisor and the
> opinions or views contained herein are not intended to be, and do not
> constitute, advice within the meaning of Section 975 of the Dodd-Frank Wall
> Street Reform and Consumer Protection Act. If you have received this
> communication in error, please destroy all electronic and paper copies and
> notify the sender immediately. Mistransmission is not intended to waive
> confidentiality or privilege. Morgan Stanley reserves the right, to the
> extent permitted under applicable law, to monitor electronic
> communications. This message is subject to terms available at the following
> link: http://www.morganstanley.com/disclaimers. If you cannot access
> these links, please notify

Re: How to keep sending in chronological order even when peer was down for a while

2012-07-27 Thread Jozsi_LXIII
Thank you Pontus and Willem for the recommendations.

We are using JBoss 4.0.4 and 5.1.0 and rather topics than queues and we have
several source systems (even our Jboss servers can do that) using several
protocols to provide messages for that topic.

Could be possible that we go for 7.1.1 for both but this is not yet decided
(due to HornetQ this would be an option).

Also the message exchange is only needed when both products (i.e.
servers) are installed.

The bridge between our servers , which  I've already tried out, works quite
fine, but there are some ugly side effects like having tons of errors in
case of problems.=20

As you can imagine, the customers don't want to analyze log files to find
out if connection is ok or not.

Giving access to the JMX console is also not an option.=20

Beside of these things the JMS persistence on these "old" JBoss versions is
RDBMS based, which means also that huge DB maintenance is required.

As you all know, the customer just want to see a green or red "traffic
light" and eventually the reason to be able to react.

I thought, maybe this kind of functionality is much easier to be realized
with Camel (including own local Db) than using that bridge.

I've checked again the possibilities in Camel and it looks like the MongoDb
would also be an option to persist the messages locally.

I have to take a closer look to that because first steps went wrong ;-)

Thank you again.




--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-keep-sending-in-chronological-order-even-when-peer-was-down-for-a-while-tp5716501p5716542.html
Sent from the Camel - Users mailing list archive at Nabble.com.