4 Replies Latest reply on Nov 13, 2014 10:57 AM by kenundrum

    Spring 3.2 w/ JBoss 6.3 EAP NullPointerException

    kenundrum Newbie

      I have a fairly basic EAR structure, containing one EJB project and one WAR project, that I am attempting to deploy in a JBoss 6.3 EAP environment. I have already successfully deployed it in a 5.1.0 Community and 5.2 EAP environment, however while migrating to 6.3 EAP I am running into a pretty major and undescriptive issue. Upon attempted deployment of the EAR, I get a NullPointerException that is thrown on the WAR. In an attempt to determine exactly what was going on I extracted the WAR by itself and tried deploying it with just the EJB module along side it (for dependencies). The following is the exception that is thrown:

       

      15:09:27,013 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC000001: Failed to start service jboss.deployment.unit."Example-WS.war".DEPENDENCIES: org.jboss.msc.service.StartException in service jboss.deployment.unit."Example-WS.war".DEPENDENCIES: JBAS018733: Failed to process phase DEPENDENCIES of deployment "Example-WS.war"
        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [jboss-as-server-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_67]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_67]
        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_67]
      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: org.jboss.as.server.deployment.DeploymentUnitProcessingException: java.lang.NullPointerException
        at org.jboss.as.jaxrs.deployment.JaxrsSpringProcessor.deploy(JaxrsSpringProcessor.java:207)
        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [jboss-as-server-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
        ... 5 more
      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: java.lang.NullPointerException
        at org.jboss.as.jaxrs.deployment.JaxrsSpringProcessor.getResteasySpringVirtualFile(JaxrsSpringProcessor.java:137)
        at org.jboss.as.jaxrs.deployment.JaxrsSpringProcessor.deploy(JaxrsSpringProcessor.java:203)
        ... 6 more
      Caused by: java.lang.NullPointerException
        at org.jboss.as.jaxrs.deployment.JaxrsSpringProcessor.getResteasySpringVirtualFile(JaxrsSpringProcessor.java:106)
        ... 7 more
      

       

      I have gone through the pain stacking process of adding things in one at a time until I get this exception thrown and I have narrowed it down to when my web.xml file is added to the project. I had found a link through one of the many Google searches I did trying to solve this stating that a similar issue was because of the servlet tags in the web.xml file. I have copied in my web.xml file below:

      <?xml version="1.0" encoding="UTF-8"?>
      <web-app id="Example_WS" version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
        <display-name>Example-WS</display-name>
        <servlet>
        <servlet-name>Example-WS</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
        </servlet>
        <servlet-mapping>
        <servlet-name>Example-WS</servlet-name>
        <url-pattern>/</url-pattern>
        </servlet-mapping>
        <jsp-config>
        <taglib>
        <taglib-uri>http://www.springframework.org/tags/form</taglib-uri>
        <taglib-location>/WEB-INF/tld/spring-form.tld</taglib-location>
        </taglib>
        <taglib>
        <taglib-uri>http://www.springframework.org/tags/spring</taglib-uri>
        <taglib-location>/WEB-INF/tld/spring.tld</taglib-location>
        </taglib>
        </jsp-config>
      </web-app>
      

       

      I have tried everything I could think of and anything that seemed like it had a chance of working however none of this gave me any positive results. I hope that whatever is causing this error is something that is just glaringly obvious that I am just overlooking and it is a simple fix. Anything you all can contribute to this would be much appreciated!