ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nowakowski, Mateusz" <Mateusz.Nowakow...@sabre-holdings.com>
Subject OdeService does not set error to the message exchange
Date Tue, 27 Nov 2007 13:46:56 GMT
When there's exception thrown in the OdeService.invokeOde:

org.apache.ode.jbi.msgmap.MessageTranslationException: Could not find a
mapper for request message for JBI MEX ID:10.136.44.164-
11681241c72-4:7; ODE MEX 4611686018427387904 is failed.
        at org.apache.ode.jbi.OdeService.invokeOde(OdeService.java:240)
        at
org.apache.ode.jbi.OdeService.onJbiMessageExchange(OdeService.java:148)
        at
org.apache.ode.jbi.JbiMessageExchangeEventRouter.onJbiMessageExchange(Jb
iMessageExchangeEventRouter.java:47)
        at org.apache.ode.jbi.Receiver$1.run(Receiver.java:179)
        at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
        at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
        at java.util.concurrent.FutureTask.run(FutureTask.java:123)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecuto
r.java:650)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja
va:675)
        at java.lang.Thread.run(Thread.java:595)

The exception is caught in onJbiMessageExchange, by the following code:

            try {
                invokeOde(jbiMex, ((InOut) jbiMex).getInMessage());
                success = true;
            } catch (Exception ex) {
                __log.error("Error invoking ODE.", ex);
                err = ex;
            } catch (Throwable t) {
                __log.error("Unexpected error invoking ODE.", t);
                err = new RuntimeException(t);
            } finally {
                // If we got an error that wasn't sent.  
                if (jbiMex.getStatus() == ExchangeStatus.ACTIVE &&
!success) {
                    if (err != null && jbiMex.getError() != null)  {
                        jbiMex.setError(err);
                    }
                    jbiMex.setStatus(ExchangeStatus.ERROR);     
                    _ode.getChannel().send(jbiMex);         
                }       
            }
The condition (err != null && jbiMex.getError() != null)   leads to a
situation,
that the status of the MEX is set to ExchangeStatus.ERROR, but the error
of the MEX is not set (!)

At the end of the day, the endpoint that invoked ODE, gets following
error:
java.lang.Exception: Unkown error (exchange aborted ?)
        at
org.apache.servicemix.http.endpoints.HttpConsumerEndpoint.process(HttpCo
nsumerEndpoint.java:263)
        at
org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.ja
va:71)

because it cannot find the error in the MEX.

-- 
Regards
Mateusz Nowakowski


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message