Legacy Knowledge Base
Published Sep. 10, 2025

Custom deployment error "Require-Capability: osgi.ee=JavaSE"

Written By

Daniel Carrillo Broeder

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.
Note: please note that Liferay has renamed its Liferay Experience Could offerings to Liferay SaaS (formerly LXC) and Liferay PaaS (formerly LXC-SM).

Issue

  • Cannot deploy a custom module due to the following error:
  • ERROR [fileinstall-directory-watcher][DirectoryWatcher:1141] Unable to start bundle: file:/opt/liferay/osgi/modules/com.liferay.custom.bundle.jar
    org.osgi.framework.BundleException: Could not resolve module: com.liferay.custom.bundle [1822]_ Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=12))"_

Environment

  • Liferay DXP 7.0, 7.1, 7.2, 7.3, 7.4

Resolution

  • The module is compiled with a higher supported JDK version and cannot be activated in OSGi.
  • You can either compile with the correct JDK version, or force to the source/target compile compatibility, in the project build.gradle:
  • subprojects {
    plugins.withType(JavaPlugin) {
    compileJava  {
    sourceCompatibility = '1.8'
    targetCompatibility = '1.8'
    }
    }
    }

Additional Information

Did this article resolve your issue ?

Legacy Knowledge Base