You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@jakarta.apache.org by rw...@us.britannica.com on 2000/02/25 22:08:56 UTC

IllegalAccessError (and taglibs)

I encountered the same problem a couple of weeks ago, and came to more or
less the same solution, but here are some details that might help to prevent
it in the future, or at least a quick and easy way to fix it if you don't
want to do an entire fresh build.

If you examine the error, you see "java.lang.IllegalAccessError: try to
access class com/sun/xml/tree/ParentNode from class
org/apache/jasper/compiler/TagLibraryInfoImpl".  Note that
com.sun.xml.tree.ParentNode is both 'package scope' and abstract, so the JVM
is right in saying that org.apache.jasper.compiler.TagLibraryInfoImpl should
not be trying to access it.  De-compiling TagLibraryInfoImpl using JAD
(sorry, I didn't look at the real source), generates a file with that
imports com.sun.xml.tree.ParentNode, but does not use it directly.
Commenting out that line (which may not have been necessary) and recompiling
just that file, then adding that file to the CLASSPATH before the actual
tomcat packages made the problem go away for me.

Is there something odd about the compiler that is used to generate the
default binary distribution for Tomcat?  It would seem that this reference
to com.sun.xml.tree.ParentNode is spurious, and the root of the problem.
Maybe this is a problem with the Java Runtime (I was using JDK 1.2.2 on
WinNT) since I would assume the taglib example was tested for these builds?

Re: IllegalAccessError (and taglibs)

Posted by Danno Ferrin <sh...@earthlink.net>.

rwaldhof@us.britannica.com wrote:
> 
> I encountered the same problem a couple of weeks ago, and came to more or
> less the same solution, but here are some details that might help to prevent
> it in the future, or at least a quick and easy way to fix it if you don't
> want to do an entire fresh build.
> 
> If you examine the error, you see "java.lang.IllegalAccessError: try to
> access class com/sun/xml/tree/ParentNode from class
> org/apache/jasper/compiler/TagLibraryInfoImpl".  Note that
> com.sun.xml.tree.ParentNode is both 'package scope' and abstract, so the JVM
> is right in saying that org.apache.jasper.compiler.TagLibraryInfoImpl should
> not be trying to access it.  De-compiling TagLibraryInfoImpl using JAD
> (sorry, I didn't look at the real source), generates a file with that
> imports com.sun.xml.tree.ParentNode, but does not use it directly.
> Commenting out that line (which may not have been necessary) and recompiling
> just that file, then adding that file to the CLASSPATH before the actual
> tomcat packages made the problem go away for me.
> 
> Is there something odd about the compiler that is used to generate the
> default binary distribution for Tomcat?  It would seem that this reference
> to com.sun.xml.tree.ParentNode is spurious, and the root of the problem.
> Maybe this is a problem with the Java Runtime (I was using JDK 1.2.2 on
> WinNT) since I would assume the taglib example was tested for these builds?
>