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

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

Related

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".

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

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>

Why doesn't Websphere like BIRT?

I am trying to start a deployment of a project to Websphere and I get the following error trail. (Shortened)
ERROR org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'birtView' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'birtEngine' while setting bean property 'birtEngine'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'birtEngine': FactoryBean threw exception on object creation; nested exception is java.lang.RuntimeException: Could not start the Birt engine!
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'birtEngine': FactoryBean threw exception on object creation; nested exception is java.lang.RuntimeException: Could not start the Birt engine!
Caused by: java.lang.RuntimeException: Could not start the Birt engine!
Caused by: org.eclipse.birt.core.exception.BirtException: error.CannotStartupOSGIPlatform
Caused by: org.eclipse.birt.core.framework.FrameworkException: Cant register the ExtensionRegistry classpath
Caused by: org.eclipse.core.runtime.CoreException: Extension registry provider is already set.
The solution to the 3rd from bottom error as I have found online was to delete the following line of code.
config.setEngineHome("C:/birt-runtime-3_7_0/ReportEngine");
However, this is not present and unnecessary for our setup.
It(the BIRT specific code used) is very similar to this example online:
http://www.springsource.org/BusinessIntelligenceWithSpringAndBIRT
The BirtView and BirtEngineFactory are the only relevant parts to my project.
I have gone to this Bug Page and forum entry and tried the code addition. It did not work. The project starts up and works on Tomcat 6x without any issue.
http://www.eclipse.org/forums/index.php/m/727929/
https://bugs.eclipse.org/bugs/show_bug.cgi?id=351052
I have the class loader order in Web Sphere set to "Classes loaded with application class loader first." as in the example in the link below.
http://wiki.eclipse.org/BirtPOJO_Viewer_WebSphere_Deployment
I still get the same set of errors and I'm not sure what else I should be doing.
I know it is a bit hard to ask this without posting code, but would someone have an idea as to what I should look for?
Thanks.
I had exactly the same error as yours. I am using BIRT 3.7.2 and IBM WAS 8.5
With reference to the bug detailed below,
org.eclipse.core.runtime.CoreException when restarting the ReportEngine
and the actual reason of the bug, specified below,
ServiceLauncher.shutdown() doesn't release default RegistryProvider
I added the following line before the Platform.startup(..) call
RegistryProviderFactory.releaseDefault();
After this, BIRT reports are working fine.
But, I'm doubtful, as to whether this will break anything in WAS's runtime or not.
The reason for this is ...
As explained in the bug, this exception occurs when Platform start-up is attempted for a second time. Here, on Platform.shutdown(), the RegistryProvider is not released, and hence the exception.
Now, in my case, IBM Websphere 8.5 internally uses OSGi and hence starts OSGi Platform.
Hence, when our application attempts to start the Platform again (the second start), the exception occurs.
My concern here is, this should not break anything with WAS’s runtime (as it uses OSGi internally).
The Registry Provider is not null, as its set by BIRT runtime, so, the only problem here can be of Class Version mismatch i.e., WAS’s Registry Provider and BIRTs Registry Provider, if different, then version clashes.
I'm not sure of the solution i have used.
Experts, please guide.

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