Legacy Knowledge Base
Published Sep. 10, 2025

WAR Deployment Issue with Java 17

Written By

Stanley Huang

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • I'm seeing the following error when deploying a war portlet that was compiled using Java 17:
    ERROR [fileinstall-directory-watcher][DirectoryWatcher:988] Unable to start bundle: webbundle:/opt/liferay/osgi/war/liferay-sample-java-17.war?Bundle-SymbolicName=liferay-sample-java&Web-ContextPath=/liferay-sample-java&fileExtension=war&protocol=file
    com.liferay.portal.kernel.log.LogSanitizerException: org.osgi.framework.BundleException: Could not resolve module: liferay-sample-java [1467]_  Unresolved requirement: Import-Package: com.liferay.portal.osgi.web.servlet.jsp.compiler; resolution:="optional"_  Unresolved requirement: Import-Package: com.liferay.portal.spring.context; resolution:="optional"_  Unresolved requirement: Require-Capability: osgi.ee; filter:="(osgi.ee=UNKNOWN)"_ [Sanitized]
    	at org.eclipse.osgi.container.Module.start(Module.java:444) ~[org.eclipse.osgi.jar:?]
    	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:426) ~[org.eclipse.osgi.jar:?]
    	at com.liferay.portal.file.install.internal.DirectoryWatcher._startBundle(DirectoryWatcher.java:971) [bundleFile:?]
    	at com.liferay.portal.file.install.internal.DirectoryWatcher._startBundles(DirectoryWatcher.java:1004) [bundleFile:?]
    	at com.liferay.portal.file.install.internal.DirectoryWatcher._process(DirectoryWatcher.java:843) [bundleFile:?]
    	at com.liferay.portal.file.install.internal.DirectoryWatcher.run(DirectoryWatcher.java:298) [bundleFile:?]

Environment

  • Quarterly Release

Resolution

  • This issue has been addressed by LPD-43355 and is fixed in 2024.Q4.0.
Did this article resolve your issue ?

Legacy Knowledge Base