2 Replies Latest reply on Jun 17, 2011 1:00 PM by Nathan Kopp

    jboss-web.xml required? (AS7 gives NPE when it is missing)

    Nathan Kopp Newbie

      I'm trying to deploy a simple WAR (nearly empty, with a single JAX-WS web service) using a fairly recent snapshot of JBoss AS7.  If I do not include jboss-web.xml in the WEB-INF folder, I get the following NPE when deploying to standalone\deployment

       

      12:17:25,356 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.deployment.unit."jaxws-test.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."jaxws-test.war".INSTALL: Failed to process phase INSTALL of deployment "jaxws-test.war"

              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121)

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1675)

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_10]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_10]

              at java.lang.Thread.run(Thread.java:619) [:1.6.0_10]

      Caused by: java.lang.NullPointerException

              at org.jboss.as.webservices.util.WebMetaDataHelper.getServlets(WebMetaDataHelper.java:130)

              at org.jboss.as.webservices.tomcat.WebMetaDataCreator.createServlets(WebMetaDataCreator.java:173)

              at org.jboss.as.webservices.tomcat.WebMetaDataCreator.createWebAppDescriptor(WebMetaDataCreator.java:109)

              at org.jboss.as.webservices.tomcat.WebMetaDataCreator.create(WebMetaDataCreator.java:93)

              at org.jboss.as.webservices.tomcat.WebMetaDataCreatingDeploymentAspect.start(WebMetaDataCreatingDeploymentAspect.java:48)

              at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.internalDeploy(AspectDeploymentProcessor.java:78)

              at org.jboss.as.webservices.deployers.TCCLDeploymentProcessor.deploy(TCCLDeploymentProcessor.java:42)

              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115)

              ... 4 more

       

      When I add a very simple jboss-web.xml file (containing only the context-root tag), the deployment succeeds.

       

      I'm assuming that this is not desired behavior.  If anything, it should report a missing file instead of throwing an NPE.