*
The moose likes Web Services and the fly likes WebService Client Issues - Conflicting jars / Beginner Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "WebService Client Issues - Conflicting jars / Beginner " Watch "WebService Client Issues - Conflicting jars / Beginner " New topic
Author

WebService Client Issues - Conflicting jars / Beginner

mayur solanki
Greenhorn

Joined: Dec 28, 2007
Posts: 7
Hello All,

I am a Beginner and am having issues with a Webservice Client trying to connect to WebService (Eclipse Juno /Java 1.6_22) . The Issue is with Conflicting Jar files (configured in Build Path), I am getting errors compiling. I have tried each time to configure the Missing Jar file but still i complains .

My Program Uses below Packages :-

import org.apache.cxf.frontend.ClientProxy;
import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
import org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor;
import org.apache.ws.security.WSConstants;
import org.apache.ws.security.handler.WSHandlerConstants;

import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.UnsupportedCallbackException;
import org.apache.ws.security.WSPasswordCallback;

I have configured all the required Jar files but when i run the program from Eclipse, i keep on getting different errors after i configure the Class Path to resolve previous one.
How can this Depenceny of Jar files resolved?
Can any order be followed while configuring the Build Path ?

I am using the Below Jar files but when running the program in Eclipse, errors out. Any assistance appreciated, have tried this hundreds of time with no results. Kindly Assist/Suggest.

wss4j-1.5.6.jar
XmlSchema-1.3.2.jar
xml-resolver-1.2.jar
wsdl4j-10.3.jar
jaxb-api-2.2.jar
cxf-bundle-2.3.1.jar
cxf-rt-frontend-jaxws-2.3.5.jar
cxf-rt-transports-http-2.3.5.jar
cxf-rt-ws-security-2.3.5.jar

Kind Regards and Many Thanks in Advance.

Yash
Madhusudan Pisipati
Greenhorn

Joined: Jan 07, 2010
Posts: 9
May I know the tool that was used to generate the client, like for Ex if it is Jboss we would use wsconsume and the jars of jboss in the build path...
mayur solanki
Greenhorn

Joined: Dec 28, 2007
Posts: 7
Thanks, the WebService Client is delivered by third party company to test their webservice. I add additional jars before i can run the program, and here it results in Errors /Exception, i guess due to conflicting jar files.

How do we resolve Conflicting Class/Methods in jar files included in Project Build?
How can we find out which Version of Jar File is the Correct One?

The Issue is i guess with Conflicting / Duplicate / Different Version of Classes/Methods within the jar files.

Any Suggestion / Comments, Very much appreciated.

Thanks in Advance.
Madhusudan Pisipati
Greenhorn

Joined: Jan 07, 2010
Posts: 9
If you are familiar with Maven, then i suggest you can use Maven becoz it can resolve the dependencies ( i mean it will avoid any conflicting jars situation), if not may be you can try renaming the conflicting jar and then place it in your build path and see how it goes.
Madhusudan Pisipati
Greenhorn

Joined: Jan 07, 2010
Posts: 9
Can you give me a snapshot of the error, that would help. If you can attach it to this post.
mayur solanki
Greenhorn

Joined: Dec 28, 2007
Posts: 7
Thanks Madhusudan, Below is the error , when i try to fix this one by putting the jar , some other will pop up. I have being trying to do this again and again with no success. I guess it due to jar depencency/Version/Class/Methods conflicts / or missing in some jar versions.

Many thanks in advance, Kind Regards


Exception in thread "main" java.lang.NoSuchMethodError: javax.xml.bind.annotation.XmlAccessorType.value()Ljavax/xml/bind/annotation/AccessType;
at com.sun.xml.bind.v2.model.impl.ClassInfoImpl.getAccessType(ClassInfoImpl.java:339)
at com.sun.xml.bind.v2.model.impl.ClassInfoImpl.getProperties(ClassInfoImpl.java:228)
at com.sun.xml.bind.v2.model.impl.RuntimeClassInfoImpl.getProperties(RuntimeClassInfoImpl.java:87)
at com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:127)
at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:49)
at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:41)
at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:189)
at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:204)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:327)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:198)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:76)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at javax.xml.bind.ContextFinder.newInstance(Unknown Source)
at javax.xml.bind.ContextFinder.newInstance(Unknown Source)
at javax.xml.bind.ContextFinder.find(Unknown Source)
at javax.xml.bind.JAXBContext.newInstance(Unknown Source)
at org.apache.cxf.jaxb.JAXBDataBinding.createContext(JAXBDataBinding.java:557)
at org.apache.cxf.jaxb.JAXBDataBinding.createJAXBContextAndSchemas(JAXBDataBinding.java:497)
at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:324)
at org.apache.cxf.service.factory.AbstractServiceFactoryBean.initializeDataBindings(AbstractServiceFactoryBean.java:86)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:442)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:682)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:505)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:242)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:202)
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101)
at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:90)
at org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:144)
at org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:133)
Madhusudan Pisipati
Greenhorn

Joined: Jan 07, 2010
Posts: 9
I have few questions here.

1)The third party client that you are given , does it come with jars or with out jars?
2)Your client I assume its a java ws client , correct me if I am wrong ....and you said you are using jdk6 , jdk6 supports jax-ws annotations ,try removing the jaxb jar that you have on your classpath and see what hppns.
3)The jars you added , were they suggested to you by the third party client or you explored it yourself and found the jars one by one need to run the client prog?
mayur solanki
Greenhorn

Joined: Dec 28, 2007
Posts: 7
Yes, the Java Client accessing a Java Webservice. The WebClient also come with its own Packages that are imported by the program. Additional jar files were added by me as and when i found it. (for other packages that are included in the Program). Have tried with different Version of Jar files, but still errors out. Have tried as you suggested but still the same error pops up. I check and the required Method/Class are there. Its really frustrating Now.
Kind Regards

Madhusudan Pisipati
Greenhorn

Joined: Jan 07, 2010
Posts: 9
May be did you try this option in eclipse ctrl+shift+T and then type the fully qualified name of the javax.xml.bind.annotation.XmlAccessorType and see if you get this in more than one jar in the Type dialogue box.

This might show if its listed in more than one jar.

I can understand your reason for frustration, but solution can only come out of patience and keen observation and frustration wont help.
 
 
subject: WebService Client Issues - Conflicting jars / Beginner
 
Similar Threads
error while working with eclipse in ubuntu
Standalone Web Service Application with Java 5
@Entity not resolved
Axis related Q; setting classpath for a custom API at run-time?
Eclipse Build Path Problem