Rogue NullPointerExceptions in IBM JDK 1.4.0

J

James

I am running Tomcat 4.0.6 on Redhat Linux using IBM JDK 1.4.0 and
getting moving NullPointerExceptions.

Code that runs fine on Sun JDK 1.3.1 on Windows 2000 and Tomcat 3.3 is
producing rogue NullPointerExceptions on the above environment.
Examples where I get a NullPointerException:

int i=1;
int j;

j = Math.max(0,1); <-- this line


Another example:

float OASPct; // class variable
OASPct = inputObject.val; // assign to a float in the input

if(OASPct == 100f/100f) { <-- this if stmt
// do nothing
}

The NullPointerException doesn't happen on the first few runs through.
I may call the complex algorithm 13-15 times (with the same numbers
being used time) before it starts to throw the Exceptions in the same
block of code that includes innocent statement like those above.

Another symptom: the stack trace that it returns only cites "Compiled
Code" as the first level of error with no line number or method name
(but all the references the rest of the way up the call stack cite the
appropriate method name and line number). I am only able to track
down the lines that it complains about by outputting
System.out.println() on every line around the area that it always
crops up.

Tomcat 4.0.6 doesn't want to work with IBM JDK 1.4.1 and I may not be
ready to do a full upgrade soon. I'm hoping for some advice about
what is going on and how I may avoid it. (I'm guessing that it is a
bug in the IBM JDK).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top