I think the recieving component throws the exception.
I'm using the components from ServiceMix (a.p.sm.tck.SenderPojo,
a.p.sm.tck.ReceiverComponent) with a little "customization" - i changed
the QName for the components which is not possible from outside.
The FROM_URI refers to the SenderPoJo. The TO_URI refers to the
RecieverComponent.
There is the stack trace:
--- 8< ---
11:03:28,934 | ERROR | eceiver-thread-1 | SedaQueue
| servicemix.jbi.nmr.flow.seda.SedaQueue$1 136 |
[EMAIL PROTECTED] got error
processing InOut[
id: ID:127.0.1.1-116d852085e-4:0
status: Done
role: provider
endpoint: ExampleService20JBIPort
in: Unable to display: java.io.IOException: Stream closed
]
javax.jbi.messaging.MessagingException: illegal exchange status: done
at
org.apache.servicemix.jbi.messaging.MessageExchangeImpl.handleSend(MessageExchangeImpl.java:626)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:385)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:431)
at
org.apache.servicemix.components.util.PojoSupport.done(PojoSupport.java:200)
at
net.sourceforge.gaswerk.samples.jmagazin.ReceiverComponent.onMessageExchange(ReceiverComponent.java:37)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
--- 8< ---
Thanks
Kristian
Guillaume Nodet schrieb:
Well, this may a bug ...
Which exchange is failing : the received one or the one sent by camel ?
Also do you have the full stack trace / related error log ?
On Dec 14, 2007 12:08 PM, Kristian Köhler <[EMAIL PROTECTED]> wrote:
Hi
I'm trying something similar. But encountered problems with the routing
from and back to JBI.
I configured a route via Camel RouteBuilder.
--- 8< ---
...
from(FROM_URI).to(TO_URI);
...
--- 8< ---
Both URIs are JBI URIs ("jbi:endpoint:http://...").
This sample works fine.
But when I want to add some more "transformation/mediation logic" I'm
getting exceptions that the JBI Message Exchange is no longer ACTIVE.
"illegal exchange status: done"
The "transformation logic" is a simple Velocity template which
transforms my request to another format.
My RouteBuilder look like:
--- 8< ---
from(FROM_URI).setHeader("newName2",
constant("Nix")).to("velocity:template.vm").to(TO_URI);
--- 8< ---
Any ideas?
Thanks
Kristian
Guillaume Nodet schrieb:
>From a camel perspective, servicemix / jbi is one of the numerous
protocols
supported.
So your route should looks like:
from("jbi:endpoint:http://servicemix.apache.org/samples/bridge<
http://servicemix.apache.org/samples/bridge>
/pipeline/endpoint")
.to("jbi:service:http://servicemix.apache.org/samples/bridge<
http://servicemix.apache.org/samples/bridge>
/xslt")
.to(jbi:service:http://servicemix.apache.org/samples/bridge<
http://servicemix.apache.org/samples/bridge>
/jms")
"jbi" tells camel to use the jbi transport. When creating a consumer,
it
will activate a jbi endpoint, else it will use the delivery channel to
send
the exchange to the given jbi target. See
http://servicemix.apache.org/uris.html. Such uris must be prefixed by
"jbi"
.
On Dec 14, 2007 11:29 AM, Robert Thullner <[EMAIL PROTECTED]> wrote:
Hi
I have changed the bridge example so that it is triggered by a quartz,
that
writes out a message to a jms queue in regular intervals. The only
thing I
changed was the http-su to a quartz-su. The example worked fine.
Now I want to replace the EIP component with a camel component that
does
the
routing for me. But I have difficulties, because I do not know how to
write
camel rule. Here is the
simple example from the bridge-eip:
<?xml version="1.0"?>
<beans xmlns:eip="http://servicemix.apache.org/eip/1.0"
xmlns:b="http://servicemix.apache.org/samples/bridge">
<eip:pipeline service="b:pipeline" endpoint="endpoint">
<eip:transformer>
<eip:exchange-target service="b:xslt" />
</eip:transformer>
<eip:target>
<eip:exchange-target service="b:jms" />
</eip:target>
</eip:pipeline>
</beans>
So there is the same pipeline, as it is in the bridge example. My
problem
now is, when I define camel route I do not have the service attribute
set
and therefore servicemix throws an exception. This is how my camel
context
looks like.
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:b="http://servicemix.apache.org/samples/bridge"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/camel/schema/spring
http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
<camelContext xmlns="http://activemq.apache.org/camel/schema/spring"
useJmx="true" >
<route>
<from uri="b:pipeline"/>
<to uri="b:jms"/>
</route>
<package>eip.status.servicemix</package>
</camelContext>
</beans>
My MyRouteBuilder.jave file is empty.
Can anybody explain me, how I can use the EIP route in Camel?
When starting servicemix, I get this exception:
org.apache.camel.RuntimeCamelException:
org.apache.camel.NoSuchEndpointException: No endpoint could be found
for:
b:pipeline
I understand the exception, because I do not have the b:pipeline
defined.
My
problem is, that I do not know how to define it in camel. I am using
servicemix 3.2.1 .
Thanks for any help
Robert
--
http://gaswerk.sourceforge.net
--
GASwerk - Geronimo Application Assemblies
http://gaswerk.sourceforge.net