Legacy Knowledge Base
Published Sep. 10, 2025

Liferay REST Module Failing After Adding JJWT Dependencies

Written By

Apsara Raheja

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: The following resolution requires customization and should only be implemented at the discretion of your team. Liferay Support will not be able to assist with designing or implementing customizations.

Issue

  • After adding the following dependencies to the build.gradle file of a Liferay REST module, the module fails to deploy:
implementation group: 'io.jsonwebtoken', name: 'jjwt-api', version: '0.11.2'
runtimeOnly group: 'io.jsonwebtoken', name: 'jjwt-impl', version: '0.11.2'
runtimeOnly group: 'io.jsonwebtoken', name: 'jjwt-jackson', version: '0.11.2'
ERROR [fileinstall-directory-watcher][DirectoryWatcher:1164] Unable to start bundle: .../osgi/modules/FormsDetails.jar
com.liferay.portal.kernel.log.LogSanitizerException: org.osgi.framework.BundleException: Could not resolve module: FormsDetails [...] Unresolved requirement: Import-Package: io.jsonwebtoken; version="0.11.0" [Sanitized]
at org.eclipse.osgi.container.Module.start(Module.java:444) ~[org.eclipse.osgi.jar:?]

Environment

  • Liferay DXP 7.4

Resolution

  • Instead of manually adding JJWT dependencies, use the ones provided by Liferay. Add the following dependency to your build.gradle file:
compileInclude group: "io.jsonwebtoken", name: "jjwt-api", version: "0.11.2"
compileInclude group: "io.jsonwebtoken", name: "jjwt-impl", version: "0.11.2"
compileInclude group: "io.jsonwebtoken", name: "jjwt-jackson", version: "0.11.2"

Additional Information

 

Did this article resolve your issue ?

Legacy Knowledge Base