Re: Re: [equinox-dev] java.lang.LinkageError: loader constraint violation

2009-12-07 Thread fox
Hello All.
Problem has been resolved!
It is because there are some classes(package) such as 
org.w3c.dom.Node,org.w3c.dom.Documentboth in the  xmlparserv2.jar and 
re.jar,cause the confliction.

Thanks All.

2009-12-07 



fox 



发件人: David M Williams 
发送时间: 2009-12-03  16:00:07 
收件人: Equinox development mailing list 
抄送: 
主题: Re: [equinox-dev] java.lang.LinkageError: loader constraint violation 
 

Here's some information to give you some hints, some possible things to 
explore, but I doubt it will help directly. 

You don't say what version of equinox, or VM, you are using, but if it is pre 
3.6 M2, I'd suggest you try with the latest milestone just to see if it works. 
I say this because in 3.6 M2, Bug 285505 was fixed which _might_ be indirectly 
related. 
https://bugs.eclipse.org/bugs/show_bug.cgi?id=285505. 

Especially if it does solve your problem, and you need to use a released 
version, you can employ a work around in your own code, by 
using the threads threads context classloader. Something like 

Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader()); 

_before_ your code calls (directly or indirectly) SOAPPartImpl. 
(with all the right resets/trys/finallys, etc.) 

But this type of problem is pretty complicated, and depends on many things 
(e.g. which JVM you are using, which and how many versions of "Node" you have 
on your classpath,  how and where orasaaj.jar gets its version of 'Node'). 
There's quite a few things on the internet that describe or address the issue 
in different contexts, one such example is 
http://www.ibm.com/developerworks/websphere/library/techarticles/0310_searle/searle.html.
 

But, I think, its fundamentally a DOM implementation and JVM issue, and OSGi 
just finds the problem early, before it gets to a runtime problem? 
But, you say it happens while "trying to build a bundle" so if you mean that 
literally ... then my advise won't really help at all (since it is a runtime 
solution). 
In any case, I hope the information gives you some things to look at, or to 
frame the question more precisely. 

Good luck, 







From: f...@protelsws.com 
To: "equinox-dev"  
Date: 12/02/2009 08:25 PM 
Subject: [equinox-dev] java.lang.LinkageError: loader constraint violation 
Sent by: equinox-dev-boun...@eclipse.org






Hello all. 
I trying to build a bundle,when deploy into osgi and run,it throw an error: 
java.lang.LinkageError: loader constraint violation: when resolving overridden 
method 
"oracle.j2ee.ws.saaj.soap.SOAPPartImpl.appendChild(Lorg/w3c/dom/Node;)Lorg/w3c/dom/Node;"
 the class loader (instance of 
org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) of the current class, 
oracle/j2ee/ws/saaj/soap/SOAPPartImpl, and its superclass loader (instance of 
), have different Class objects for the type org/w3c/dom/Node used 
in the signature, 
the  oracle.j2ee.ws.saaj.soap.SOAPPartImpl is in orasaaj.jar and it is used 
by parlayX,I found that the orasaaj.jar and rt.jar both have this class 
SOAPPartImpl, 
To solve this problem ,what do I have to do, 
in addition, it is normal and successful that the project just run as a 
application , 
  
Many Thanks 
Fox___
equinox-dev mailing list
equinox-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev
___
equinox-dev mailing list
equinox-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev


Re: [equinox-dev] java.lang.LinkageError: loader constraint violation

2009-12-03 Thread David M Williams
Here's some information to give you some hints, some possible things to 
explore, but I doubt it will help directly. 

You don't say what version of equinox, or VM, you are using, but if it is 
pre 3.6 M2, I'd suggest you try with the latest milestone just to see if 
it works. 
I say this because in 3.6 M2, Bug 285505 was fixed which _might_ be 
indirectly related. 
https://bugs.eclipse.org/bugs/show_bug.cgi?id=285505.

Especially if it does solve your problem, and you need to use a released 
version, you can employ a work around in your own code, by 
using the threads threads context classloader. Something like 

Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());

_before_ your code calls (directly or indirectly) SOAPPartImpl. 
(with all the right resets/trys/finallys, etc.) 

But this type of problem is pretty complicated, and depends on many things 
(e.g. which JVM you are using, which and how many versions of "Node" you 
have on your classpath,  how and where orasaaj.jar gets its version of 
'Node'). There's quite a few things on the internet that describe or 
address the issue in different contexts, one such example is
http://www.ibm.com/developerworks/websphere/library/techarticles/0310_searle/searle.html
. 

But, I think, its fundamentally a DOM implementation and JVM issue, and 
OSGi just finds the problem early, before it gets to a runtime problem? 
But, you say it happens while "trying to build a bundle" so if you mean 
that literally ... then my advise won't really help at all (since it is a 
runtime solution). 
In any case, I hope the information gives you some things to look at, or 
to frame the question more precisely. 

Good luck, 








From:
f...@protelsws.com
To:
"equinox-dev" 
Date:
12/02/2009 08:25 PM
Subject:
[equinox-dev] java.lang.LinkageError: loader constraint violation
Sent by:
equinox-dev-boun...@eclipse.org



Hello all.
I trying to build a bundle,when deploy into osgi and run,it throw an 
error:
java.lang.LinkageError: loader constraint violation: when resolving 
overridden method 
"oracle.j2ee.ws.saaj.soap.SOAPPartImpl.appendChild(Lorg/w3c/dom/Node;)Lorg/w3c/dom/Node;"
 
the class loader (instance of 
org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) of the current 
class, oracle/j2ee/ws/saaj/soap/SOAPPartImpl, and its superclass loader 
(instance of ), have different Class objects for the type 
org/w3c/dom/Node used in the signature,
the  oracle.j2ee.ws.saaj.soap.SOAPPartImpl is in orasaaj.jar and it is 
used by parlayX,I found that the orasaaj.jar and rt.jar both have this 
class SOAPPartImpl,
To solve this problem ,what do I have to do,
in addition, it is normal and successful that the project just run as a 
application ,
 
Many Thanks
Fox___
equinox-dev mailing list
equinox-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev


___
equinox-dev mailing list
equinox-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev


[equinox-dev] java.lang.LinkageError: loader constraint violation

2009-12-02 Thread fox
Hello all.
    I trying to build a bundle,when deploy into osgi and run,it throw an error:
java.lang.LinkageError: loader constraint violation: when resolving overridden method "oracle.j2ee.ws.saaj.soap.SOAPPartImpl.appendChild(Lorg/w3c/dom/Node;)Lorg/w3c/dom/Node;" the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) of the current class, oracle/j2ee/ws/saaj/soap/SOAPPartImpl, and its superclass loader (instance of ), have different Class objects for the type org/w3c/dom/Node used in the signature,
the  oracle.j2ee.ws.saaj.soap.SOAPPartImpl is in orasaaj.jar and it is used by parlayX,I found that the orasaaj.jar and rt.jar both have this class SOAPPartImpl,
To solve this problem ,what do I have to do,
in addition, it is normal and successful that the project just run as a application ,
 
Many Thanks
Fox___
equinox-dev mailing list
equinox-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev