3 Replies Latest reply on May 23, 2013 9:26 AM by Randall Waddell

    Error when deploying war file.

    Randall Waddell Newbie

      I have a project that I'm deploying two war files for, the wildfly service starts fine, and one the war file deploys with no problem, however the other one fails consistantly with the error below.  I could be missing something obvious, but I can't seem to find the issue.  With the last jboss-as-7.1.1Final version it ran fine.  Any help or insight would be appreciated.  Thanks!

       

      15:22:51,159 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC000001: Failed to start service jboss.undertow.deployment.default-host./as
      pApp: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-host./aspApp: Failed to start service
              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1930) [jboss-msc-1.1.2.Final.jar:1.1.2.Final]
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_21]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_21]
              at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_21]
      Caused by: java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web
      .servlet.resource.DefaultServletHttpRequestHandler#0': Initialization of bean failed; nested exception is java.lang.NullPointerException
              at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:194)
              at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.start(UndertowDeploymentService.java:75)
              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1974) [jboss-msc-1.1.2.Final.jar:1.1.2.Final]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1907) [jboss-msc-1.1.2.Final.jar:1.1.2.Final]
              ... 3 more
      Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.resource.DefaultSer
      vletHttpRequestHandler#0': Initialization of bean failed; nested exception is java.lang.NullPointerException
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
              at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
              at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
              at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
              at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
              at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
              at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
              at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
              at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282)
              at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204)
              at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
              at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:127)
              at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:172)
              ... 6 more
      Caused by: java.lang.NullPointerException
              at io.undertow.servlet.spec.ServletContextImpl.getNamedDispatcher(ServletContextImpl.java:203)
              at org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler.setServletContext(DefaultServletHttpRequestHandler.java:88)
              at org.springframework.web.context.support.ServletContextAwareProcessor.postProcessBeforeInitialization(ServletContextAwareProcessor.java:75)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCa
      pableBeanFactory.java:394)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1413)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
              ... 19 more

      15:22:51,203 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 2) JBAS014613: Operation ("deploy") failed - address: (
      [("deployment" => "aspApp.war")]) - failure description: {"JBAS014671: Failed services" => {"jboss.undertow.deployment.default-host./aspApp" => "org.j
      boss.msc.service.StartException in service jboss.undertow.deployment.default-host./aspApp: Failed to start service
          Caused by: java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework
      .web.servlet.resource.DefaultServletHttpRequestHandler#0': Initialization of bean failed; nested exception is java.lang.NullPointerException
          Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.resource.Defaul
      tServletHttpRequestHandler#0': Initialization of bean failed; nested exception is java.lang.NullPointerException
          Caused by: java.lang.NullPointerException"}}
      15:22:51,216 ERROR [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "aspApp.war" was rolled back with the follow
      ing failure message:
      {"JBAS014671: Failed services" => {"jboss.undertow.deployment.default-host./aspApp" => "org.jboss.msc.service.StartException in service jboss.undertow
      .deployment.default-host./aspApp: Failed to start service
          Caused by: java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework
      .web.servlet.resource.DefaultServletHttpRequestHandler#0': Initialization of bean failed; nested exception is java.lang.NullPointerException
          Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.resource.Defaul
      tServletHttpRequestHandler#0': Initialization of bean failed; nested exception is java.lang.NullPointerException
          Caused by: java.lang.NullPointerException"}}