> One reason could be is that the servlet class is compiled using java1.5
> compiler and when its running in java 1.4x jvm.. Because in java 1.4x
> the string concatenation is done using StringBuffer and in Java 1.5,
> its done using StringBuilder class and this class is not available in
> java 1.4x..
Sun's 1.5 compiler only uses StringBuilder for target of 1.5. So either
the code is being compiled with some buggy compiler or the JRE (possibly
BEA JRockit) is broken in accepting class files with higher version
numbers than it is capable of running. Perhaps more likely, some
ham-fisted intermediate program is rewriting the class file incorrectly.
> Before deploying the jar file in weblogic, compile your classes with
> java 1.4x compiler or use java 1.5 with weblogic..
Or use
-target 1.4 -source 1.4 -bootclasspath /usr/java/j2re1.4.2/lib/rt.jar
Normally I'd suggest using the latest javac and options similar to
those. However, for the 1.4 to 1.5 jump the compiler was destabilised
considerably.
Tom Hawtin

Signature
Unemployed English Java programmer
http://jroller.com/page/tackline/
Roedy Green - 29 Jan 2006 15:31 GMT
On Sun, 29 Jan 2006 15:32:44 +0000, Thomas Hawtin
<usenet@tackline.plus.com> wrote, quoted or indirectly quoted someone
who said :
> -target 1.4 -source 1.4 -bootclasspath /usr/java/j2re1.4.2/lib/rt.jar
the catch is, Javac will happily let you use StringBuilder in -target
1.4 code. It does not know that it is a new class. That why you need
the -bootclasspath to restrict it to old classes.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.