Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [higgins-dev] The javax.xml.namespace.QName issue in higgins code

Tie-Li,

We were also having trouble recently with the multiple versions of QName. 
Re-ordering the "required plug-ins" in Manifest->Dependencies so that
the org.eclipse.core.runtime comes *after* 
org.eclipse.higgins.dependencies.redistributable ensured that QName is 
picked up from the ...dependencies.distributable.

Kind regards,
Carl




Tie Li <litie@xxxxxxxxxx> 
Sent by: higgins-dev-bounces@xxxxxxxxxxx
04/05/2008 01:33 PM
Please respond to
"Higgins \(Trust Framework\) Project developer discussions" 
<higgins-dev@xxxxxxxxxxx>


To
higgins-dev@xxxxxxxxxxx
cc

Subject
[higgins-dev] The javax.xml.namespace.QName issue in higgins code







When I run higgins.crpps code, I got this exception during runtime: 

java.lang.LinkageError: loader constraints violated when linking 
javax/xml/namespace/QName class 
        at org.eclipse.higgins.iss.cardspace.IdentityToken.toElement(
IdentityToken.java:118) 
        at org.eclipse.higgins.iss.cardspace.IdentityToken.getAs(
IdentityToken.java:73) 
        at 
org.eclipse.higgins.crpps.service.InfoCardModel.handleGetTokenRequest(
InfoCardModel.java:108) 
        at 
org.eclipse.higgins.crpps.service.InfoCardController.previewToken(
InfoCardController.java:203) 
        at org.eclipse.higgins.crpps.service.InfoCardController.sendToken(
InfoCardController.java:212) 
        at org.eclipse.higgins.crpps.ui.CardTaskView$12.run(
CardTaskView.java:659) 
        at 
org.eclipse.jface.operation.ModalContext$ModalContextThread.run(
ModalContext.java:113) 

I looked into the code, and found the QName class exists in both JRE (v 
5.0) and xml-api.jar (inside dependency.redist). And in most cases the 
higgins plug-ins load QName class from JRE. This may cause problem. 

My debugging experience tells me: if a plug-in put the 
"org.eclipse.core.runtime" into the "Require-Bundle" (in Menifest.MF), 
then all of the JRE's classes will be loaded with first priority, 
otherwise, the Eclipse platform try to search the class from it's own 
class loader delegation mechanism. 

If you really depend on packages in "org.eclipse.core.runtime", you can 
use "Import-Package" instead of "Require-Bundle". When I use 
"Import-Package" in "org.eclipse.higgins.iss.cardspace", the above 
exception disappear. 

I have not checked in this piece of code yet. 

Li Tie | IBM Lotus | Eclipse committer | Tel: 86-10-82452494 | Fax: 
86-10-82452887 _______________________________________________
higgins-dev mailing list
higgins-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/higgins-dev




Back to the top