RE: Startup issue - A full JDK (not just JRE) is required

Jamie Sammons, modified 3 Years ago. New Member Posts: 5 Join Date: 7/1/22 Recent Posts

Hello every one,

When I launch Liferay with : liferay-dxp-7.4.13.u35\tomcat-9.0.56\bin\startup.bat, I am facing this ERROR :
-> org.apache.jasper.JasperException: PWC6345: There is an error in invoking javac.  A full JDK (not just JRE) is required

    __    ____________________  _____  __
   / /   /  _/ ____/ ____/ __ \/   \ \/ /
  / /    / // /_  / __/ / /_/ / /| |\  /
 / /____/ // __/ / /___/ _, _/ ___ |/ /
/_____/___/_/   /_____/_/ |_/_/  |_/_/

Starting Liferay Digital Experience Platform 7.4.13 Update 35 (Cavanaugh / Build 7413 / July 29, 2022)

2022-09-16 10:12:40.190 INFO  [main][StartupHelperUtil:86] There are no patches installed
2022-09-16 10:12:40.424 INFO  [main][LoggingTimer:83] Starting com.liferay.portal.events.StartupHelperUtil#initResourceActions
2022-09-16 10:12:40.463 INFO  [main][LoggingTimer:44] Completed com.liferay.portal.events.StartupHelperUtil#initResourceActions in 38 ms
2022-09-16 10:12:40.667 INFO  [main][LicenseManager:-1] Digital Enterprise Development license validation passed
2022-09-16 10:12:41.675 INFO  [main][AutoDeployDir:176] Auto deploy scanner started for C:\bundle-dev\liferay-dxp-7.4.13.u35\deploy
2022-09-16 10:12:48.833 INFO  [main][SystemCheckOSGiCommands:61] System check is enabled. You can run a system check with the command "system:check" in Gogo shell.
2022-09-16 10:13:13.771 INFO  [com.liferay.portal.osgi.web.wab.extender.internal.WabFactory-BundleTrackerOpener][ThemeHotDeployListener:108] 1 theme for dialect-theme is available for use
2022-09-16 10:13:14.284 INFO  [com.liferay.portal.osgi.web.wab.extender.internal.WabFactory-BundleTrackerOpener][ThemeHotDeployListener:108] 1 theme for speedwell-theme is available for use
2022-09-16 10:13:14.701 INFO  [com.liferay.portal.osgi.web.wab.extender.internal.WabFactory-BundleTrackerOpener][ThemeHotDeployListener:108] 1 theme for admin-theme is available for use
2022-09-16 10:13:15.072 INFO  [com.liferay.portal.osgi.web.wab.extender.internal.WabFactory-BundleTrackerOpener][ThemeHotDeployListener:108] 1 theme for classic-theme is available for use
2022-09-16 10:13:15.403 INFO  [com.liferay.portal.osgi.web.wab.extender.internal.WabFactory-BundleTrackerOpener][ThemeHotDeployListener:108] 1 theme for minium-theme is available for use
16-Sep-2022 10:13:43.078 INFOS [main] org.apache.catalina.startup.Catalina.start Le d├®marrage du serveur a pris [168223] millisecondes
2022-09-16 10:13:52.448 ERROR [http-nio-8080-exec-1][RatingsAnalyticsTopHeadJSPDynamicInclude:47] Unable to include JSP /dynamic_include/top_head.jsp
org.apache.jasper.JasperException: PWC6345: There is an error in invoking javac.  A full JDK (not just JRE) is required
        at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:92) ~[jasper.jar:9.0.56]

Here is my configuration :

The Liferay version is liferay-dxp-7.4.13.u35

C:\Users\bob>java -version
java version "1.8.0_211"
Java(TM) SE Runtime Environment (build 1.8.0_211-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.211-b12, mixed mode)

C:\Users\bob>where javac
C:\Program Files\Java\jdk1.8.0_211\bin\javac.exe

In my windows environnement variables setting there is no JRE_HOME.

JAVA_HOME = C:\Program Files\Java\jdk1.8.0_211

Here is what I have done :
- unzip : liferay-dxp-tomcat-7.4.13.u35-20220726155801596.7z
- put licence licence file into deploy.
- go to liferay-dxp-7.4.13.u35\tomcat-9.0.56\bin\ and launch liferay with startup.bat.

NOTICE :
The station where this test occured where not the one wher I have dowload the liferay-dxp-tomcat-7.4.13.u35-20220726155801596.7z.and the licence file. Instead I downloaded those tow files in antother station and used an usb key to import those tow files in the current station.

Best regards

thumbnail
Jamie Sammons, modified 3 Years ago. Expert Posts: 308 Join Date: 2/13/13 Recent Posts

Hi Stephane, I don't think the issue is that you donwloaded the archive and the license file on a different machine.

I don't know Windows well but is it possible that your JAVA_HOME environment variable isn't in the PATH specifically of the shell where you're running the startup script? I know people can use Command Prompt, PowerShell, or bash via WSL, I'm not sure how they all play together. Just throwing that idea out there. For example, the shell needs to know about an exported JAVA_HOME variable in the PATH:

export JAVA_HOME=/usr/lib/jvm/java-8-jdk
export PATH=$JAVA_HOME/bin:$PATH

You could potentially do this in the setenv script to make sure it's set. See Installing on Tomcat.

Jamie Sammons, modified 3 Years ago. New Member Posts: 5 Join Date: 7/1/22 Recent Posts

Hello Russell,

Thanks for your message. I looked in the startup.bat log and I found this :

C:\bundle-dev\liferay-dxp-7.4.13.u35\tomcat-9.0.56\bin>startup.bat
Using CATALINA_BASE:   "C:\bundle-dev\liferay-dxp-7.4.13.u35\tomcat-9.0.56"
Using CATALINA_HOME:   "C:\bundle-dev\liferay-dxp-7.4.13.u35\tomcat-9.0.56"
Using CATALINA_TMPDIR: "C:\bundle-dev\liferay-dxp-7.4.13.u35\tomcat-9.0.56\temp"
Using JRE_HOME:        "C:\Program Files\Java\jdk1.8.0_211"
Using CLASSPATH:       "C:\bundle-dev\liferay-dxp-7.4.13.u35\tomcat-9.0.56\bin\bootstrap.jar;C:\bundle-dev\liferay-dxp-7.4.13.u35\tomcat-9.0.56\bin\tomcat-juli.jar"
Using CATALINA_OPTS:   " -Dfile.encoding=UTF-8 -Djava.locale.providers=JRE,COMPAT,CLDR -Djava.net.preferIPv4Stack=true -Duser.timezone=GMT -Xms2560m -Xmx2560m -XX:MaxNewSize=1536m -XX:MaxMetaspaceSize=768m -XX:MetaspaceSize=768m -XX:NewSize=1536m -XX:SurvivorRatio=7"

So it looks like the shell knows the JDK path (if this is what you meant in your message).

Nether the less the issue have been solves like this.
- I deleted the liferay dxp bundle
- I unziped a new one and put the licence file into deploy
- I changed my environnement windows path to C:\Program Files\Java\Amazon Corretto\jdk11.0.14_10.
- Launch startup.bat
The error still no more.

Remark : When I go back to JDK 8 on my windows environnement path, the error still no more.