1

I'm learning Jackrabbit and following the documentation to run a standalone server. When I run the command java -jar jackrabbit-standalone-2.16.2.jar and access localhost:8080 on my browser, I get a 500 error saying:

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

What am I doing wrong?

Note: I have set my jdk/bin path in my environment variables.Also, my javac command is working properly. I've jdk version 1.8.0_74 and Jackrabbit version 2.16.2

Edit: According to this answer, I tried setting my jdk to my installed jres in eclipse but that didn't solve my problem.

mdbhal
  • 99
  • 1
  • 11

3 Answers3

2

Running the latest jackarabit standalone jar(2.17.3) in my machine(windows 10 and java home pointing in java8 jdk) produced the same errors.

I then executed the rar with java -Djava.home="%JAVA_HOME%" -jar jackrabbit-standalone-2.17.3.jar. Although I got the same error in browser I was able to see errors in the console where I invoked the running command.

One of these error was can't open C:\Progra~1\Java\jdk1.8.0_144\lib\tzmappings.

Searching my java installation I found that the missing files, are located under jre's installation folder.

So I eventually made the standalone jar to work with: java -Djava.home="%JAVA_HOME%\jre" -jar jackrabbit-standalone-2.17.3.jar

The initial error is a bit misleading as it refers to javac and not to the missing files.

The whole thing seems to be a bug for me. Please give a try to my workaround and if it works for you consider filing a bug in Jackrabbit's issue tracker platform.

leopal
  • 4,711
  • 1
  • 25
  • 35
1

jackrabbit-standalone uses JSP. JSP needs compilation. Compilation needs JDK.

Before running java -jar jackrabbit-standalone-2.16.2.jar do you check your JAVA_HOME, and make sure it refers to a fully-fledged JDK? In short, the bin directory should have javac.

Ahmad Shahwan
  • 1,662
  • 18
  • 29
  • 1
    ...I've checked, my `java_home` points to my jdk folder..I've set all my environment variables according to [this](https://stackoverflow.com/a/26640589/6921630) answer – mdbhal Jul 06 '18 at 12:23
1

I found that there was another variable in the Path environment System variable preceding my %JAVA_HOME%\bin variable.

You don't have to delete the other variable, but move it down (or move %JAVA_HOME\bin up) to correct the load order.

Stephen Rauch
  • 47,830
  • 31
  • 106
  • 135
A. Dee
  • 91
  • 1
  • 6