[JBossWS] - WS client libraries from Maven frustration
by espinosa_cz
Can someone reveal set of necessary library set for a standalone web service client? A set of libraries from Maven repository? JBoss Maven repository?
I decided to use JBoss WS client implementation because there is a possibility that my standalone client will be soon integrated to our enterprise application running on JBoss.
Because all our projects are Maven based, and despite I am not a huge Maven fan, I respect Maven as a de-facto standard for Java project management; I would like to use only libraries provided by Maven repositories. JBoss provides its own Maven repository that sounds promising. But at this point all fun ends. This requirement seems to be impossible to fulfill.
For Eclipse project I use these libraries with success:
<classpathentry kind="var" path="JBOSS_HOME/client/jbossws-spi.jar"/>
| <classpathentry kind="var" path="JBOSS_HOME/client/jaxb-api.jar" />
| <classpathentry kind="var" path="JBOSS_HOME/client/jboss-jaxws.jar"/>
| <classpathentry kind="var" path="JBOSS_HOME/client/jbossws-client.jar"/>
| <classpathentry kind="var" path="JBOSS_HOME/client/jbossall-client.jar"/>
| <classpathentry kind="var" path="JBOSS_HOME/client/jboss-saaj.jar"/>
| <classpathentry kind="var" path="M2_REPO/xerces/xercesImpl/2.7.1/xercesImpl-2.7.1.jar"/>
I got close with Maven by:
| <dependency>
| <groupId>org.jboss.ws.native</groupId>
| <artifactId>jbossws-native-client</artifactId>
| <version>3.0.4.GA</version>
| </dependency>
|
This add 13MB of dependent libraries to my single Jar application. It is quite a lot for a simple client, isn'ÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂt it? Anyway, at least it had compiled my source but test phase failed with:
java.lang.IllegalStateException: Failed to load javax.xml.ws.spi.Provider:
| org.jboss.ws.core.jaxws.spi.ProviderImpl
| Caused by: java.lang.NoClassDefFoundError:
| org/jboss/util/NotImplementedException
I tried several other combinations, with aim to get close to JBoss 4.2.2 GA client libraries as possible (pom.xml):
<dependency>
| <groupId>jboss</groupId>
| <artifactId>jbossws-spi</artifactId>
| <version>1.0.0.GA</version>
| </dependency>
| <!-- JBoss 4.2.2/jbossws-spi.jar : Implementation-Version:
| jbossws-1.0.0.GA (build=200708171551) -->
|
| <dependency>
| <groupId>javax.xml.bind</groupId>
| <artifactId>jaxb-api</artifactId>
| <version>2.1</version>
| </dependency>
|
| <dependency>
| <groupId>org.jboss</groupId>
| <artifactId>jboss-jaxws</artifactId>
| <version>2.0.1.SP2</version>
| </dependency>
| <!-- JBoss 4.2.2/jbossws-jaxws.jar : Implementation-Version:
| jbossws-native-2.0.1.SP2 (build=200710210837) -->
|
| <dependency>
| <groupId>org.jboss</groupId>
| <artifactId>jbossws-client</artifactId>
| <version>2.0.1.SP2</version>
| </dependency>
| <!-- JBoss 4.2.2/jbossws-client.jar: Implementation-Version:
| jbossws-native-2.0.1.SP2 (build=200710210837 -->
|
| <dependency>
| <groupId>jboss</groupId>
| <artifactId>jbossall-client</artifactId>
| <version>4.2.2.GA</version>
| </dependency>
| <!-- JBoss 4.2.2/jbossall-client: Implementation-Version: 4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139) -->
|
| <dependency>
| <groupId>jboss.jbossws</groupId>
| <artifactId>jboss-saaj</artifactId>
| <version>2.0.3.GA</version>
| </dependency>
| <!-- JBoss 4.2.2/jboss-saaj : Implementation-Version: jbossws-native-2.0.1.SP2 (build=200710210837) -->
|
| <dependency>
| <groupId>xerces</groupId>
| <artifactId>xercesImpl</artifactId>
| <version>2.7.1</version>
| </dependency>
|
..but I ended with the same error message.
If I add jbossws-common dependency:
| <!-- added to supply org.jboss.util.NotImplementedException -->
| <dependency>
| <groupId>org.jboss.ws</groupId>
| <artifactId>jbossws-common</artifactId>
| <version>1.0.0.GA</version>
| <scope>compile</scope>
| </dependency>
| <!--
| JBoss 4.2.2/jbossws-common: Implementation-Version: jbossws-native-2.0.1.SP2 (build=200710210837)
| But what vesion of jbossws-common? In repository there are versions from 1.0.0.GA to 1.0.7.GA. What version is really in JBoss 4.2.2.GA??
| -->
|
I got:
java.lang.NoClassDefFoundError: javax/xml/rpc/encoding/TypeMappingRegistry
Well, you can add new libs for ever; it is hard to figure out which version of which library fits together :(
I use standard Maven repository and JBoss repository http://repository.jboss.org/maven2/.
Why there is not a copy of JBoss libraries for all released version in the repository? Is it impossible to have something like http://repository.jboss.com/maven2/org/jboss-4.2.2.GA/client? License issues? Lack of hard-drive space?
Thank you for any suggestions or comments
Espinosa
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4185481#4185481
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4185481
16 years, 1 month
[JBossWS] - Re: No Classloaders found for ProviderImpl
by tomstrummer
That definitely helped me find my problem. Apparently the JBossWS-native libs were still in jboss-4-2-3.GA/lib/endorsed. I removed all of the jaxws_.jars from that directory and it got me a little futher at least.
Then I battled my way through the forests of XML API versioning until I came to face a new beast when invoking the WS client:
| com.sun.xml.ws.api.client.ServiceInterceptorFactory: Provider com.sun.xml.ws.policy.jaxws.client.PolicyServiceInterceptorFactory is specified in jar:file:/home/tnichols/dev/sandbox/jboss-4.2.3.GA-metro/server/default/deploy/jbossws.sar/jbossws-metro-wsit-rt.jar!/META-INF/services/com.sun.xml.ws.api.client.ServiceInterceptorFactorybut could not be instantiated: java.lang.ClassCastException (com.sun.xml.ws.util.ServiceConfigurationError)
| com.sun.xml.ws.util.ServiceFinder:233 (null)
| java.lang.ClassCastException
| at java.lang.Class.cast(Class.java:2990)
| at com.sun.xml.ws.util.ServiceFinder$LazyIterator.next(ServiceFinder.java:374)
| at com.sun.xml.ws.api.client.ServiceInterceptorFactory.load(ServiceInterceptorFactory.java:80)
| at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:202)
| at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:175)
| at com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:104)
| at javax.xml.ws.Service.<init>(Service.java:56)
| at com.pjm.emkt.emkt.xml.wsdl.MarketQueryService.<init>(MarketQueryService.java:46)
|
I'm using the jbossws-metro v3.0.4 (installed on the server) along with jaxws-api-2.1 and jaxws-rt-2.1.4 from Maven in my EAR classpath.
Thanks again for the help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4185114#4185114
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4185114
16 years, 1 month