Getting "Unresolved requirement osgi.extender=liferay.frontend.js.portlet" when deploying a JavaScript Widget on Liferay DXP 7.1

Issue

  • Developers create a JavaScript widget as per Creating and Bundling JavaScript Widgets with JavaScript Tooling 
  • The below error will be printed upon deployment:
    INFO [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][AutoDeployDir:259] Processing my-project-1.0.0.jar
    ERROR [Framework Event Dispatcher: Equinox Container: 322f7d10-7b23-403f-95e8-ac8e86ebba89][Framework:93] FrameworkEvent ERROR
    java.lang.RuntimeException: org.osgi.framework.InvalidSyntaxException: Filter ended abruptly: (&(osgi.extender
    at org.apache.aries.spifly.ConsumerBundleTrackerCustomizer.addingBundle(ConsumerBundleTrackerCustomizer.java:39)
    [...]
    Caused by: org.osgi.framework.InvalidSyntaxException: Filter ended abruptly: (&(osgi.extender
    at org.eclipse.osgi.internal.framework.FilterImpl$Parser.parse(FilterImpl.java:1486)
    [...]
    Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 16 out of bounds for length 16
    at org.eclipse.osgi.internal.framework.FilterImpl$Parser.parse_attr(FilterImpl.java:1660)
    [...]
    ERROR [fileinstall-/home/liferay-dxp-7.1.10-ga1/osgi/modules][LogService:93] Error while starting bundle: file:/home/alfonso/Desktop/local_bundles/AHTIVNK-32373/liferay-dxp-7.1.10-ga1/osgi/modules/my-project-1.0.0.jar
    org.osgi.framework.BundleException: Could not resolve module: my-project [994]_ Unresolved requirement: Require-Capability: osgi.extender; filter:="(&(osgi.extender=liferay.frontend.js.portlet)(version>=1.1.0))"_ [Sanitized]
    at org.eclipse.osgi.container.Module.start(Module.java:444)
    at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:428)
    [...]

Environment

  • Liferay DXP 7.1

Resolution

  1. Download and deploy the Liferay JS Portlet Extender app
  2. Restart the server
  3. The deployment of your JavaScript widget should now be successful
この記事は役に立ちましたか?
0人中0人がこの記事が役に立ったと言っています