Java service re-compilation error

Hi,

I careted a sample Java servcie and tried to save it.I was showing me class not found error.I have craeted a java service concat.java inside a folder “sample” inside package “test”.

ie;Test/sample/concat.java

When I try to save it i’m getting an error “Missing Class:Sample”

Also Once I some how did not get any error while saving aftre so many tries and when I tried to run it I got the error “Class Test:Sample not operational.” and also I was aksed to recompile the class.

Please find me a solution for this immediately.

Regards,

Kavitha.L

To recompile a java file, goto the root dir where webMethods is installed thru command prompt
rootDir\webmethod\IntegrationServer\bin
on this location type: jcode makeall [packageName]

where [packageName] is the name of the package where the java file exists. In your case this is test.
I hope this helps.

this needs to be done on the server where your IS is installed.

Hi Hussain,

I tried compiling like that in command prompt.And compilation didnt throw any error.But when I tried to run, it took the input values and again showing the error :

Could not run ‘concat’

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

Why is it coming like this.Please reply immediately.

DO one thing. First save ur java file in the dev by adding some space. Then recompile the file. and den save it once again.
Hope it works

Noo Hussain.Still asking me to recompile.I made changes ,saved and again tried to run.

But same error
Could not run ‘concat’

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

Is it because that I havent set any jar files?

I dont think I need any jar file in this context

This is my java service code:

// pipeline
IDataCursor pipelineCursor = pipeline.getCursor();
String A = IDataUtil.getString( pipelineCursor, “inStr1” );
String B= IDataUtil.getString( pipelineCursor, “inStr2” );


String outStr= A+B;

pipelineCursor.destroy();

// pipeline
IDataCursor pipelineCursor_1 = pipeline.getCursor();
IDataUtil.put( pipelineCursor_1, “outStr”, outStr);
pipelineCursor_1.destroy();

Input:inStr1,inStr2
Output:outStr

Kavita,
I copied/pasted your java code and it works perfectly fine. try creating the service in a new package.

Kavitha,

You don’t need any special setup to compile and run this service (which I hope you have created just to try your hand at java services in IS). All you need to do is to ensure that the extended variable “watt.server.compile” is set, and is pointing to a valid javac on the machine where IS is installed.

The service will be auto-compiled when you save it. To recompile it, you just need to save it again and to enable the save button, just add a space somewhere in the code or make a change and then undo it. Click the save button to save and recompile your service - if you get an error - share the error message, else your service is ready to execute.

Roh

I did that but I was getting recompilation error again n again.

But Finally I solved the problem.It was with server.bat file in integration server.
The JAVA_DIR was pointing to JVM in the WM folder.

SET JAVA_DIR=c:\program files\webmethods6\jvm\win142\jre

Instead I changed it to point to the java folder in my machine.

ie SET JAVA_DIR=c:\program files\Java\jdk1.5.0_07

The JAVA_DIR in the server.bat file (in IS) was pointing to JVM in the WM folder.

I changed it to point to the java folder in my machine.

ie SET JAVA_DIR=c:\program files\Java\jdk1.5.0_07

Still it is asking me to recompile the java source.

Error:

Service ‘sample’ is not operational. To run this service, first recompile the Java source.

Please help me.

Thanks,
Reethu