Getting the below error
java.lang.VerifyError: Bad type on operand stack
Type '[Lweblogic/wsee/jws/jaxws/owsm/SecurityPolicyFeature;' (current frame, stack) is not assignable to '[Ljavax/xml/ws/WebServiceFeature;'
I have the jars(jaxws-api.2.1.jar and ws.api_220.127.116.11.jar) related to both and tried in java 7 as well as java 8 but still getting the same error.
Is this a web app where both jar files are located in WEB-INF/lib? If they are, then this kind of error shouldn't occur, unless one of the files -possibly the Weblogic one- is also present somewhere else, most likely in a directory that belongs to the app server rather than the web app. So try to find out if the one of the classes is also present in one of the directories that's part of the server.
posted 1 year ago
I checked in all the folders i have only one jaxws-rt.jar
After checking about WebServiceFeature class I came to know that JAX-WS is part of the JDK.
So now it is present in WebServiceFeature is in two jars.
rt.jar --> javax.xml.ws.WebServiceFeature
jaxws-api.jar --> javax.xml.ws.WebServiceFeature
How can I override WebServiceFeature of rt.jar by jaxws-api.jar ?
What happens if you simply remove the jaxws-api.jar file?
posted 1 year ago
I have tried that and ended up with the below error again
java.lang.LinkageError: loader constraint violation: when resolving method "javax.xml.ws.Service.<init>(Ljava/net/URL;Ljavax/xml/namespace/QName;)V" the class loader (instance of weblogic/utils/classloaders/ChangeAwareClassLoader) of the current class, com/abc/abcservice/ABCService, and the class loader (instance of <bootloader>) for resolved class, javax/xml/ws/Service, have different Class objects for the type <init> used in the signature
Any dependency that is provided by your container like ws.api but also stuff like JPA, EJB etc, should be included as provided dependency. That will allow you to use their APIs without bundling them in your application. That would cause class loader conflicts like the one you're seeing, if a class is loaded by your application's class loader but some others by the container's class loader.