Apr 29th, 2009, 11:25 AM
While executing a run.sh while installing a tcserver-6.0.19.A-linux64, the error is encounterd
( The java class could not be loaded. java.lang.UnsupportedClassVersionError: com/orangevolt/tools/ant/stub (Unsupported major.minor version 49.0)
Below is my server Setup:
tcserver-6.0.19.A-linux64]$ export JAVA_HOME=/usr/java/jdk1.6.0_13/
tcserver-6.0.19.A-linux64]$ $JAVA_HOME/bin/java -version
java version "1.6.0_13"
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) 64-Bit Server VM (build 11.3-b02, mixed mode)
I changed run.sh to execute the correct Java version.
tcserver-6.0.19.A-linux64]$ cat run.sh
/usr/java/jdk1.6.0_13/bin/java -cp .:ijars/groovy-all-1.6.1.jar:ijars/installer.jar installer
Apr 29th, 2009, 11:43 AM
You could have also, more easily, updated PATH to include the correct java executable. JAVA_HOME is not used for that purpose.
Apr 29th, 2009, 02:32 PM
Mhh.. Normally JAVA_HOME variable should be able to be carried over through and be used across the board. The box I was using has a default java installed on /usr/bin/java. Since my PATH looked at /usr/bin first, the script would prematurely error out. Anyway, I had to stick the JAVA_HOME variable ahead of /usr/bin/ in my PATH for the installer to know to use it. I don't really like it but it solves my problem. Thank you very much for steering me into the right direction.
Apr 29th, 2009, 03:30 PM
JAVA_HOME is used by the Java and JVM environment, but when the shell is told to run "java -cp ..." then the shell looks at the PATH envvar to try to find where the 'java' executable lives. So if PATH is "/bin:/usr/bin:/usr/local/bin", the shell will look for /bin/java or /usr/bin/java or /usr/local/bin/java and run the 1st it finds. So if PATH and JAVA_HOME aren't in sync, you could have issues.
May 21st, 2009, 05:35 AM
I am using a work arround by sub-classing org.hibernate.EmptyInterceptor and over-riding the function "String onPrepareStatement(final String sql)". Inside the over-ridden method I am using regular expressions to insert hints into the SQL generated from the HQL (in my case JPQL) by Hibernate.