Java Services Compile Issue due to API Gateway Package - Unable to locate or start compiler

What product/components do you use and which version/fix level are you on?

I tried 10.11 and 10.15 both.

Is your question related to the free trial, or to a production (customer) instance?

Internal License Products - For Customer POCs

What are you trying to achieve? Please describe it in detail.

When I install Integration Server and Designer only, I am able to create, compile and run java services easily.
But as soon as i install API Gateway on the same Installation, then I am unable to compile java services in designer. It says, Unable to locate or start compiler.

For a long time, i thought this is related to watt.server.compile property issue or something wrong with javac.exe etc but i later found out that is only happening after installing API Gateway.

I read on many forums that people are asking to reduce CLASSPATH or reduce file paths etc, but those solutions don’t seem to work. I couldn’t find any difference in classpaths before and after installation of API Gateway whereas the folder installation paths are also same or i tried to reduce on different installations but nothing worked so far.

Do you get any error messages? Please provide a full error message screenshot and log file.

INFO | jvm 1 | 2022/10/20 01:42:03 | java.io.IOException: Cannot run program “C:\SoftwareAG\jvm\jvm\bin\javac”: CreateProcess error=206, The filename or extension is too long
INFO | jvm 1 | 2022/10/20 01:42:03 | at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
INFO | jvm 1 | 2022/10/20 01:42:03 | at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
INFO | jvm 1 | 2022/10/20 01:42:03 | at java.base/java.lang.Runtime.exec(Runtime.java:592)
INFO | jvm 1 | 2022/10/20 01:42:03 | at java.base/java.lang.Runtime.exec(Runtime.java:416)
INFO | jvm 1 | 2022/10/20 01:42:03 | at java.base/java.lang.Runtime.exec(Runtime.java:354)
INFO | jvm 1 | 2022/10/20 01:42:03 | at com.wm.app.b2b.server.NodeUtil.runCommand(NodeUtil.java:1189)
INFO | jvm 1 | 2022/10/20 01:42:03 | at com.wm.app.b2b.server.NodeUtil.doCompile(NodeUtil.java:1149)
INFO | jvm 1 | 2022/10/20 01:42:03 | at com.wm.app.b2b.server.NodeUtil.compile(NodeUtil.java:540)
INFO | jvm 1 | 2022/10/20 01:42:03 | at wm.server.nsimpl._compile(nsimpl.java:8041)
INFO | jvm 1 | 2022/10/20 01:42:03 | at wm.server.nsimpl.buildClass(nsimpl.java:1942)
INFO | jvm 1 | 2022/10/20 01:42:03 | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO | jvm 1 | 2022/10/20 01:42:03 | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
INFO | jvm 1 | 2022/10/20 01:42:03 | at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
INFO | jvm 1 | 2022/10/20 01:42:03 | at java.base/java.lang.reflect.Method.invoke(Method.java:566)
INFO | jvm 1 | 2022/10/20 01:42:03 | at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:405)
INFO | jvm 1 | 2022/10/20 01:42:03 | at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:761)
INFO | jvm 1 | 2022/10/20 01:42:03 | at com.wm.app.b2b.server.util.tspace.ReservationProcessor.process(ReservationProcessor.java:39)
INFO | jvm 1 | 2022/10/20 01:42:03 | at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:67)
INFO | jvm 1 | 2022/10/20 01:42:03 | at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:243)
INFO | jvm 1 | 2022/10/20 01:42:03 | at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:49)
INFO | jvm 1 | 2022/10/20 01:42:03 | at com.wm.app.b2b.server.invoke.PipelineProcessor.process(PipelineProcessor.java:171)
INFO | jvm 1 | 2022/10/20 01:42:03 | at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:336)
INFO | jvm 1 | 2022/10/20 01:42:03 | at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:33)
INFO | jvm 1 | 2022/10/20 01:42:03 | at com.wm.app.b2b.server.invoke.ConcurrentRequestLimitProcessor.process(ConcurrentRequestLimitProcessor.java:57)
INFO | jvm 1 | 2022/10/20 01:42:03 | at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:399)
INFO | jvm 1 | 2022/10/20 01:42:03 | at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:631)
INFO | jvm 1 | 2022/10/20 01:42:03 | at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:436)
INFO | jvm 1 | 2022/10/20 01:42:03 | at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:394)
INFO | jvm 1 | 2022/10/20 01:42:03 | at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:260)
INFO | jvm 1 | 2022/10/20 01:42:03 | at com.wm.app.b2b.server.comm.DefaultServerRequestHandler.handleMessage(DefaultServerRequestHandler.java:119)
INFO | jvm 1 | 2022/10/20 01:42:03 | at com.wm.app.b2b.server.HTTPMessageHandler.process(HTTPMessageHandler.java:156)
INFO | jvm 1 | 2022/10/20 01:42:03 | at com.wm.app.b2b.server.HTTPDispatch.handleRequest(HTTPDispatch.java:203)
INFO | jvm 1 | 2022/10/20 01:42:03 | at com.wm.app.b2b.server.Dispatch.run(Dispatch.java:391)
INFO | jvm 1 | 2022/10/20 01:42:03 | at com.wm.util.pool.PooledThread.run(PooledThread.java:127)
INFO | jvm 1 | 2022/10/20 01:42:03 | at java.base/java.lang.Thread.run(Thread.java:829)
INFO | jvm 1 | 2022/10/20 01:42:03 | Caused by: java.io.IOException: CreateProcess error=206, The filename or extension is too long
INFO | jvm 1 | 2022/10/20 01:42:03 | at java.base/java.lang.ProcessImpl.create(Native Method)
INFO | jvm 1 | 2022/10/20 01:42:03 | at java.base/java.lang.ProcessImpl.(ProcessImpl.java:492)
INFO | jvm 1 | 2022/10/20 01:42:03 | at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:153)
INFO | jvm 1 | 2022/10/20 01:42:03 | at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
INFO | jvm 1 | 2022/10/20 01:42:03 | … 34 more

