[jdom-interest] java.lang.IllegalAccessError

Jan van de Sandt jvdsandt at xs4all.nl
Sat Jun 1 14:10:30 PDT 2002


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/Element;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/Element;     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.





More information about the jdom-interest mailing list