Uploaded image for project: 'GateIn Portal'
  1. GateIn Portal
  2. GTNPORTAL-3107

NullPointerException during Portlet Deployment when there is no <display-name> in web.xml

    Details

    • Type: Feature Request
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Sprint:
      Sprint 77

      Description

      I am not sure if this is a bug or feature. Anyway, GateIn does not like WARs which do not have <display-name> in their web.xml. I guess the portal should be able to work around the non-availabbility of an explicit <display-name> through working with the default one?

      Steps to reproduce:

      • Take any quickstart from https://github.com/gatein/gatein-portal-quickstart, e.g. simplest-hello-world-portlet
      • remove <display-name> from web.xml
      • Compile & deploy
      • Expected: The portal should swallow the portlet app without any error.
      • Current: The portal throws this NPE

        09:20:11,195 ERROR [org.exoplatform.web.application.javascript.JavascriptConfigDeployer] (ServerService Thread Pool -- 93) An error occurs while registering 'Javascript in gatein-resources.xml' from the context 'null': java.lang.IllegalArgumentException: The context name cannot be null
        	at org.exoplatform.container.definition.PortalContainerConfig.getPortalContainerNames(PortalContainerConfig.java:502) [exo.kernel.container-2.4.3-GA-redhat-1.jar:2.4.3-GA-redhat-1]
        	at org.exoplatform.container.PortalContainer.addInitTask(PortalContainer.java:474) [exo.kernel.container-2.4.3-GA-redhat-1.jar:2.4.3-GA-redhat-1]
        	at org.exoplatform.web.application.javascript.JavascriptConfigDeployer.add(JavascriptConfigDeployer.java:96) [exo.portal.component.web.resources-3.6.0.Beta02-redhat-1.jar:3.6.0.Beta02-redhat-1]
        	at org.exoplatform.web.application.javascript.JavascriptConfigDeployer.onEvent(JavascriptConfigDeployer.java:71) [exo.portal.component.web.resources-3.6.0.Beta02-redhat-1.jar:3.6.0.Beta02-redhat-1]
        	at org.gatein.wci.ServletContainer.safeFireEvent(ServletContainer.java:319) [wci-wci-2.3.1.CR05-redhat-1.jar:2.3.1.CR05-redhat-1]
        	at org.gatein.wci.ServletContainer.fireEvent(ServletContainer.java:338) [wci-wci-2.3.1.CR05-redhat-1.jar:2.3.1.CR05-redhat-1]
        	at org.gatein.wci.ServletContainer.access$400(ServletContainer.java:56) [wci-wci-2.3.1.CR05-redhat-1.jar:2.3.1.CR05-redhat-1]
        	at org.gatein.wci.ServletContainer$RegistrationImpl.registerWebApp(ServletContainer.java:462) [wci-wci-2.3.1.CR05-redhat-1.jar:2.3.1.CR05-redhat-1]
        	at org.gatein.wci.jboss.JB7ServletContainerContext.start(JB7ServletContainerContext.java:369) [wci-jboss7-2.3.1.CR05-redhat-1.jar:2.3.1.CR05-redhat-1]
        	at org.gatein.wci.jboss.JB7ServletContainerContext.lifecycleEvent(JB7ServletContainerContext.java:223) [wci-jboss7-2.3.1.CR05-redhat-1.jar:2.3.1.CR05-redhat-1]
        	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:115) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
        	at org.apache.catalina.core.StandardContext.start(StandardContext.java:3772) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
        	at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:156) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
        	at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:60) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
        	at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:93) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
        	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_19]
        	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_19]
        	at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_19]
        	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_19]
        	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_19]
        	at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_19]
        	at org.jboss.threads.JBossThread.run(JBossThread.java:122)
        

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                vstorm83 Vu Viet Phuong
                Reporter:
                ppalaga Peter Palaga
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - 1 day
                  1d
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 hours Time Not Required
                  4h