-
1. Re: Weird NoClassDefFound error while using SOAP over JMS
ffang Dec 12, 2010 8:23 PM (in response to nbaliga)Hi,
There's no woden bundle installed by default in ESB container.
If you need use package/class from woden, you need install woden bundle yourself.
Freeman
-
2. Re: Weird NoClassDefFound error while using SOAP over JMS
nbaliga Dec 12, 2010 8:43 PM (in response to ffang)Thanks for the reply.
Could you elaborate on how I can go about installing it in Fuse4?
I mean, for e.g., since I was using ActivMQ connection factory, I had added explicit dependencies on activemq-core etc., and saw that in my Maven build, the corresponding jars would get created in the "lib" directory of my SU and then there would be no more exceptions.
But in order to solve this problem, like I'd mentioned, I already tried putting an explicit dependency on woden. I see the requisite jars get included in my SU's zip's lib directory.
I can even see the class that the NoClassDefFoundError is being thrown, is present in that jar.
Is there some other way that I should go about loading the woden bundle into the container?
Ideally if I could load it as a module or something and put it in the startup, then I would be able to solve this problem permanently for all my SUs.
Edited by: baliganaresh1 on Dec 13, 2010 1:43 AM
-
3. Re: Weird NoClassDefFound error while using SOAP over JMS
ffang Dec 12, 2010 8:57 PM (in response to nbaliga)Hi,
You can install woden bundle from console, using command like
osgi:install -s mvn......
Or you can create a feature(for permanent solution) which include this bundle, you can take a look at other example features to get details how to do it.
One note, if the woden jar isn't a bundle yet, you need OSGi-fied woden jar to bundle first, or just use simple "wrap" handler from command console.
More details please take a look at , Chapter 5. Deploying a JAR Library
http://fusesource.com/docs/esb/4.3/esb_deploy_osgi/index.html
Freeman
-
4. Re: Weird NoClassDefFound error while using SOAP over JMS
nbaliga Dec 13, 2010 10:32 AM (in response to ffang)I will give this a try. Thanks for your help!
-
5. Re: Weird NoClassDefFound error while using SOAP over JMS
nbaliga Dec 13, 2010 11:48 PM (in response to nbaliga)Tried it out, but no luck.
I followed the steps to generate a woden-1.0.0M6.bar file. Then dropped it into the hotdeploy folder.
Upon doing an osgi:list, I can see that OSGI-fied woden has been deployed into my Fuse ESB4 container:
But despite that, when I deploy my SU, I see the same exception:
transport-bridge-jms-su\xbean.xml]; nested exception is java.lang.NoClassDefFoundError: org/apache/woden/WSDLException
-
6. Re: Weird NoClassDefFound error while using SOAP over JMS
ffang Dec 14, 2010 12:09 AM (in response to nbaliga)Hi,
Quick questions,
1. Are you using JBI packaging or OSGi packaging? If you're using OSGi packaging, ensure you have correct Import-Package in your SU's pom.xml, you can take a look at
cxf-wsdl-first-osgi-package(OSGi packaging) and cxf-wsdl-first(JBI packaging) examples shipped with kit to see the difference and get more details.
2. Could you explain what you do for woden-1.0.0M6.bar(I guess here you have some typo, it should be woden-1.0.0M6.jar, you just use wrap url to install that jar or you use bnd tool to generate a OSGi bundle?), please append the output for
osgi:headers 297
Freeman
-
7. Re: Weird NoClassDefFound error while using SOAP over JMS
nbaliga Dec 14, 2010 12:34 AM (in response to ffang)I am using JBI packaging and not OSGI for my project's SUs and SAs.
I ran the command:
java -jar biz.aQute.bnd.jar wrap woden-1.0.0M6.jar
for generating
woden-1.0.0M6.bar
So, there's no typo...a .bar file is what is generated.
I then dropped the .bar file into the hotdeploy folder.
The output for the osgi:headers command is attached to this reply.
-
wodenOsgiHeaderList.txt 6.7 KB
-
-
8. Re: Weird NoClassDefFound error while using SOAP over JMS
ffang Dec 14, 2010 12:39 AM (in response to nbaliga)Hi,
How about you append your SA mvn project which I can build and deploy? I'd like to play with that testcase when I get chance.
Freeman
-
9. Re: Weird NoClassDefFound error while using SOAP over JMS
nbaliga Dec 14, 2010 1:02 AM (in response to ffang)Appreciate the prompt replies and the offer to take a look.
I am attaching the maven project to this reply.
-
testJmsSoap.zip 13.7 KB
-
-
10. Re: Weird NoClassDefFound error while using SOAP over JMS
ffang Dec 14, 2010 3:52 AM (in response to nbaliga)Well, just checked that servicemix-jms component already import org.apache.woden* package, but as optional, so after you install woden bundle jar, you need refresh servicemix-jms bundle, to make servicemix-jms bundle pick up org.apache.woden*, and then deploy your SA, it should work.
this is the way to find bundle ID of servicemix-jms bundle
osgi:list|grep "JMS Binding Component"
then you get something like
Apache ServiceMix :: Components :: JMS Binding Component (2010.02.0.fuse-02-00)
150 here(or any id you get from your container) is bundle id for servicemix-jms bundle
then do
osgi:refresh 150 to make sure servicemix-jms bundle to pick up optional import org.apache.woden*
Freeman
-
11. Re: Weird NoClassDefFound error while using SOAP over JMS
nbaliga Dec 14, 2010 5:20 PM (in response to ffang)So with the above refresh approach for the servicemix-jms component, I still run into the same problem.
I've examined the EXPORT entries in woden's MANIFEST file and the package that contains WSDLException i.e. org.apache.woden is present.
And the actual org.apache.woden.WSDLException class file is present in the .bar file.
So I looked at the documentation some more, and used the wrap command on the prompt as below:
osgi:install -s wrap:file:C:/woden-1.0.0M6.jar
And then I did the refresh as you'd suggested...and now I'm past that exception!
I am now getting the following exception:
+Caused by: javax.jbi.management.DeploymentException: WSDL is not WS-I BP compliant: [binding "HelloWorldServiceSoapBinding" : Basic Profile Violation #R2401: A wsdl:binding element in a DESCRIPTION MUST use WSDL SOAP Binding as defined in WSDL 1.1 Section 3.]
+
I'm assuming that the above exception has nothing to do with the way I've loaded my woden.jar into Karaf, of course.
So I think the question is answered. Summary:
Woden is not installed in the OSGI container. It is needed when the <jms:soap-consumer> or <jms:soap-provider> is used. It needs to be loaded into the OSGI container. Use the wrap command directly on the woden jar file at the OSGI prompt. Refresh the servicemix-jms component, so that it picks up the (optional) woden dependency that was just loaded. Deploy your SU and things should work.
The wrap command can be found in Chapter 5 at Link:[http://fusesource.com/docs/esb/4.3/esb_deploy_osgi/index.html]
Thank you very much for your help!
Edited by: baliganaresh1 on Dec 14, 2010 10:20 PM