Dev - Nexus
  1. Dev - Nexus
  2. NEXUS-4221

1.9.0.2 fails to deploy on JBoss 6 AS

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.9.0.2
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Global Rank:
      7419

      Description

      I have excluded google-collection from annotation scanning and dropped console logging from the config but now I get a NullPointerException in nexus.log that prevents deployment:

      javax.servlet.ServletException: java.lang.NullPointerException
      	at org.apache.shiro.web.servlet.AbstractFilter.init(AbstractFilter.java:102)
      	at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:447)
      	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3246)
      	at org.apache.catalina.core.StandardContext.start(StandardContext.java:3843)
      	at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:294)
      	at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:146)
      	at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:477)
      	at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
      	at org.jboss.web.deployers.WebModule.start(WebModule.java:95)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	at java.lang.reflect.Method.invoke(Unknown Source)
      	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
      	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
      	at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:271)
      	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:670)
      	at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
      	at $Proxy41.start(Unknown Source)
      	at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:53)
      	at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:41)
      	at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
      	at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
      	at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
      	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379)
      	at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:301)
      	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044)
      	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083)
      	at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322)
      	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246)
      	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139)
      	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:894)
      	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:641)
      	at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:182)
      	at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:58)
      	at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
      	at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55)
      	at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179)
      	at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1832)
      	at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1550)
      	at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1571)
      	at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1491)
      	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379)
      	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044)
      	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083)
      	at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322)
      	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246)
      	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139)
      	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939)
      	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654)
      	at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983)
      	at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076)
      	at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679)
      	at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106)
      	at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:143)
      	at org.jboss.profileservice.dependency.ProfileDeployAction.deploy(ProfileDeployAction.java:151)
      	at org.jboss.profileservice.dependency.ProfileDeployAction.installActionInternal(ProfileDeployAction.java:94)
      	at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
      	at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
      	at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
      	at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
      	at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
      	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379)
      	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044)
      	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083)
      	at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322)
      	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246)
      	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139)
      	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939)
      	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654)
      	at org.jboss.profileservice.dependency.ProfileActivationWrapper$BasicProfileActivation.start(ProfileActivationWrapper.java:190)
      	at org.jboss.profileservice.dependency.ProfileActivationWrapper.start(ProfileActivationWrapper.java:87)
      	at org.jboss.profileservice.dependency.ProfileActivationService.activateProfile(ProfileActivationService.java:215)
      	at org.jboss.profileservice.dependency.ProfileActivationService.activate(ProfileActivationService.java:159)
      	at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.activate(AbstractProfileServiceBootstrap.java:112)
      	at org.jboss.profileservice.resolver.BasicResolverFactory$ProfileResolverFacade.deploy(BasicResolverFactory.java:87)
      	at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.start(AbstractProfileServiceBootstrap.java:91)
      	at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:132)
      	at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56)
      	at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827)
      	at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417)
      	at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.NullPointerException
      	at org.sonatype.security.web.ShiroSecurityFilter.configure(ShiroSecurityFilter.java:82)
      	at org.apache.shiro.web.servlet.IniShiroFilter.init(IniShiroFilter.java:292)
      	at org.apache.shiro.web.servlet.AbstractShiroFilter.onFilterConfigSet(AbstractShiroFilter.java:83)
      	at org.apache.shiro.web.servlet.AbstractFilter.init(AbstractFilter.java:94)
      

        Issue Links

          Activity

          Hide
          Brian Demers added a comment -

          Thanks for digging into this, let us know what you find.

          Show
          Brian Demers added a comment - Thanks for digging into this, let us know what you find.
          Hide
          Dan Mace added a comment -

          I opened a bug in JBoss land. I'll post here if it goes anywhere.

          Show
          Dan Mace added a comment - I opened a bug in JBoss land. I'll post here if it goes anywhere.
          Hide
          Dan Mace added a comment -

          Okay, so the plot thickens. Had some discussion about this with somebody else in Red Hat. Here are some highlights:

          Section 13.2 of the 2.5 spec:

          "Web containers must remove all leading and trailing whitespace, which is defined as “S(white space)” in XML 1.0 (http://www.w3.org/TR/2000/WD-xml-2e-20000814), for the element content of the text nodes of a deployment descriptor."

          Combined with the definition of "S(white space)" from http://www.w3.org/TR/xml11/#sec-common-syn:

          (white space) consists of one or more space (#x20) characters, carriage returns, line feeds, or tabs.

          The Servlet and XML specs seem pretty clear in this case. Descriptor element values must be stripped of line feeds. The fact that the Nexus descriptor relies on line feeds and works in other containers seems to indicate that those containers are non-compliant in this way, and Nexus is now reliant upon the non-compliant behavior.

          I'll do some research in those other containers in which Nexus works to see if and why they are not conforming.

          As far as Nexus, I now believe this is a bug. The application cannot rely on non-compliant container behavior in terms of the deployment descriptor. If the Nexus developers agree and accept this as a bug, we could move on to discussing how to implement a patch.

          Show
          Dan Mace added a comment - Okay, so the plot thickens. Had some discussion about this with somebody else in Red Hat. Here are some highlights: Section 13.2 of the 2.5 spec: "Web containers must remove all leading and trailing whitespace, which is defined as “S(white space)” in XML 1.0 ( http://www.w3.org/TR/2000/WD-xml-2e-20000814 ), for the element content of the text nodes of a deployment descriptor." Combined with the definition of "S(white space)" from http://www.w3.org/TR/xml11/#sec-common-syn: (white space) consists of one or more space (#x20) characters, carriage returns, line feeds, or tabs. The Servlet and XML specs seem pretty clear in this case. Descriptor element values must be stripped of line feeds. The fact that the Nexus descriptor relies on line feeds and works in other containers seems to indicate that those containers are non-compliant in this way, and Nexus is now reliant upon the non-compliant behavior. I'll do some research in those other containers in which Nexus works to see if and why they are not conforming. As far as Nexus, I now believe this is a bug. The application cannot rely on non-compliant container behavior in terms of the deployment descriptor. If the Nexus developers agree and accept this as a bug, we could move on to discussing how to implement a patch.
          Hide
          Brian Demers added a comment -

          The team has talked a little bit about the shiro config in the past, I think everyone agreed that the proper solution is to move the shiro config to a separate shrio.ini file.

          Show
          Brian Demers added a comment - The team has talked a little bit about the shiro config in the past, I think everyone agreed that the proper solution is to move the shiro config to a separate shrio.ini file.
          Hide
          Igor Fedorenko added a comment -

          Closing issues that have not been updated for over one year. Please reopen if you believe the issue requires further attention.

          Show
          Igor Fedorenko added a comment - Closing issues that have not been updated for over one year. Please reopen if you believe the issue requires further attention.

            People

            • Assignee:
              Unassigned
              Reporter:
              Nicklas Karlsson
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: