[jdom-interest] java.lang.IllegalAccessError
Andres March
Andres at ehealthcontracts.com
Mon Jun 3 16:18:04 PDT 2002
With WebSphere the classloader is weird. Most likely JDOM is getting loaded with a different classloader than your application. This could be because you are putting jdom.jar in the AppServer/lib directory. You should put all application specific jar in the lib directory in the .war file. This is under WEB-INF. I had this problem myself but I think it is more secure this way. Using this application-specific lib directory is extremely important when using classes that websphere already has in its classpath, i.e. xerces.jar, etc...
Good luck.
-----Original Message-----
From: Alex Rosen [mailto:arosen at silverstream.com]
Sent: Monday, June 03, 2002 4:07 PM
To: jvdsandt at xs4all.nl; jdom-interest at jdom.org
Subject: RE: [jdom-interest] java.lang.IllegalAccessError
In Java, any class in the same package can access a protected method. So
this call should be perfectly legit. No idea why it would complain. I assume
this is IBM's VM that it's running on - it's not a pre-release version or
anything is it?
Alex
> -----Original Message-----
> From: jdom-interest-admin at jdom.org
> [mailto:jdom-interest-admin at jdom.org]On Behalf Of Jan van de Sandt
> Sent: Saturday, June 01, 2002 5:11 PM
> To: jdom-interest at jdom.org
> Subject: [jdom-interest] java.lang.IllegalAccessError
>
>
> Hello,
>
> I'm using JDOM beta 8 in combination with WebSphere 4.0.3 and I get an
> java.lang.IllegalAccessError when I call the Document
> constructor with an
> element as the argument.
> When I look at the source this error this seems logical because the
> setDocument method of the Element class is protected. So this method
> should only be accessible by subclasses of Element and not by the
> ContenList class.
> The stack trace:
>
> Original Exception:
> Error Message: org.jdom.ContentList tried to access method
> org/jdom/Element.setDocument(Lorg/jdom/Document;)Lorg/jdom/Ele
> ment;Error Code: 500
> Target Servlet: null
> Error Stack:
> java.lang.IllegalAccessError: org.jdom.ContentList tried to
> access method
> org/jdom/Element.setDocument(Lorg/jdom/Document;)Lorg/jdom/Ele
> ment; at org.jdom.ContentList.add(ContentList.java:221)
> at org.jdom.ContentList.add(ContentList.java:146)
> at java.util.AbstractList.add(AbstractList.java:101)
> at org.jdom.Document.setRootElement(Document.java:212)
> at org.jdom.Document.<init>(Document.java:116)
> at org.jdom.Document.<init>(Document.java:131)
>
>
> Has anybody experienced this problem before and should the setDocument
> method not be friendly instead of protected ?
> Thanks in advance,
>
> Jan.
>
>
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/yo
uraddr at yourhost.com
_______________________________________________
To control your jdom-interest membership:
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com
More information about the jdom-interest
mailing list