Java Service compilation problem

Hi Experts,

I am trying to run a java service on a newly set wM 7.1 environment on windows XP

Here is the IS JVM details

Java Version 1.5.0_12 (49.0)
Java VM Name Java HotSpot™ Server VM
Java Build Info 1.5.0_12-b04, mixed mode
Java Vendor Sun Microsystems Inc.
Java Home C:\webMethods7\jvm\win150\jre
Java Classpath C:\webMethods7\jvm\win150\jre\lib\rt.jar
C:\webMethods7\jvm\win150\jre\lib\i18n.jar
C:\webMethods7\IntegrationServer\lib\wm-isproxy.jar
C:\webMethods7\IntegrationServer…\common\lib\wm-converters.jar
C:\webMethods7\IntegrationServer\config\Caching

server.bat parameter
SET JAVA_DIR=C:\webMethods7\jvm\win150\jre

On the Extended Settings I have made the following entry -
watt.server.compile=C:\webMethods7\jvm\win150\bin\javac -classpath {0} -d {1} {2}
watt.server.compile.unicode=C:\webMethods7\win150\bin\javac -encoding Unicode

The error which I am getting on running the Java Service is
com.wm.app.b2b.server.ServiceException: [ISS.0026.9102] Service ‘TrainingPackage_KarthikLG.services:addThreeNos’ is not operational. To run this service, first recompile the Java source.

On inspecting the service errors on IS admin page

com.wm.app.b2b.server.ServiceException: [ISS.0026.9102] Service ‘TrainingPackage_KarthikLG.services:addThreeNos’ is not operational. To run this service, first recompile the Java source.

java.lang.UnsupportedClassVersionError: Bad version number in .class file

I read the second error means -

This error is caused when you compile a .java file with one version of JDK and running the .class file with a different version of JVM.

javac (compile) - version: X
java (run) - version: Y

If X is newer than Y; then you may face this issue at runtime.

But I see that the IS is pointing to the 1.5 jvm versions in all the places. So where is the conflict?

One important point to be noted is that I have installed Java 1.6
C:\Program Files\Java\jdk1.6.0_04 which is used by eclipse IDE
Also the PATH CLASSPATH JAVA_HOME environment variables point to Java 1.6

Is this causing the problem?

Karthik

Karthik,

Try change the above configuration to

[SIZE=2]watt.server.compile=…\jvm\win150\bin\javac -classpath {0} -d {1} {2}

watt.server.compile.unicode=…\jvm\win150\bin\javac -encoding Unicode -classpath {0} -d {1} {2}[/size]

[SIZE=2]Restart the IS, It should work…
[/size]

Hi,

Just compile the code again by simply editing and saving it on your developer screen.
It should work for you.

cheers!
nD

Java 1.6 has been uninstalled.

I am using the extended settings as below

watt.server.compile=…\jvm\win150\bin\javac -classpath {0} -d {1} {2}
watt.server.compile.unicode=…\jvm\win150\bin\javac -encoding Unicode -classpath {0} -d {1} {2}

IS restarted.

But still the problem persists -

2010-01-11 23:23:58 PST TrainingPackage_KarthikLG.services:addThreeNos com.wm.app.b2b.server.ServiceException: [ISS.0026.9102] Service ‘TrainingPackage_KarthikLG.services:addThreeNos’ is not operational. To run this service, first recompile the Java source.

2010-01-11 23:23:58 PST TrainingPackage_KarthikLG.services:addThreeNos java.lang.UnsupportedClassVersionError: Bad version number in .class file

2010-01-11 23:23:28 PST wm.server.query:getSystemAttributes com.wm.app.b2b.server.AccessException: [ISS.0084.9004]
Access Denied

[COLOR=#000099][/color]

[SIZE=2][/size]

oh yes after all those changes I missed the smallest thing - recompiling the java service. :slight_smile:

Issue solved - Thanks arul & nD

:slight_smile: it happens some time … glad to know it’s resolved now!!

cheers!
nD