0

I'm desperate. I have read all topics about this problem here and it doesn't help. I had written a simple app and tried to run it using Jetty Runner. It works well on my local machine. But after that I tried to add servlet filter (because Jetty has issues with servlets on welcome-file-list). Now it prints to me:

org.apache.jasper.JasperException: PWC6345: There is an error in invoking javac.  A full JDK (not just JRE) is required

My JDK and JAVA_HOME is OK. I'm using jdk1.8.0_25.

I read about:

<Call class="java.lang.System"  name="setProperty">
        <Arg>org.apache.jasper.compiler.disablejsr199</Arg>
        <Arg>true</Arg>
</Call>

or

-Dorg.apache.jasper.compiler.disablejsr199=true

I got this problem with it:

org.apache.jasper.JasperException: PWC6349: Cannot find a java compiler for compilation.  If running with JDK 5 or before, Ant or JDT compiler can be used, if the corresponding jars and bridge classes (org.apache.jasper.compiler.AntJavaCompiler or org.apache.jasper.compiler.JDTJavaCompiler) are included

I'm using IDEA, Maven and .sh-file to run Jetty.

java -jar target/dependency/jetty-runner.jar target/*.war

The strange thing is - I've tried to deploy this app with servlet filter on Heroku and it WORKS WELL.

Could you help me please with this problem?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555

1 Answers1

0

Set -Dorg.apache.jasper.compiler.disablejsr199 to false and make sure you jave jdk on the path, meaning your path should look like "C:\Program Files\Java\jdk1.7.0_67\bin" NOT C:\Program Files\Java\jre\bin.

geekprogrammer
  • 1,108
  • 1
  • 13
  • 39
  • It should work. Make sure you are using this command to start your application: "java -jar -Dorg.apache.jasper.compiler.disablejsr199=false target/dependency/jetty-runner.jar target/*.war". And also as I mentioned in the answer, please check your java path. It should point to "jdkxxx\bin" NOT "jre\bin". – geekprogrammer Mar 29 '15 at 03:18