You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mark Leone <mi...@cox.net> on 2005/04/30 15:33:11 UTC
Non-Sequitor Stack Trace with no log entry
I have a servlet in Tomcat that makes a static call to
XMLUtils.newDocument(). This is a utility class provided with apache
axis, and I have axis.jar in %catalina_home%\shared\lib. When I invoke
newDocument() I get a Tomcat error page (see text below) with a partial
stack trace indicating a missing class definition for
javax.xml.soap.SOAPException. However, the method I'm calling does not
throw that exception, and I looked at all the relevant source code over
and over again, and it's simply not possible to hit any code that
references SOAPException by invoking newDocument(). (The stack trace
shows it blowing up on the statement that invokes newDocument(). I
placed an import statement for SOAPException in the code, to humor the
runtime engine, but I still get the error.
I posted this on the axis user list, and someone was kind enough to ask
for the full stack trace. However, there is no log entry for this event
in Tomcat's logs, notwithstanding a statement to the contrary on the
error page Tomcat displays. So now I'm beginning to suspect Tomcat in
the original error, since it's not able to produce a full stack trace. I
believe I have Tomcat configured properly for logging errors, and I've
received stack traces in the logs many times. On the logging tab of the
service properties window for Tomcat, I have all levels configured to
place log files in the directory in which I'm looking, and I have
"redirect Stderrorr" and "redirect Stdout" to auto.
I'm running Tomcat 5.5.8 on XP. Any idea how I can get this stacktrace,
or if Tomcat could be garbling the class reference somehow?
-Mark
Here's the text of the Tomcat error page.[ Line 94 of ProxyServlet.java
says Document doc = XMLUtils.newDocument(); ]
*type* Exception report
*message*
*description* _The server encountered an internal error () that
prevented it from fulfilling this request._
*exception*
javax.servlet.ServletException: Servlet execution threw an exception
*root cause*
java.lang.NoClassDefFoundError: javax/xml/soap/SOAPException
Proxy.ProxyServlet.handleHtmlFile(ProxyServlet.java:94)
Proxy.ProxyServlet.doGet(ProxyServlet.java:55)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
*note* _The full stack trace of the root cause is available in the
Apache Tomcat/5.0 logs._
------------------------------------------------------------------------
Apache Tomcat/5.0
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Non-Sequitor Stack Trace with no log entry
Posted by Mark Leone <mi...@cox.net>.
QM wrote:
>On Sat, Apr 30, 2005 at 09:33:11AM -0400, Mark Leone wrote:
>: I have a servlet in Tomcat that makes a static call to
>: XMLUtils.newDocument(). This is a utility class provided with apache
>: axis, and I have axis.jar in %catalina_home%\shared\lib.
>
>Before we even begin -- why is axis.jar in shared/lib? Why not the
>webapp's WEB-INF/lib?
>
>
Because I want the web app I wrote to be able to call XMLUtils methods,
which are deployed in axis.jar.
>A NoClassDefFound error means a class was present at compile time, but
>isn't available at runtime; in turn, this usually boils down to a
>classloader/visibility issue (if said JAR is somewhere in the
>classpath).
>
>
Yes, your're right. I didn't realize the scope of dependencies that the
static methods in XMLUtils have on the rest of the axis classes. I moved
saaj.jar to %catalina_home%\shared\lib, and I got other NCDFEs, so I
moved all the axis jars, and it compiles now. However, I'm getting fatal
SAXParser errors when I try to ingest HTML 4.01 documents that are not
well-formed XML. Xerces has implemented support for HTML DOM, but
apparently there's no support for creating an HTMLDocumentImpl object
from an HTML 4.01 InputStream that doesn't happen to be well-formed XML.
If anyone knows a way to do this without writing a custom SAX parser,
please enlighten me.
-Mark
>
>: newDocument() I get a Tomcat error page (see text below) with a partial
>: stack trace indicating a missing class definition for
>: javax.xml.soap.SOAPException.
>
>Which JAR holds this class def? -or are there multiple JARs that do
>this? Do they exist in multiple classloaders?
>
>-QM
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Non-Sequitor Stack Trace with no log entry
Posted by QM <qm...@brandxdev.net>.
On Sat, Apr 30, 2005 at 09:33:11AM -0400, Mark Leone wrote:
: I have a servlet in Tomcat that makes a static call to
: XMLUtils.newDocument(). This is a utility class provided with apache
: axis, and I have axis.jar in %catalina_home%\shared\lib.
Before we even begin -- why is axis.jar in shared/lib? Why not the
webapp's WEB-INF/lib?
A NoClassDefFound error means a class was present at compile time, but
isn't available at runtime; in turn, this usually boils down to a
classloader/visibility issue (if said JAR is somewhere in the
classpath).
: newDocument() I get a Tomcat error page (see text below) with a partial
: stack trace indicating a missing class definition for
: javax.xml.soap.SOAPException.
Which JAR holds this class def? -or are there multiple JARs that do
this? Do they exist in multiple classloaders?
-QM
--
software -- http://www.brandxdev.net/
tech news -- http://www.RoarNetworX.com/
code scan -- http://www.JxRef.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org