Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-1277

NPE when processing web.xml containing a <data-source/> element

XMLWordPrintable

    • Hide

      Build the attached Maven-based test case with "mvn package" as usual.

      Deploy it to JBoss AS 7. I dropped it in the deployments/ directory of a standalone server.

      Note the failure in the logs.

      Show
      Build the attached Maven-based test case with "mvn package" as usual. Deploy it to JBoss AS 7. I dropped it in the deployments/ directory of a standalone server. Note the failure in the logs.
    • Compatibility/Configuration

      A webapp that uses the standard <data-source/> element to define a datasource within web.xml fails during the post-deploy step with the following backtrace:

      14:38:18,717 INFO [org.jboss.as.server.deployment] (MSC service thread 1-6) Starting deployment of "dsmap2.war"
      14:38:18,741 INFO [org.jboss.jpa] (MSC service thread 1-6) read persistence.xml for org.example_dsmap2_war_1.0-SNAPSHOTPU
      14:38:18,751 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC00001: Failed to start service jboss.deployment.unit."dsmap2.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."dsmap2.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "dsmap2.war"
      at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121)
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)
      at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_26]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_26]
      at java.lang.Thread.run(Thread.java:662) [:1.6.0_26]
      Caused by: java.lang.NullPointerException
      at org.jboss.as.ee.datasource.DataSourceDefinitionDeploymentDescriptorParser.getBindingConfiguration(DataSourceDefinitionDeploymentDescriptorParser.java:101)
      at org.jboss.as.ee.datasource.DataSourceDefinitionDeploymentDescriptorParser.processDescriptorEntries(DataSourceDefinitionDeploymentDescriptorParser.java:58)
      at org.jboss.as.ee.component.AbstractDeploymentDescriptorBindingsProcessor.deploy(AbstractDeploymentDescriptorBindingsProcessor.java:60)
      at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115)
      ... 5 more

      A test case that uses a simple JavaDB database definition is attached. The test case deploys fine on Glassfish 3.1.1.

              jaikiran Jaikiran Pai (Inactive)
              ringerc_jira Craig Ringer (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: