I actually just figured out this problem by setting the
-Djava.compiler=NONE parameter in "JAVA_OPTS" and _NOT_ "CATALINA_OPTS".
Also, make sure when you are setting the environmental variable in both
Windows and Linux that you do not include quote marks around it.

LINUX EXAMPLE:
--------------
THIS WILL WORK:
        JAVA_OPTS=-Djava.compiler=NONE

THIS WILL NOT WORK:
        JAVA_OPTS="-Djava.compiler=NONE"



Hope this helps some other developers!

-- Jeremiah



-----Original Message-----
From: Jeremiah Armstrong 
Sent: Wednesday, July 02, 2003 3:43 PM
To: '[EMAIL PROTECTED]'
Subject: Stack Trace Line Numbers

Since I started using Tomcat 4.1.24, I am encountering problems
debugging servlets when an exception is thrown. In previous servlet
containers that I have used, when a stack trace is printed to the log
using (Exception).printStackTrace(), the line number of the offending
piece of code is output to the log. Unfortunately, I now get the
"Unknown Source" message instead.

I am using Sun's JDK 1.4.1_02, and I've tried playing with the "-server"
parameter and "-Djava.compiler=NONE" parameter based on some suggestions
I've read in mail archives, but this doesn't fix my problem. I've also
run this code using the JRockit 8.1 JVM, but it doesn't seem to make a
difference. Anyone have some ideas?

Thanks!

-- Jeremiah


EXAMPLE
------------------------------------------------------------------
Today I get this:
java.lang.NullPointerException
        at com.posportal.cart.ProcessOrderAction.perform(Unknown Source)
        at
org.apache.struts.action.ActionServlet.processActionPerform(ActionServle
t.java:1787)

I used to get something like this and this is what I want:
java.lang.NullPointerException
        at
com.posportal.cart.ProcessOrderAction.perform(ProcessOrderAction.java:68
9)
        at
org.apache.struts.action.ActionServlet.processActionPerform(ActionServle
t.java:1787)
------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to