L.S.,
Did you manage to get this working? If you rebuild you local project
now with ServiceMix 3.2.2-SNAPSHOT and Camel 1.4-SNAPSHOT as the
dependencies, the problem should go away -- all of these are now
available in the snapshot repos. You will also have to upgrade your
ServiceMix container's Camel component with the new 3.2.2-SNAPSHOT
version as well -- be sure to remove the old one before copying the new
version in the deploy folder.
Regards,
Gert
John MIPIH wrote:
Thanks a lot Gert. How can I get the patch and build new camel jars ? I
wanted to add the deprecated method by mysel but i can't download the camel
source distribution from the official website... (The requested URL
/dist/activemq/apache-camel/1.4.0/apache-camel-1.4.0-src.zip was not found
on this server. for every mirror)
I tried mvn -X clean install but "camel-core:jar:1.3.0" appear 10 times, I
don't know how to change it. Here's my pom and i enclosed the log of mvn -X
( http://www.nabble.com/file/p18086666/log.txt log.txt ) :
<?xml version="1.0" encoding="UTF-8"?><project>
<parent>
<artifactId>parent</artifactId>
<groupId>fr.mm.pocsoa.esb</groupId>
<version>1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>fr.mm.pocsoa.esb</groupId>
<artifactId>camel-routage</artifactId>
<packaging>jbi-service-unit</packaging>
<name>SE : Camel</name>
<version>1.0</version>
<url>http://www.mipih.fr</url>
<build>
<defaultGoal>install</defaultGoal>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.servicemix.tooling</groupId>
<artifactId>jbi-maven-plugin</artifactId>
<version>${servicemix-version}</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.apache.camel</groupId>
<artifactId>camel-maven-plugin</artifactId>
<version>${camel-version}</version>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<releases />
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>apache</id>
<name>Apache Repository</name>
<url>http://people.apache.org/repo/m2-ibiblio-rsync-repository</url>
</repository>
<repository>
<releases>
<enabled>false</enabled>
</releases>
<snapshots />
<id>apache.snapshots</id>
<name>Apache Snapshots Repository</name>
<url>http://people.apache.org/repo/m2-snapshot-repository</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<releases />
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>apache</id>
<name>Apache Repository</name>
<url>http://people.apache.org/repo/m2-ibiblio-rsync-repository</url>
</pluginRepository>
<pluginRepository>
<releases>
<enabled>false</enabled>
</releases>
<snapshots />
<id>apache.snapshots</id>
<name>Apache Snapshots Repository</name>
<url>http://people.apache.org/repo/m2-snapshot-repository</url>
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>org.apache.servicemix</groupId>
<artifactId>servicemix-camel</artifactId>
<version>${servicemix-version}</version>
</dependency>
<dependency>
<groupId>org.apache.servicemix</groupId>
<artifactId>servicemix-core</artifactId>
<version>${servicemix-version}</version>
</dependency>
</dependencies>
<properties>
<servicemix-version>3.3-SNAPSHOT</servicemix-version>
<camel-version>1.4-SNAPSHOT</camel-version>
<componentName>servicemix-camel</componentName>
</properties>
</project>
Gert Vanthienen wrote:
L.S.,
I have just committed a fix for this problem to Camel -- if you have
trouble finding the offending Camel 1.3 jar file, you can just rebuild
Camel yourself locally and the 1.4-SNAPSHOT you'll end up with in your
local repo will solve the issue for you.
Regards,
Gert
Gert Vanthienen wrote:
L.S.,
With recent refactorings on Apache Camel, a method on the Endpoint
interface was renamed from getCamelContext() to getContext(). Looking
at the exception, it looks like you have some code that was compiled
with Camel 1.3 and you're now running it on Camel 1.4. Make sure you
have changed every single reference to Camel 1.3 with Camel 1.4
SNAPSHOT -- just use mvn -X clean install jbi:servicemix to check out
classpaths and dependencies used. I was actually just creating a JIRA
issue to re-add the missing methods and mark them deprecated instead,
just to avoid this particular problem...
Gert
John MIPIH wrote:
Thanks a lot for your quick answer, I am going nut with this issue.
I changed my camel-context (logs are now before to:jbi...) and enabled
logging on my CXF web service. The log shows that camel sends an
empty soap
enveloppe to my web service when content-based routing is activated.
As you recommended I tried to use servicemix 3.3-SNAPSHOT and Camel
1.4-SNAPSHOT. I changed all my pom's to have
<servicemix-version>3.3-SNAPSHOT</servicemix-version>
<camel-version>1.4-SNAPSHOT</camel-version>
I launch my SA using "mvn clean install jbi:servicemix", deploying is
fine
but when I send a message to camel I have :
java.lang.NoSuchMethodError:
org.apache.camel.Endpoint.getCamelContext()Lorg/apache/camel/CamelContext;
at
org.apache.servicemix.camel.CamelJbiEndpoint.handleActiveProviderExchange(CamelJbiEndpoint.java:100)
at
org.apache.servicemix.camel.CamelJbiEndpoint.process(CamelJbiEndpoint.java:74)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:582)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:533)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:487)
at
org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:168)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
2008-06-23 14:40:30,028 [btpool1-1 ] WARN
jetty - /ProcessusAdmissionConsumer/
java.lang.IllegalStateException: Exchange not found
at
org.apache.servicemix.http.processors.ConsumerProcessor.process(ConsumerProcessor.java:190)
at
org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.java:71)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:722)
at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:324)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at
org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:374)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
at
org.mortbay.jetty.nio.SelectChannelConnector$RetryContinuation.run(SelectChannelConnector.java:506)
at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
Any idea ?
Gert Vanthienen wrote:
L.S.,
If you put the <to uri="log:..."> after the routing step to CXF in
your camel file, you implicitly create a pipeline that first sends
an in-out exchange to CXF and afterwards logs the out message from
the CXF service call, that's why you see the StaxSource at that
point. To see what Camel is sending to the endpoint, you'll need to
add a <to uri="log..."> before the jbi:endpoint.
Could you enable DEBUG logging to see what the MessageExchanges
going to/from your CXF endpoints look like? You probably want to
get the latest SNAPSHOT version of the servicemix-camel component in
ServiceMix as well because it has some fixes with regards to MEP
processing you're going to need for this scenario to work.
Regards,
Gert
John MIPIH wrote:
Hello,
Here is my camel config file :
<camelContext
xmlns="http://activemq.apache.org/camel/schema/spring">
<route>
<from
uri="jbi:endpoint:urn:fr:mipih:poc:soa:Routage:RouteVersAdmission"/>
<to uri="log:Before-routing"/>
<choice>
<when>
<xpath>.//prenom = 'John'</xpath>
<to
uri="jbi:endpoint:urn:fr:mipih:poc:soa:ProcessusAdmissionImplService:ProcessusAdmissionImplPort?mep=in-out"/>
<to uri="log:Routage-vers-reference"/>
</when>
<otherwise>
<to
uri="jbi:endpoint:urn:fr:mipih:poc:soa:ProcessusAdmissionImplBisService:ProcessusAdmissionImplBisPort?mep=in-out"/>
<to uri="log:Routage-vers-convergence"/>
</otherwise>
</choice>
</route>
</camelContext>
When an incoming message comes I get in the console :
2008-06-23 11:27:07,892 [-camel-thread-1] INFO Avant-routage -
Exchange[JbiMessage:
[EMAIL PROTECTED]:
{}}]
2008-06-23 11:27:08,282 [-camel-thread-1] INFO
Routage-vers-convergence
-
Exchange[Message: [EMAIL PROTECTED]
or
2008-06-23 11:27:16,048 [-camel-thread-4] INFO Avant-routage -
Exchange[JbiMessage:
[EMAIL PROTECTED]:
{}}]
2008-06-23 11:27:16,079 [-camel-thread-4] INFO
Routage-vers-reference -
Exchange[Message: [EMAIL PROTECTED]
according to the message content (so the routing works fine !)
This is good but the target service (cxf webservice) receives a bad
message
(nullpointer exception). Why do the message change between my first
log
and
the second from NormalizedMessage to StaxSource ? The problem is this
change
because when I change my camel context to :
<camelContext xmlns="http://activemq.apache.org/camel/schema/spring">
<route>
<from
uri="jbi:endpoint:urn:fr:mipih:poc:soa:Routage:RouteVersAdmission"/>
<to
uri="jbi:endpoint:urn:fr:mipih:poc:soa:ProcessusAdmissionImplBisService:ProcessusAdmissionImplBisPort?mep=in-out"/>
</route>
</camelContext>
everything works fine (but no routing...)
-----
---
Gert Vanthienen
http://www.anova.be
-----
---
Gert Vanthienen
http://www.anova.be