You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Marius Sorin Barduta <ma...@necomm.ro> on 2000/06/20 10:36:09 UTC

example prevents Tomcat start throwing java.lang.IllegalAccessError

I've tried to use the struts example from the latest nightly build
(jakarta-struts-20000619.tar.gz).
I copied struts-example.war and struts-documentation.war to webapps
directory under TOMCAT-HOME.
I started Tomcat, the .war files get expanded, but Tomcat exits with the
chain of exceptions listed below.
Rolling back the changes it seems that having struts-example in webapps
caused the failure. Other applications including struts-documentation runs
OK when struts-example is removed from webapps.  It seems that the error
causing Tomcat to exit occurs when actually trying to execute struts-example
(index.jsp in fact). This happens at startup due to the load on startup tag
in web.xml for struts-example. When load on startup is reset to 0, when
trying to execute index.jsp under struts-example, Tomcat doesn't exit but
throws  the exception below
The error seems to be caused by a call to an inexistent method or something
like that so my feeling is I have an outdated jar, one which is related to
XML processing but I'm not sure which one.
I have also a concern about the fragility of Tomcat 3.1 which fails to start
when having a "misbehaving" application. This shouldn't happen or am I
missing something?
Until I get deep down in the code to find where the error comes from, can
anybody give a clue?
My configuration: Tomcat 3.1 standalone on a Windows 2000, JDK 1.2,  Tomcat
runs Ok except the struts-example.

Thank you,
Marius



Unhandled error! You might want to consider having an error page to report
such
errors more gracefully
java.lang.IllegalAccessError: org.w3c.dom.NodeList
com.sun.xml.tree.ParentNode.g
etElementsByTagName(java.lang.String)
        void
org.apache.jasper.compiler.JspParseEventListener.handleDirective(ja
va.lang.String, org.apache.jasper.compiler.Mark,
org.apache.jasper.compiler.Mark
, java.util.Hashtable)
        void
org.apache.jasper.compiler.DelegatingListener.handleDirective(java.
lang.String, org.apache.jasper.compiler.Mark,
org.apache.jasper.compiler.Mark, j
ava.util.Hashtable)
        boolean
org.apache.jasper.compiler.Parser$Directive.accept(org.apache.ja
sper.compiler.ParseEventListener, org.apache.jasper.compiler.JspReader,
org.apac
he.jasper.compiler.Parser)
        void org.apache.jasper.compiler.Parser.parse(java.lang.String,
java.lang
.Class[])
        void org.apache.jasper.compiler.Parser.parse(java.lang.String)
        void org.apache.jasper.compiler.Parser.parse()
        boolean org.apache.jasper.compiler.Compiler.compile()
        boolean
org.apache.jasper.runtime.JspServlet.loadJSP(java.lang.String, j
ava.lang.String, boolean, javax.servlet.http.HttpServletRequest,
javax.servlet.h
ttp.HttpServletResponse)
        void
org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecess
ary(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletRespons
e)
        void
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(java
x.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse,
boole
an)
        void
org.apache.jasper.runtime.JspServlet.serviceJspFile(javax.servlet.h
ttp.HttpServletRequest, javax.servlet.http.HttpServletResponse,
java.lang.String
, java.lang.Throwable, boolean)
        void
org.apache.jasper.runtime.JspServlet.service(javax.servlet.http.Htt
pServletRequest, javax.servlet.http.HttpServletResponse)
        void
javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest
, javax.servlet.ServletResponse)
        void
org.apache.tomcat.core.ServletWrapper.handleRequest(org.apache.tomc
at.core.Request, org.apache.tomcat.core.Response)
        void
org.apache.tomcat.core.RequestDispatcherImpl.forward(javax.servlet.
ServletRequest, javax.servlet.ServletResponse)
        void
org.apache.tomcat.servlets.DefaultServlet.doGet(javax.servlet.http.
HttpServletRequest, javax.servlet.http.HttpServletResponse)
        void
javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServl
etRequest, javax.servlet.http.HttpServletResponse)
        void
javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest
, javax.servlet.ServletResponse)
        void
org.apache.tomcat.core.ServletWrapper.handleRequest(org.apache.tomc
at.core.Request, org.apache.tomcat.core.Response)
        void
org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.cor
e.Request, org.apache.tomcat.core.Response)
        void
org.apache.tomcat.service.http.HttpConnectionHandler.processConnect
ion(org.apache.tomcat.service.TcpConnection, java.lang.Object[])
        void org.apache.tomcat.service.TcpConnectionThread.run()
        void java.lang.Thread.run()


Re: debugging Servlets

Posted by "mkramer@Rightangles.com" <mk...@rightangles.com>.
Hi All,

I have been lurking and want to add my two cents.

VisualAge is a fantastic development environment! I have been using it for
almost 2 years, and find the debugger 1st rate.

I would highly recommend it!!

Mike
----- Original Message -----
From: Rick Goeltz <rt...@ornl.gov>
To: <st...@jakarta.apache.org>
Sent: Tuesday, June 20, 2000 9:57 AM
Subject: Re: debugging Servlets


>
> >Has anyone had any success using interactive debuggers with
> >servlets, using Tomcat (or any other servlet container) ?
>
> Absolutely, Tomcat with IBM's VisualAge for Java.  Incremental compile; in
> a split second you can hit the browser page to check the
> result.  Interactive debugger; logs are in VAJ too.  Love it.
>
> There's documentation on how to set up the free version.  Or, pay the $120
> for the Pro version; there's an easier setup.  It's a bargain.
>
>
> Rick


Re: debugging Servlets

Posted by Rick Goeltz <rt...@ornl.gov>.
>Has anyone had any success using interactive debuggers with
>servlets, using Tomcat (or any other servlet container) ?

Absolutely, Tomcat with IBM's VisualAge for Java.  Incremental compile; in 
a split second you can hit the browser page to check the 
result.  Interactive debugger; logs are in VAJ too.  Love it.

There's documentation on how to set up the free version.  Or, pay the $120 
for the Pro version; there's an easier setup.  It's a bargain.


Rick

Re: debugging Servlets

Posted by Markus Blaurock <bl...@dig.de>.
Nick Afshartous wrote:
> 
> Has anyone had any success using interactive debuggers with
> servlets, using Tomcat (or any other servlet container) ?  Please advise.
> (sorry for the tangent).

VisualAge for Java Entry Edition.

IBM www-site has a hands-on tutorial on using tomcat with visual age for
debugging servlets. I haven't tried myself although...




-- 
markus
 

debugging Servlets

Posted by Nick Afshartous <af...@iclick.com>.
Has anyone had any success using interactive debuggers with
servlets, using Tomcat (or any other servlet container) ?  Please advise.
(sorry for the tangent).
-- 

	Nick




Re: example prevents Tomcat start throwingjava.lang.IllegalAccessError

Posted by Marius Sorin Barduta <ma...@necomm.ro>.
Craig, thank you very much for your support!

It works now. :-)
First, the JDK I used was one taken from Oracle JDeveloper 3.0 for Windows
NT (running on a Win2K)

java version "1.2.2-JDeveloper"
Ferrari VM (Copyright (c) 1998, 1999  Oracle Corp.  Version 1.2.184 odv,
nojit)

I had no problems with tomcat and this JDK until I tried to set up struts.
Then I run into the error which  makes the subject of this thread.

I have installed Sun JDK 1.2.2 :

java version "1.2.2"
Classic VM (build JDK-1.2.2-W, native threads, symcjit)

and struts example run OK.
Other remarks:
- I have replaced xml.jar with jaxp.jar and parser.jar in %TOMCAT_HOME%\lib
- As you might guess the error was thrown when compiling the jsp files. Once
the files were compiled the example run even with the first JDK I used.
(well, so it seems :-) )

Marius





Re: example prevents Tomcat start throwingjava.lang.IllegalAccessError

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Marius Sorin Barduta wrote:

> > Deep down, the IllegalAccessError problem with Tomcat 3.1 is actually
> caused by a
> > compiler bug, if you try to compile it (Tomcat) with a JDK 1.1 or 1.3
> compiler.
> > Be sure you are using the final binary release distribution.
>
> I'm sure I'm using the final binary release distribution
>
> > I have had IllegalAccessERror problems with Tomcat 3.1, especially when
> you try
> > to incorporate another XML parser (as Struts does, because it requires the
> > jaxp.jar and parser.jar files),
>
> Aren't jaxp.jar and parser.jar conflicting with xml.jar? I mean should I put
> jaxp.jar and parser.jar in lib under TOMCAT_CONF near xml.jar?
>

Yes, they "conflict" in the sense that they both have some classes with the same
names.  The JAXP parser happens to have the same name and behavior as the one in
xml.jar so it works with Tomcat 3.1.

Could you please do a "java -version" at the command line and report back what
it says?  (There might have been problems with early versions of 1.2.2 as well
-- I have to consult some notes to be sure).

>
> Thanks,
>
> Marius

Craig





Re: example prevents Tomcat start throwingjava.lang.IllegalAccessError

Posted by Marius Sorin Barduta <ma...@necomm.ro>.
> Deep down, the IllegalAccessError problem with Tomcat 3.1 is actually
caused by a
> compiler bug, if you try to compile it (Tomcat) with a JDK 1.1 or 1.3
compiler.
> Be sure you are using the final binary release distribution.

I'm sure I'm using the final binary release distribution

> I have had IllegalAccessERror problems with Tomcat 3.1, especially when
you try
> to incorporate another XML parser (as Struts does, because it requires the
> jaxp.jar and parser.jar files),

Aren't jaxp.jar and parser.jar conflicting with xml.jar? I mean should I put
jaxp.jar and parser.jar in lib under TOMCAT_CONF near xml.jar?

Thanks,

Marius



Re: example prevents Tomcat start throwingjava.lang.IllegalAccessError

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Deep down, the IllegalAccessError problem with Tomcat 3.1 is actually caused by a
compiler bug, if you try to compile it (Tomcat) with a JDK 1.1 or 1.3 compiler.
Be sure you are using the final binary release distribution.

I have had no problems at all running the Struts examples under Tomcat 3.1, as
well as the most cutting edge versions of Tomcat 3.2dev, in the following
environments:

    Linux (Red Hat 6.1), Sun JDK 1.2.2

    Windows98, Sun JDK 1.2.2

I have had IllegalAccessERror problems with Tomcat 3.1, especially when you try
to incorporate another XML parser (as Struts does, because it requires the
jaxp.jar and parser.jar files), trying to run under JDK1.1 or 1.3.  These
problems have not surfaced when running a recent nightly release of Tomcat 3.2,
however, because Tomcat 3.2 also uses JAXP for XML parsing (instead of
"xml.jar").

Craig McClanahan


Dzenan Ridjanovic wrote:

> I have exactly the same problem!
>
> A 11:36 20/06/00 +0300, vous avez écrit :
> >I've tried to use the struts example from the latest nightly build
> >(jakarta-struts-20000619.tar.gz).
> >I copied struts-example.war and struts-documentation.war to webapps
> >directory under TOMCAT-HOME.
> >I started Tomcat, the .war files get expanded, but Tomcat exits with the
> >chain of exceptions listed below.
> >Rolling back the changes it seems that having struts-example in webapps
> >caused the failure. Other applications including struts-documentation runs
> >OK when struts-example is removed from webapps.  It seems that the error
> >causing Tomcat to exit occurs when actually trying to execute struts-example
> >(index.jsp in fact). This happens at startup due to the load on startup tag
> >in web.xml for struts-example. When load on startup is reset to 0, when
> >trying to execute index.jsp under struts-example, Tomcat doesn't exit but
> >throws  the exception below
> >The error seems to be caused by a call to an inexistent method or something
> >like that so my feeling is I have an outdated jar, one which is related to
> >XML processing but I'm not sure which one.
> >I have also a concern about the fragility of Tomcat 3.1 which fails to start
> >when having a "misbehaving" application. This shouldn't happen or am I
> >missing something?
> >Until I get deep down in the code to find where the error comes from, can
> >anybody give a clue?
> >My configuration: Tomcat 3.1 standalone on a Windows 2000, JDK 1.2,  Tomcat
> >runs Ok except the struts-example.
> >
> >Thank you,
> >Marius
> >
> >
> >
> >Unhandled error! You might want to consider having an error page to report
> >such
> >errors more gracefully
> >java.lang.IllegalAccessError: org.w3c.dom.NodeList
> >com.sun.xml.tree.ParentNode.g
> >etElementsByTagName(java.lang.String)
> >        void
> >org.apache.jasper.compiler.JspParseEventListener.handleDirective(ja
> >va.lang.String, org.apache.jasper.compiler.Mark,
> >org.apache.jasper.compiler.Mark
> >, java.util.Hashtable)
> >        void
> >org.apache.jasper.compiler.DelegatingListener.handleDirective(java.
> >lang.String, org.apache.jasper.compiler.Mark,
> >org.apache.jasper.compiler.Mark, j
> >ava.util.Hashtable)
> >        boolean
> >org.apache.jasper.compiler.Parser$Directive.accept(org.apache.ja
> >sper.compiler.ParseEventListener, org.apache.jasper.compiler.JspReader,
> >org.apac
> >he.jasper.compiler.Parser)
> >        void org.apache.jasper.compiler.Parser.parse(java.lang.String,
> >java.lang
> >.Class[])
> >        void org.apache.jasper.compiler.Parser.parse(java.lang.String)
> >        void org.apache.jasper.compiler.Parser.parse()
> >        boolean org.apache.jasper.compiler.Compiler.compile()
> >        boolean
> >org.apache.jasper.runtime.JspServlet.loadJSP(java.lang.String, j
> >ava.lang.String, boolean, javax.servlet.http.HttpServletRequest,
> >javax.servlet.h
> >ttp.HttpServletResponse)
> >        void
> >org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecess
> >ary(javax.servlet.http.HttpServletRequest,
> >javax.servlet.http.HttpServletRespons
> >e)
> >        void
> >org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(java
> >x.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse,
> >boole
> >an)
> >        void
> >org.apache.jasper.runtime.JspServlet.serviceJspFile(javax.servlet.h
> >ttp.HttpServletRequest, javax.servlet.http.HttpServletResponse,
> >java.lang.String
> >, java.lang.Throwable, boolean)
> >        void
> >org.apache.jasper.runtime.JspServlet.service(javax.servlet.http.Htt
> >pServletRequest, javax.servlet.http.HttpServletResponse)
> >        void
> >javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest
> >, javax.servlet.ServletResponse)
> >        void
> >org.apache.tomcat.core.ServletWrapper.handleRequest(org.apache.tomc
> >at.core.Request, org.apache.tomcat.core.Response)
> >        void
> >org.apache.tomcat.core.RequestDispatcherImpl.forward(javax.servlet.
> >ServletRequest, javax.servlet.ServletResponse)
> >        void
> >org.apache.tomcat.servlets.DefaultServlet.doGet(javax.servlet.http.
> >HttpServletRequest, javax.servlet.http.HttpServletResponse)
> >        void
> >javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServl
> >etRequest, javax.servlet.http.HttpServletResponse)
> >        void
> >javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest
> >, javax.servlet.ServletResponse)
> >        void
> >org.apache.tomcat.core.ServletWrapper.handleRequest(org.apache.tomc
> >at.core.Request, org.apache.tomcat.core.Response)
> >        void
> >org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.cor
> >e.Request, org.apache.tomcat.core.Response)
> >        void
> >org.apache.tomcat.service.http.HttpConnectionHandler.processConnect
> >ion(org.apache.tomcat.service.TcpConnection, java.lang.Object[])
> >        void org.apache.tomcat.service.TcpConnectionThread.run()
> >        void java.lang.Thread.run()
> >
> >
>
> Dzenan Ridjanovic
> http://drdb.fsa.ulaval.ca/


Re: example prevents Tomcat start throwing java.lang.IllegalAccessError

Posted by Dzenan Ridjanovic <dz...@fsa.ulaval.ca>.
I have exactly the same problem!

A 11:36 20/06/00 +0300, vous avez écrit :
>I've tried to use the struts example from the latest nightly build
>(jakarta-struts-20000619.tar.gz).
>I copied struts-example.war and struts-documentation.war to webapps
>directory under TOMCAT-HOME.
>I started Tomcat, the .war files get expanded, but Tomcat exits with the
>chain of exceptions listed below.
>Rolling back the changes it seems that having struts-example in webapps
>caused the failure. Other applications including struts-documentation runs
>OK when struts-example is removed from webapps.  It seems that the error
>causing Tomcat to exit occurs when actually trying to execute struts-example
>(index.jsp in fact). This happens at startup due to the load on startup tag
>in web.xml for struts-example. When load on startup is reset to 0, when
>trying to execute index.jsp under struts-example, Tomcat doesn't exit but
>throws  the exception below
>The error seems to be caused by a call to an inexistent method or something
>like that so my feeling is I have an outdated jar, one which is related to
>XML processing but I'm not sure which one.
>I have also a concern about the fragility of Tomcat 3.1 which fails to start
>when having a "misbehaving" application. This shouldn't happen or am I
>missing something?
>Until I get deep down in the code to find where the error comes from, can
>anybody give a clue?
>My configuration: Tomcat 3.1 standalone on a Windows 2000, JDK 1.2,  Tomcat
>runs Ok except the struts-example.
>
>Thank you,
>Marius
>
>
>
>Unhandled error! You might want to consider having an error page to report
>such
>errors more gracefully
>java.lang.IllegalAccessError: org.w3c.dom.NodeList
>com.sun.xml.tree.ParentNode.g
>etElementsByTagName(java.lang.String)
>        void
>org.apache.jasper.compiler.JspParseEventListener.handleDirective(ja
>va.lang.String, org.apache.jasper.compiler.Mark,
>org.apache.jasper.compiler.Mark
>, java.util.Hashtable)
>        void
>org.apache.jasper.compiler.DelegatingListener.handleDirective(java.
>lang.String, org.apache.jasper.compiler.Mark,
>org.apache.jasper.compiler.Mark, j
>ava.util.Hashtable)
>        boolean
>org.apache.jasper.compiler.Parser$Directive.accept(org.apache.ja
>sper.compiler.ParseEventListener, org.apache.jasper.compiler.JspReader,
>org.apac
>he.jasper.compiler.Parser)
>        void org.apache.jasper.compiler.Parser.parse(java.lang.String,
>java.lang
>.Class[])
>        void org.apache.jasper.compiler.Parser.parse(java.lang.String)
>        void org.apache.jasper.compiler.Parser.parse()
>        boolean org.apache.jasper.compiler.Compiler.compile()
>        boolean
>org.apache.jasper.runtime.JspServlet.loadJSP(java.lang.String, j
>ava.lang.String, boolean, javax.servlet.http.HttpServletRequest,
>javax.servlet.h
>ttp.HttpServletResponse)
>        void
>org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecess
>ary(javax.servlet.http.HttpServletRequest,
>javax.servlet.http.HttpServletRespons
>e)
>        void
>org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(java
>x.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse,
>boole
>an)
>        void
>org.apache.jasper.runtime.JspServlet.serviceJspFile(javax.servlet.h
>ttp.HttpServletRequest, javax.servlet.http.HttpServletResponse,
>java.lang.String
>, java.lang.Throwable, boolean)
>        void
>org.apache.jasper.runtime.JspServlet.service(javax.servlet.http.Htt
>pServletRequest, javax.servlet.http.HttpServletResponse)
>        void
>javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest
>, javax.servlet.ServletResponse)
>        void
>org.apache.tomcat.core.ServletWrapper.handleRequest(org.apache.tomc
>at.core.Request, org.apache.tomcat.core.Response)
>        void
>org.apache.tomcat.core.RequestDispatcherImpl.forward(javax.servlet.
>ServletRequest, javax.servlet.ServletResponse)
>        void
>org.apache.tomcat.servlets.DefaultServlet.doGet(javax.servlet.http.
>HttpServletRequest, javax.servlet.http.HttpServletResponse)
>        void
>javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServl
>etRequest, javax.servlet.http.HttpServletResponse)
>        void
>javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest
>, javax.servlet.ServletResponse)
>        void
>org.apache.tomcat.core.ServletWrapper.handleRequest(org.apache.tomc
>at.core.Request, org.apache.tomcat.core.Response)
>        void
>org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.cor
>e.Request, org.apache.tomcat.core.Response)
>        void
>org.apache.tomcat.service.http.HttpConnectionHandler.processConnect
>ion(org.apache.tomcat.service.TcpConnection, java.lang.Object[])
>        void org.apache.tomcat.service.TcpConnectionThread.run()
>        void java.lang.Thread.run()
>
>

Dzenan Ridjanovic
http://drdb.fsa.ulaval.ca/