Details

      Description

      Steps to Reproduce:

      1. Clone or navigate to the the liferay-faces-bridge-impl repo:
         cd liferay-faces-bridge-impl/
        
      2. Checkout the 4.1.0 tag:
         git checkout 4.1.0
        
      3. Download the attached deploy-jsf-app-portlet-to-tomcat-webapp-context.diff patch and apply it:
         git apply ~/Downloads/deploy-jsf-app-portlet-to-tomcat-webapp-context.diff
        
      4. Build and deploy the portlet to Tomcat's webapps/ directory in the Tomcat + Liferay 7.0 bundle:
         mvn clean package -P liferay,mojarra,tomcat && cp demo/jsf-applicant-portlet/target/*.war $LIFERAY_HOME/tomcat-8.0.32/webapps/com.liferay.faces.demo.jsf.applicant.portlet.war
        

      If the bug still exists, the following stacktrace will appear in the logs, and the portlet will fail to deploy:

      12-Oct-2017 03:31:53.466 SEVERE [localhost-startStop-15] com.sun.faces.config.ConfigureListener.contextInitialized Critical error during deployment:
       com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: org/osgi/framework/FrameworkUtil
              at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:764)
              at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:353)
              at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:227)
              at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4810)
              at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5255)
              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
              at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
              at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
              at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
              at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:939)
              at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1812)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
              at java.lang.Thread.run(Thread.java:748)
      Caused by: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: org/osgi/framework/FrameworkUtil
              at java.util.concurrent.FutureTask.report(FutureTask.java:122)
              at java.util.concurrent.FutureTask.get(FutureTask.java:192)
              at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:751)
              ... 15 more
      Caused by: java.lang.NoClassDefFoundError: org/osgi/framework/FrameworkUtil
              at com.liferay.faces.bridge.ext.mojarra.spi.internal.ConfigurationResourceProviderBase.getResourcesPattern(ConfigurationResourceProviderBase.java:50)
              at com.liferay.faces.bridge.ext.mojarra.spi.internal.FacesConfigResourceProviderLiferayImpl.getResources(FacesConfigResourceProviderLiferayImpl.java:39)
              at com.sun.faces.config.ConfigManager$URITask.call(ConfigManager.java:1362)
              at com.sun.faces.config.ConfigManager$URITask.call(ConfigManager.java:1331)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:742)
              ... 15 more
      Caused by: java.lang.ClassNotFoundException: org.osgi.framework.FrameworkUtil
              at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1308)
              at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1142)
              ... 21 more
      

      If the bug is fixed, the portlet will deploy correctly and pass the integration tests.

      I understand that the preferred way of JSF portlets is a deployment as WAB, but I can't use that deployment method as I need JEE features of the application server in my portlet plugins. See here for a more detailed explanation: Use features of the JEE application server in Liferay 7.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: