Uploaded image for project: 'PUBLIC - Liferay Faces'
  1. PUBLIC - Liferay Faces
  2. FACES-3025

NullPointerException when re-deploying applications in "Development" mode

    Details

      Description

      Steps to reproduce:

      1. Start Liferay 7.0.
      2. Build the JSF Applicant Portlet in development mode:
         cd $PROJECTS_HOME/liferay.com/liferay-faces-bridge-impl/demo/jsf-applicant-portlet && mvn clean package -P liferay,mojarra,tomcat,development
        
      3. Deploy the WAR:
         cp $PROJECTS_HOME/liferay.com/liferay-faces-bridge-impl/demo/jsf-applicant-portlet/target/*.war $PORTALS_HOME/liferay.com/liferay-portal-7.0.6-jsf-2.2/deploy/.
        
      4. Wait for the war to complete deploying (it should deploy without errors as long as it was never previously deployed).
      5. Re-deploy the WAR:
         cp $PROJECTS_HOME/liferay.com/liferay-faces-bridge-impl/demo/jsf-applicant-portlet/target/*.war $PORTALS_HOME/liferay.com/liferay-portal-7.0.6-jsf-2.2/deploy/.
        

      Expected results:
      No errors occur, the portlet deploys normally, and the logs show 1 portlets available for use.

      Actual results:
      The following error occurs in the server log:

      15:51:20,625 INFO  [fileinstall-/Users/apple/Portals/liferay.com/liferay-portal-7.0.3-SNAPSHOT-jsf-2.2/osgi/war][BaseAutoDeployListener:50] Portlets for /Users/apple/Portals/liferay.com/liferay-portal-7.0.3-SNAPSHOT-jsf-2.2/tomcat-8.0.32/temp/20170322155120364JUMPFNYO/com.liferay.faces.demo.jsf.ipc.pub.render.params.portlet.war copied successfully
      15:51:23,281 INFO  [Refresh Thread: Equinox Container: 50c53728-0b0f-0017-12b0-94c9e3024bd1][BundleStartStopLogger:35] STARTED com.liferay.faces.demo.jsf.ipc.pub.render.params.portlet_4.1.0 [463]
      java.lang.reflect.UndeclaredThrowableException
      	at com.sun.proxy.$Proxy652.getAttribute(Unknown Source)
      	at com.sun.faces.application.ApplicationAssociate.getInstance(ApplicationAssociate.java:355)
      	at com.sun.faces.config.ConfigureListener.reload(ConfigureListener.java:556)
      	at com.sun.faces.config.ConfigureListener.access$700(ConfigureListener.java:122)
      	at com.sun.faces.config.ConfigureListener$WebConfigResourceMonitor.run(ConfigureListener.java:1101)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.reflect.InvocationTargetException
      	at sun.reflect.GeneratedMethodAccessor406.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at com.liferay.portal.osgi.web.wab.extender.internal.adapter.ModifiableServletContextAdapter.invoke(ModifiableServletContextAdapter.java:449)
      	... 12 more
      Caused by: java.lang.NullPointerException
      	at org.eclipse.equinox.http.servlet.internal.servlet.ServletContextAdaptor.getAttribute(ServletContextAdaptor.java:136)
      	at sun.reflect.GeneratedMethodAccessor407.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.eclipse.equinox.http.servlet.internal.servlet.ServletContextAdaptor.invoke(ServletContextAdaptor.java:406)
      	at org.eclipse.equinox.http.servlet.internal.servlet.ServletContextAdaptor$AdaptorInvocationHandler.invoke(ServletContextAdaptor.java:434)
      	at com.sun.proxy.$Proxy462.getAttribute(Unknown Source)
      	at com.liferay.portal.servlet.delegate.ServletContextASMWrapper.getAttribute(Unknown Source)
      	... 16 more
      15:51:24,967 INFO  [Refresh Thread: Equinox Container: 50c53728-0b0f-0017-12b0-94c9e3024bd1][HotDeployImpl:226] Deploying com.liferay.faces.demo.jsf.ipc.pub.render.params.portlet from queue
      15:51:24,967 INFO  [Refresh Thread: Equinox Container: 50c53728-0b0f-0017-12b0-94c9e3024bd1][PluginPackageUtil:1007] Reading plugin package for com.liferay.faces.demo.jsf.ipc.pub.render.params.portlet
      22-Mar-2017 15:51:24.971 INFO [Refresh Thread: Equinox Container: 50c53728-0b0f-0017-12b0-94c9e3024bd1] org.apache.catalina.core.ApplicationContext.log Initializing Spring root WebApplicationContext
      ... snipped for brevity ...

      The portlet otherwise appears to deploy successfully and functions without any other errors of note.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Packages

                  Version Package