-
1. Re: OSGi bundle that is JAX-WS client? (ClassNotFoundException: javax.xml.ws.Service)
dawid.loubser Aug 26, 2012 11:21 AM (in response to dawid.loubser)Is there really nobody calling web services with JAX-WS from an OSGi bundle in JBoss 7.1.1? I thought this would be a common problem.
Anybody?
-
2. Re: OSGi bundle that is JAX-WS client? (ClassNotFoundException: javax.xml.ws.Service)
thomas.diesler Aug 27, 2012 9:00 AM (in response to dawid.loubser)I'm interested
You can monitor/vote on https://issues.jboss.org/browse/AS7-5364
To get things moving you might even want to create a test case in the osgi smoke package.
-
3. Re: OSGi bundle that is JAX-WS client? (ClassNotFoundException: javax.xml.ws.Service)
dawid.loubser Aug 27, 2012 9:35 AM (in response to thomas.diesler)Hi Thomas, thanks for replying.
Just to be clear, I'm not trying to deploy a web service implementation as an OSGi bundle, merely a web service client.
This works on JBoss AS 7.0.2 - are you saying this is no longer posisble on 7.1.1 until the attached JIRA (which seems to refer to service implementations) are resolved?
I'm happy to build a test for you, I just want to be clear about the distinction.
kind regards,
Dawid
-
4. Re: OSGi bundle that is JAX-WS client? (ClassNotFoundException: javax.xml.ws.Service)
dawid.loubser Aug 27, 2012 11:47 AM (in response to dawid.loubser)Of course, in addition to the missing JAX-WS libraries, I am also missing the JAXB librarfies (upon which JAX-WS depends), hitting lots of instances of:
- java.lang.NoClassDefFoundError: javax/xml/bind/JAXBElement
If somebody could give me a quick indication whether I should be sourcing this javax.* stuff from JBoss-provided libraries, or whether I should imagine I'm running plain Felix (and provision them all manually from, say, CXF, which I imagine might cause problems when I exchange JAX-WS or JAXB types between my Java EE and OSGi bundles...) that'd be great.
As mentioned before, the old (in 7.0.2) "javaee.api" capability provided this for me. Whatever I replace it with, needs to be such that it's the same classes that my Java EE modules use (as they exchange objects).
kind regards,
Dawid
-
5. Re: OSGi bundle that is JAX-WS client? (ClassNotFoundException: javax.xml.ws.Service)
dawid.loubser Sep 6, 2012 7:24 AM (in response to dawid.loubser)Hi All,
Is there really no way to make web service calls from an OSGi bundle in the latest JBoss release (7.1.1)? This is a critical issue preventing us from upgrading our systems still running on 7.0.2.
Surely somebody else must have encountered the need to access javax.xml.ws (JAX-WS) or javax.xml.bind (JAXB) etc from within your OSGi bundles? If somebody could please clarify how my question relates to https://issues.jboss.org/browse/AS7-5364 (which is not the same thing, I simply want to make calls to a web service as a client, not expose a web service)
thanks,
Dawid
-
6. Re: OSGi bundle that is JAX-WS client? (ClassNotFoundException: javax.xml.ws.Service)
thomas.diesler Sep 6, 2012 7:51 AM (in response to dawid.loubser)1 of 1 people found this helpfulThe pull request for this is pending. This also adds WS client functionallity.
Running org.jboss.as.test.smoke.osgi.SimpleWebServiceTestCase
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.672 sec
Running org.jboss.as.test.smoke.osgi.SimpleWebServiceClientTestCase
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.957 sec
-
7. Re: OSGi bundle that is JAX-WS client? (ClassNotFoundException: javax.xml.ws.Service)
dawid.loubser Sep 6, 2012 8:14 AM (in response to thomas.diesler)Ah, thank you so much for the update, Thomas.
If this gets merged into JBoss master soon, any ideas when it will find its way into a release?
(I don't think I can run a random build from master in production :-)
Would you mind providing a 10-second explanation of what the fix entails?
Will this ultimately enable me to simply expose JAX-WS/JAXB as a capability in my jboss configuration?
-
8. Re: OSGi bundle that is JAX-WS client? (ClassNotFoundException: javax.xml.ws.Service)
thomas.diesler Sep 7, 2012 3:55 AM (in response to dawid.loubser)I can't comment on AS7 roadmap items - you need to ask them.
This patch makes sure that a WS endpoint that is an OSgi bundle passes all the DeploymentUnitProcessors (DUP) and registers the endpoint correctly. It also also adds the javax.ws.* API as capabilities in the default configuration. JAXB would be a different ball game - we don't have test coverage for that. Hence, I can't say that this is supported.
-
9. Re: OSGi bundle that is JAX-WS client? (ClassNotFoundException: javax.xml.ws.Service)
dawid.loubser Sep 7, 2012 4:43 AM (in response to thomas.diesler)JAX-WS has a direct dependency on JAXB, so I doubt that your test cases could pass if JAXB was not exposed also?
I'm happy to add some tests for you, do I just fork OSGi smoke and add a test, and send a pull request?
-
10. Re: OSGi bundle that is JAX-WS client? (ClassNotFoundException: javax.xml.ws.Service)
thomas.diesler Sep 11, 2012 4:15 AM (in response to dawid.loubser)> I doubt that your test cases could pass if JAXB was not exposed also
The dependency on JAXB must only be defined on the module that uses it. If the user bundle does not (transitively) load types defined by JAXB it would work.
> I'm happy to add some tests for you, do I just fork OSGi smoke and add a test, and send a pull request?
Great. Yes, you're welcome to that from https://github.com/tdiesler/jboss-as/tree/as5364
-
11. Re: OSGi bundle that is JAX-WS client? (ClassNotFoundException: javax.xml.ws.Service)
djchapm Apr 21, 2013 5:07 PM (in response to thomas.diesler)Same problem - I have a Jax-ws client as OGSI Bundle. Getting below stack caused-by when trying to start my bundle. So I see something related to a fix in aformentioned 'patch' but the Jira says fix version only in EAP 6.1.ALPHA. Anything that I can do in 6.0.1 as Redhat does not support EAP6.1.ALPHA? Any workaround?
Thanks,
Dan C>
... mostly ClassDefNotFound errors but ultimately traced to this Caused by exception:
Caused by:
java.lang.ClassNotFoundException: javax.xml.ws.Service from [Module "deployment.XXXX:0.0.1-rev4" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(
ModuleClassLoader.java:190) [jboss-modules.jar:1.1.3.GA-redhat-1]
ConcurrentClassLoader.java:468at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(
) [jboss-modules.jar:1.1.3.GA-redhat-1]
ConcurrentClassLoader.java:456at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(
) [jboss-modules.jar:1.1.3.GA-redhat-1]
ConcurrentClassLoader.java:423at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(
) [jboss-modules.jar:1.1.3.GA-redhat-1]
ConcurrentClassLoader.java:398at org.jboss.modules.ConcurrentClassLoader.performLoadClass(
) [jboss-modules.jar:1.1.3.GA-redhat-1]
ConcurrentClassLoader.java:120at org.jboss.modules.ConcurrentClassLoader.loadClass(
) [jboss-modules.jar:1.1.3.GA-redhat-1]