Hi Have you configured an exception listener explicit on the MQ endpoint?
By debugging a simple JmsInOut unit test with embedded AMQ there is no exeption listener set when that Requester is started. On Thu, May 27, 2010 at 2:29 PM, waterback <[email protected]> wrote: > > Hello, > > i've got a real ugly problem right now as i try to use the camel > onException(....) in my j2ee-application on a specific route on a webapp in > websphere 6.1-Server. > > My Routedefinition is: > from(routeStart). > routeId("pserun.fullrun.route"). > > onException(PSENoWorkloadException.class).handled(true).bean(bean, > "finalizeRun").setBody(constant(NOWORKLOAD)).end(). > > onException(PSERunActiveException.class).handled(true).setBody(constant(ACTIVERUN)).end(). > inOut(). > to("zlog:com.innoq.zifs?level=info"). > setHeader("chunksize", constant(sizeofchunk)). > bean(bean, "createNewPSERun"). > bean(bean, "getActivePSERun"). > bean(bean, "createNewChunks"). > split(body()). > to(wlDistributor). > setBody().simple(STARTED); > > What i try to do is catch both exceptions, handle them differently, set a > string on the body and put that back to the caller (is inout). > > The (almost) final "to" to wlDistributor goes to a JMS-WebSphereMQ. > The ugly thing is that is doesn't allow to use setExceptionListener() on the > JMS-endpoint, which is obviously used, when using onException anywhere. > > Any tries to use JMS-Call (which is done in the following stacktrace) in a > different route called from this one, have not been successful... > > I only need to handle those Exceptions on the bean-calls in between. > I even tried doTry() and so on - but it ends up the same. > > How can i tell camel to stop the use of exceptionlistener at some point? > > Please help ! > > i get the following exception: > [27.05.10 14:12:54:030 CEST] 000014c5 SedaConsumer E > org.apache.camel.processor.Logger log Error processing exchange. > Exchange[Message: com.innoq.zifs.pserun.model.wlch...@59e059e]. Caused by: > [org.apache.camel.FailedToCreateProducerException - Failed to create > Producer for endpoint: Endpoint[ibmmqvsl://queue:DEB.VSL.ZIFS.PSEWL.ARE]. > Reason: org.springframework.jms.IllegalStateException: Method > setExceptionListener not permitted; nested exception is > javax.jms.IllegalStateException: Method setExceptionListener not permitted] > > org.apache.camel.FailedToCreateProducerException: Failed to create Producer > for endpoint: Endpoint[ibmmqvsl://queue:DEB.VSL.ZIFS.PSEWL.ARE]. Reason: > org.springframework.jms.IllegalStateException: Method setExceptionListener > not permitted; nested exception is javax.jms.IllegalStateException: Method > setExceptionListener not permitted > at > org.apache.camel.component.jms.JmsProducer.testAndSetRequestor(JmsProducer.java:116) > at > org.apache.camel.component.jms.JmsProducer.processInOut(JmsProducer.java:175) > at > org.apache.camel.component.jms.JmsProducer.process(JmsProducer.java:147) > at > org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:97) > at > org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:95) > at > org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:146) > at > org.apache.camel.processor.SendProcessor.doProcess(SendProcessor.java:94) > at > org.apache.camel.processor.SendProcessor.process(SendProcessor.java:82) > at > org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67) > at > org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:53) > at > org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:82) > at > org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:93) > at > org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67) > at > org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:177) > at > org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:143) > at > org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:88) > at > org.apache.camel.processor.DefaultErrorHandler.process(DefaultErrorHandler.java:49) > at > org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:228) > at > org.apache.camel.processor.UnitOfWorkProcessor.processNext(UnitOfWorkProcessor.java:66) > at > org.apache.camel.processor.DelegateProcessor.process(DelegateProcessor.java:48) > at > org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67) > at > org.apache.camel.component.seda.SedaConsumer.sendToConsumers(SedaConsumer.java:161) > at > org.apache.camel.component.seda.SedaConsumer.run(SedaConsumer.java:109) > at > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:678) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:703) > at java.lang.Thread.run(Thread.java:811) > Caused by: org.springframework.jms.IllegalStateException: Method > setExceptionListener not permitted; nested exception is > javax.jms.IllegalStateException: Method setExceptionListener not permitted > at > org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:271) > at > org.springframework.jms.support.JmsAccessor.convertJmsAccessException(JmsAccessor.java:168) > at > org.springframework.jms.listener.AbstractJmsListeningContainer.initialize(AbstractJmsListeningContainer.java:180) > at > org.springframework.jms.listener.AbstractJmsListeningContainer.afterPropertiesSet(AbstractJmsListeningContainer.java:134) > at > org.apache.camel.component.jms.requestor.Requestor.doStart(Requestor.java:205) > > ... > > > > -- > View this message in context: > http://old.nabble.com/Method-setExceptionListener-not-permitted-in-J2EE-Servers-tp28693246p28693246.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