Have you installed all the latest fixes for the products and systems you are using?

Yes, all latest fixes and updates have been installed. Even without the updates, it behaves the same way.

Just IS installation, everything works fine, on top of Gateway Installation, java services don’t compile.

Hi @Muhammad.Hassan_emp
For a Java service compilation, IS adds all the jars under the package in the classpath i.e. the code/classes directory, any jars/zips in the code/jars directory). So please check that the package where Java service is saved and see if there are lots of jars.

So, either reduce the jars or check some Windows settings to ignore the file extension or install IS in Linux.

1 Like

Thanks, that clears up a confusion that why suddenly the CLASSPATH is so long that it doesn’t compile.
I will try to reduce jars but i think it may not be possible at all since i haven’t installed any external jars on the installation and this error has started. And all the jars in the folders are only those which are required by IS+Gateway.

And i checked there are 318 jars in the IS+APIGw installation whereas there are only 54 jars in IS installation only.

I have windows subsystem linux on my machine. I will try to install this on WSL as a linux OS and will check.
Will update you in couple of days!

Hello @Jaideep ,

I was able to fix the issue by using windows subsystem linux and installed my APIGW+IS on that and used the designer on windows. It worked perfectly!

Thank you for your recommendations and the actual reasoning why this was happening!

In case it helps anyone else, I also ran into this issue recently while adding a Java service to an existing package on IS 10.11 running under Windows 11. The package already had several other Java services and adding those services before wasn’t a problem. I’m not exactly sure what changed but perhaps I added those services back when I was still on Windows 10 as I’ve seen other posts related to issues with long paths in Windows 11. In any case, this particular package has dependencies on several other packages, and upon temporarily removing those dependencies, the error went away, confirming that it’s an issue related to the length of the classpath on Windows.

One curious observation though is that although compiling the Java service by saving the service in Designer was failing when all the package dependencies were declared, running jcode.bat make package worked fine, resulting in a fully compiled package. I haven’t had a chance to look into the differences in the commands issued by the two different methods though.

Hope this helps,
Percio

1 Like

Similar to what I observed as well. If the pre-compiled services are deployed on the server, they won’t have an issue on invocations but user will be unable to edit/update/create new services because the compiler wouldn’t load.

Hii @Muhammad.Hassan_emp
How to running IS with wsl?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.