You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Claus Ibsen <cl...@gmail.com> on 2010/06/01 08:36:03 UTC

Re: Method setExceptionListener not permitted in J2EE-Servers

On Mon, May 31, 2010 at 9:15 AM, waterback <ma...@innoq.com> wrote:
>
> Hi Claus,
>
> this bean is configured like this:
>
>        <bean id="ibmmqvsl"
> class="org.apache.camel.component.jms.JmsComponent">
>                <property name="connectionFactory" ref="jmshostcf" />
>                <property name="transactionManager" ref="txman" />
>        </bean>
>
>        <jee:jndi-lookup id="jmshostcf" jndi-name="java:comp/env/jms/vslmqmgr"
> cache="true" />
>
>        <bean id="txman"
> class="org.springframework.transaction.jta.WebSphereUowTransactionManager"
> />
>
>        <jee:jndi-lookup id="zifsdb" jndi-name="java:comp/env/jdbc/ZIFSDB" />
>
> And the JNDI-lookup looks up a WMQ-Connection Factory configured in
> WebSphere AS.
>
> Maybe this is of interest or not, but i have a @ManagedResource - JMX-Bean,
> that's called from a simple Jar from outside of WebSphere. And this
> JMX-MBean has the Camelcontext injected from Spring.
> Maybe that context has sth to do with it, because actually the above
> configuration is used by other Routes that work. But those routes get
> started from an incoming message from the messagebroker, meaning the context
> (of route starting) stays within itself.
>

Yeah definitely try without that JMX stuff. It would help narrow down
what "area" causes this for you.


>
>
>
>
> Claus Ibsen-2 wrote:
>>
>> Hi
>>
>> How have you configured this bean, ibmmqvsl ?
>>
>>
>>
>>
>
> --
> View this message in context: http://old.nabble.com/Method-setExceptionListener-not-permitted-in-J2EE-Servers-tp28693246p28727346.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

Re: Method setExceptionListener not permitted in J2EE-Servers

Posted by waterback <ma...@innoq.com>.
For the record...

My Problem actually had nothing to do with what the exception said... (as
usual :-))

My Route now looks like this:

		from(routeStart).
			transacted().routeId("pserun.fullrun.route").inOut().
			to("zlog:com.innoq.zifs?level=info").
			setHeader("chunksize", constant(sizeofchunk)).
			bean(bean, "createNewPSERun").
			bean(bean, "getActivePSERun").  
			bean(bean, "createNewChunks").
			split(body()).
		   to(ExchangePattern.InOnly, wlDistributor).  
			setBody().simple(STARTED);


The important change is that i told the jms-producer to have a MEP INONLY,
whereas the whole route is
MEP INOUT.

I tried that out because of a "gut feeling" and it turned out to be the
solution.... pfff...
Although i still don't understand why it did get to that exception...
-- 
View this message in context: http://old.nabble.com/Method-setExceptionListener-not-permitted-in-J2EE-Servers-tp28693246p28739896.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Method setExceptionListener not permitted in J2EE-Servers

Posted by waterback <ma...@innoq.com>.
Now i'm starting the route via RESTful Service and
the ProducerTemplate.
But it' doesn't make any difference.

The same about this is, that the Camelcontext gets injected.
The injection is now via com.sun.jersey.spi.inject.Inject;

What i really don't understand is why i get the same error when i omit the
following out of my route definition...

		errorHandler(defaultErrorHandler().logStackTrace(true));

		onException(PSENoWorkloadException.class).
			handled(true).
			bean(bean, "finalizeRun").	
			setBody().simple(NOWORKLOAD);
		
		onException(PSERunActiveException.class).
			handled(true).
			setBody().simple(ACTIVERUN);

This is then the only difference, between the routes that work and the one
that doesn't... 
i'm puzzled...



-- 
View this message in context: http://old.nabble.com/Method-setExceptionListener-not-permitted-in-J2EE-Servers-tp28693246p28739458.html
Sent from the Camel - Users mailing list archive at Nabble.com.