So this error appeared after I compiled my java classes, packaged them in a war, and deployed it to the application server. The only major change that happened to my system was an upgrade to Snow Leopard. I searched the web forums and discovered that this issue is due to compiling the java classes with a different Java compiler version than the JVM version on the application server.
How can this be? It was working fine all this time. I checked my JAVA_HOME environment variable and it was pointing to a JVM-specific directory: 1.X.0
On the command line, I typed:
javac -version
and it returned the latest version. So I thought that maybe the OS upgrade overrided my default Java compiler. I started to look into the ant file to find a task attribute to point to a specific JVM. After redeployment, the error still persisted.
So finally, I thought about testing the actual java compiler, in the 1.X.0 directory. I typed: javac -version and it returned again the latest version. I tried: ./javac -version.. the results are the same.
Then I traversed to the other previous versioned directories. All of them returned the latest version.
This was really odd. So finally, I decided to override all the directories from the AWESOME Time Machine. Specifically, I replaced the directories with the directories before the OS upgrade.
I ran the compilation and deployment and the issue is RESOLVED.
I’m not sure why Snow Leopard overrided my directories with the latest Java compiler, but I’m glad the war file is deployable. If I didn’t discover this issue, then it would have caused me unneccessary stress and panic if it was a release day.
No Comments Yet so far
Leave a comment
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>