weblogic 11g deployment error , loader constraint violation: when resolving field "DATETIME" - jersey

i add my project the maven jersey rest services dependency. It's working well, but if I try to deploy weblogic 11g i got this error
[HTTP:101216]Servlet: "jersey-serlvet" failed to preload on startup in Web application: "PstnIptalv1.war". java.lang.LinkageError: loader constraint violation: when resolving field "DATETIME" the class loader (instance of weblogic/utils/classloaders/ChangeAwareClassLoader) of the referring class,

Make sure you have prefer-web-inf in you weblogic.xml file Otherwise it might conflict with a class weblogic is providing for you
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>

Related

Unhandled event loop exception - instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader

using felix but for one of the packages getting
java.lang.LinkageError: loader constraint violation: loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader)
package listing shows only one bundle its resolved from.
how to further resolve the above issue

Websphere 8.5 Linkage Issue

I am using spring Webservicetemplate to access soap service. The soap client package has been deployed in websphere. The deployment was successful but its throwing following error during SOAP api invocation.
Caused by: java.lang.LinkageError: loading constraint violation when resolving method "javax/xml/soap/SOAPElement.getElementQName()Ljavax/xml/namespace/QName;" : loader "com/ibm/ws/classloader/CompoundClassLoader#69ddc3da" of class "org/springframework/ws/soap/saaj/SaajSoapElement" and loader "com/ibm/oti/vm/BootstrapClassLoader#6d67c67c" of class "javax/xml/soap/SOAPElement" have different types for the method signature
at org.springframework.ws.soap.saaj.SaajSoapElement.getName(SaajSoapElement.java:51)
at org.springframework.ws.soap.AbstractSoapMessage.getVersion(AbstractSoapMessage.java:89)
at org.springframework.ws.soap.saaj.SaajSoapMessage.setSoapAction(SaajSoapMessage.java:168)
Can anyone please assist ?

axis2.jar in websphere 8.5

I'm trying to install axis2.jar (1.7) in Websphere 8.5 which is using java 8. I have selected parent last in axis2.jar. Axis2 has some wsdls installed and it'll communicate with oracle 12c to retrieve data. In axis2 shared libraries i'm including xdb6, ojdbc7.jar. When i start to post an xml through SOAP UI, im getting the below error in WAS.
"[7/30/18 11:19:04:368 EEST] 000000b7 IntegrationLa E
'IntegrationLandscapeService' is currently not availble OR does not
exist - RuntimeException : Error creating bean with name
'IntegrationLandscapeServiceImpl' defined in class path resource
[integrationLandscapeServiceContext.xml]: Instantiation of bean
failed; nested exception is
org.springframework.beans.BeanInstantiationException: Could not
instantiate bean class
[com.temenos.services.integrationlandscape.IntegrationLandscapeServiceImpl]:
Constructor threw exception; nested exception is
java.lang.LinkageError: loading constraint violation when overriding
method
"java/sql/SQLXML.getSource(Ljava/lang/Class;)Ljavax/xml/transform/Source;"
during creation of class "oracle/xdb/XMLType": loader
"com/ibm/ws/classloader/CompoundClassLoader#924d5a69" of class
"oracle/xdb/XMLType" and loader
"com/ibm/oti/vm/BootstrapClassLoader#e7afefce" of class
"java/sql/SQLXML" have different types for the method signature"
Oracle.xdb.XMLType is loaded from xdb6.jar and other applications using this xdb6.jar is working fine without issues. But when used from axis2.jar its creating the above error.
Can someone help me or shed some light on this since i couldnt figure out the issue here.
Try to use an isolated class loader. When you configure you shared lib check the "Use an isolated class loader for this shared library".

Linkage error in websphere 8.5 for SAXParser

I am facing an issue related to linkage when i deployed my application websphere 8.5
Error in the XML parsing of the included Input Stream: java.lang.LinkageError: loading constraint violation when resolving method "javax/xml/parsers/SAXParser.parse(Lorg/xml/sax/InputSource;Lorg/xml/sax/helpers/DefaultHandler;)V" : loader "com/ibm/ws/classloader/CompoundClassLoader#aa54261e" of class "com/XMLParser/CreateParser" and loader "com/ibm/oti/vm/BootstrapClassLoader#1c4565b7" of class "javax/xml/parsers/SAXParser" have different types for the method signature.
I have the following jars in my class path.
I have set the loader to PARENT_LAST.
I tried to debug the class alone using a main method and found that it is taking the impl of saxparser of jdk 1.5 rt.jar and it is working as expected. After deploying the ear it is throwing the exception while the code hits the SAXParser.parse(InputSoruce,DefaultHandler) method.
jaxb-impl 2.2.6,
jaxb-libs-1.0.5,
jaxb-xjc-2.0EA3,
dom4j-1.1,
sax 2.0.1
Does any one have any idea about this problem?
Your class loader has visibility to two copies of org.xml.sax. The first because you've included the SAX APIs in your PARENT_LAST class loader, and the second indirectly via javax.xml.parsers in the JRE. You either need to remove the SAX API JAR from your application or you need to add the javax.xml (and perhaps more) APIs + impl to your application.

Testing an XQuery Transformation

I'm using Workshop for Weblogic and I'm testing an XQuery Transformation.
Both MFL and XSD are valid. But the XQuery doesn't seem to work... it gives me this error:
Error occurred while executing XQuery: loader constraint violation: when resolving method "javax.xml.stream.XMLInputFactory.createXMLStreamReader(Ljava/io/Reader;)Ljavax/xml/stream/XMLStreamReader;" the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) of the current class, weblogic/xml/query/parsers/StAXCursorAdaptor, and the class loader (instance of ) for resolved class, javax/xml/stream/XMLInputFactory, have different Class objects for the type javax/xml/stream/XMLStreamReader used in the signature
Have you ever seen this before? How can I solve this please?
You need to reinstall workshop with default JRockit, or what is much faster just edit workshop.ini and change -vm parameter value from Sun/Oracle JDK to JRockit SDK which can be found in weblogic directory.

Resources