Unable to locate or start compiler

Hi,

A JVM was installed with IS.

Tried to save a java service in Developer, which invoked the compiler and got the following message:

The source was saved but not compiled.
com.wm.app.b2b.server.ServiceException:
[B2BSERV.0014.9116]Unable to locate or start compiler

Details:

com.wm.app.b2b.server.ServiceException: [B2BSERV.0014.9116] Unable to locate or start compiler
at wm.server.ns._compile(ns.java:3527)
at wm.server.ns.buildClass(ns.java:1205)
at java.lang.reflect.Method.invoke(Native Method)
at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:281)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:688)
at com.wm.app.b2b.server.comm.DefaultServerRequestHandler.handleMessage(DefaultServerRequestHandler.java:64)
at com.wm.app.b2b.server.HTTPMessageHandler.process(HTTPMessageHandler.java:166)
at com.wm.app.b2b.server.HTTPDispatch.run(HTTPDispatch.java:457)
at com.wm.util.pool.PooledThread.run(C:/NT/Perforce/basis/4.1.0-terra/module/core/source/com/wm/util/pool/PooledThread.java:103)
at java.lang.Thread.run(Unknown Source)

Thanks for your help,

Kevin

did you set the java home and put the jre in your path? go to your console and type java to check if your java is installed properly.

check the server.cnf file in the servers config directory. Make sure that the parameters:

watt.server.compile
watt.server.compile.unicode

are set to call your JVM

for example:

watt.server.compile=javac -classpath {0} -d {1} {2}
watt.server.compile.unicode=javac -encoding Unicode -classpath {0} -d {1} {2}

If you need to you can specify a full path.

You should install Java SDK (JDK) which contains the java compiler. The compiler doesnt come with JRE.

help! i am having this problem to, what exactly do i need to do to fix it?

This error message is typically returned when the compiler is not in the path when starting the server.

You can also go to the Server UI Settings | Extended page and put a path on command line defined in the watt.server.compile option like so:

watt.server.compile=/Java/jdk1.3.1_04/bin/javac -classpath {0} -d {1} {2}

Most probably You are missing J2SE compiler.
Download it from

and install it on the machine.
Add path to your javac file from command prompt and also make it part of your

system restart e.g.,
path = %path%;C:\j2sdk1.4.1_01\bin

restart your server and this should work

Is the problem due to lack of JDK being installed on the server machine - same where webMethods server is installed, or should it be installed on the local machine where developer software is installed?
Thanks.

  1. Install JDK. I had success with 1.3.1_06 (Note WM prefers 1.1.8 because of a new Java language feature in Java2: you cannot compile a class C.java in package p, if you define a package “p.C” in which you put another class, say D.java).

  2. Assuming you are using a Windows box, change the server.bat as follows:
    SET JAVA_ROOT=C:\webMethods\B2BServer4\jvm
    =>
    SET JAVA_ROOT=C:\jdk1.3.1_06
    Under UNIX, modify server.sh instead.

Hope it helps.

The compiler is used to compile Java services on the IS server machine. IS uses a command line defined in the server.cnf file. You can set the value using IS UI Settings > Extended page. I use:

watt.server.compile=/Java/jdk1.3.1_06/bin/javac -classpath {0} -d {1} {2}

The JDK needs to be installed on the server and you need to modify the system path variable.

Hi,

I am also facing the same problem.
I tried out setting the compiler path in settings-extended field(watt.server.compile , watt.server.compile.unicode ).
I also tried with change in server.sh for JAVA_DIR field settings as well as in server.cnf .
The developer is giving me the error as unable to locate or start compiler.
One more problem I am facing is whatever changes I made in server.sh ,sever.cnf the Java Home directory on IS admin console(about link) is not getting changed .

Please give me some information on this.

Thanks,
Ashish Potnis

Hi Ashish.

did you shutdown and start your IS after you made the changes?

Restarting might not solve the issue.

Regards,
Holger