Search code examples
javaquarkusoptaplannerquarkus-rest-client

Error while running Quarkus Production Jar


The application starts successfully when running the command java -jar target/quarkus-app/quarkus-run.jar

While consuming the API from the external source, I got the 500 response, and below is the log got from the terminal.

ERROR [org.opt.cor.imp.sol.DefaultSolverManager] (pool-2-thread-1) Solving failed for problemId (c447ea05-f9f0-427f-a1de-093dc26100b0).: org.kie.memorycompiler.KieMemor
yCompilerException: Cannot find the System's Java compiler. Please use JDK instead of JRE or add drools-ecj dependency to use in memory Eclipse compiler
 at org.kie.memorycompiler.jdknative.NativeJavaCompiler.compile(NativeJavaCompiler.java:75)
        at org.kie.memorycompiler.AbstractJavaCompiler.compile(AbstractJavaCompiler.java:41)
        at org.kie.memorycompiler.KieMemoryCompiler.compileNoLoad(KieMemoryCompiler.java:130)
        at org.kie.memorycompiler.KieMemoryCompiler.compileNoLoad(KieMemoryCompiler.java:102)
        ...

We are getting the same issue in both PC and EC2 instances.

While running the project in the Qurakus:dev, it is completely working fine.

Please help in understanding the issue and fixing it. Thanks in advance.


Solution

  • Please use JDK instead of JRE

    Looks like you're running it with a JRE instead of JDK. Try running java --version and add its output to the question. See also Radovan's link - it was the same issue.