1 Reply Latest reply: Apr 24, 2012 11:18 PM by Stephen Coy RSS

    Errors configuring web.xml and jboss-web.xml

    Carey Brown Newbie

      I'm trying to configure web.xml and jboss-web.xml for Jboss-7.1.1-Final and I'm getting this error. I'd appreciate any pointers you can give me.

       

      Here's the error:

       

      --------------------------------------

       

      12:01:08,817 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015876: Starting deployment of "webapp.war"

      12:01:09,114 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.deployment.subunit.

      "audit.ear"."webapp.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."audit.ear"."webapp.w

      ar".POST_MODULE: Failed to process phase POST_MODULE of subdeployment "webapp.war" of deployment "audit.ear"

              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1

      .1.Final.jar:7.1.1.Final]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.j

      ar:1.0.2.GA]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.

      GA]

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

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

              at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_14]

      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011033: Could not load javax.sql.sybaseDS reference

      d in env-entry

              at org.jboss.as.ee.component.deployers.ResourceReferenceProcessor.getResourceRefEntries(ResourceReferenceProcessor.java:159)

       

              at org.jboss.as.ee.component.deployers.ResourceReferenceProcessor.processDescriptorEntries(ResourceReferenceProcessor.java:7

      3)

              at org.jboss.as.ee.component.deployers.AbstractDeploymentDescriptorBindingsProcessor.deploy(AbstractDeploymentDescriptorBind

      ingsProcessor.java:100)

              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1

      .1.Final.jar:7.1.1.Final]

              ... 5 more

      Caused by: java.lang.ClassNotFoundException: javax.sql.sybaseDS from [Module "deployment.audit.ear.webapp.war:main" from Service Mod

      ule Loader]

              at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)

              at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

              at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

              at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

              at org.jboss.as.ee.component.deployers.ResourceReferenceProcessor.getResourceRefEntries(ResourceReferenceProcessor.java:157)

       

              ... 8 more

       

      12:01:09,411 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS015870: Deploy of deployment "audit.ear" was rolled bac

      k with failure message {"JBAS014671: Failed services" => {"jboss.deployment.subunit.\"audit.ear\".\"webapp.war\".POST_MODULE" => "or

      g.jboss.msc.service.StartException in service jboss.deployment.subunit.\"audit.ear\".\"webapp.war\".POST_MODULE: Failed to process p

      hase POST_MODULE of subdeployment \"webapp.war\" of deployment \"audit.ear\""}}

      12:01:09,520 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment common.jar in 116ms

      12:01:09,895 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015877: Stopped deployment webapp.war in 491ms

      12:01:09,942 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015877: Stopped deployment audit.ear in 532ms

      12:01:09,942 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 1) JBAS014774: Service status report

      JBAS014777:   Services which failed to start:      service jboss.deployment.subunit."audit.ear"."webapp.war".POST_MODULE: org.jboss.

      msc.service.StartException in service jboss.deployment.subunit."audit.ear"."webapp.war".POST_MODULE: Failed to process phase POST_MO

      DULE of subdeployment "webapp.war" of deployment "audit.ear"

       

      12:01:09,958 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) {"JBAS014653: Composite operation failed

      and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.deployment.subunit.\"a

      udit.ear\".\"webapp.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"audit.ear\".\"

      webapp.war\".POST_MODULE: Failed to process phase POST_MODULE of subdeployment \"webapp.war\" of deployment \"audit.ear\""}}}}

       

      --------------------------------------

       

      Here's what I have:

       

      web.xml

       

      <web-app version="2.4"

          xmlns="http://java.sun.com/xml/ns/j2ee"

          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

          xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd">

      ...

          <resource-ref>

              <res-ref-name>sybaseDS</res-ref-name>

              <res-type>javax.sql.sybaseDS</res-type>

              <res-auth>Container</res-auth>

              <res-sharing-scope>Shareable</res-sharing-scope>

          </resource-ref>

      </web-app>

       

       

      jboss-web.xml

       

      <jboss-web>

          <resource-ref>

              <res-ref-name>sybaseDS</res-ref-name>

              <jndi-name>java:/sybaseDS</jndi-name>

          </resource-ref>

      </jboss-web>

       

       

       

      ...\standalone\configuration\standalone.xml

       

      <subsystem xmlns="urn:jboss:domain:datasources:1.0">

      ...

      <datasources>

        <datasource jndi-name="java:jboss/datasources/SybaseDS" pool-name="SybaseDS" enabled="true">

          <connection-url>jdbc:sybase:Tds:10.250.5.27:5000</connection-url>

          <driver-class>com.sybase.jdbc4.jdbc.SybDriver</driver-class>

          <driver>sybaseDriver</driver>

          <security>

            <user-name>sa</user-name>

            <password>angels</password>

          </security>

        </datasource>

        <drivers>

            <driver name="sybaseDriver" module="com.sybaseDS.sybaseDriver"/>

          </drivers>

        </datasources>

      ...

      </subsystem>

       

       

       

      ...com\sybaseDS\sybase\main\module.xml

       

      <module xmlns="urn:jboss:module:1.1" name="com.sybaseDS.sybaseDriver">

          <resources>

              <resource-root path="jconn4.jar"/>

              <!-- Insert resources here -->

          </resources>

          <dependencies>

              <module name="javax.api"/>

          </dependencies>

      </module>

        • 1. Re: Errors configuring web.xml and jboss-web.xml
          Stephen Coy Master

          Carey Brown wrote:

           

          ...

           

          Here's what I have:

           

          web.xml

           

          <web-app version="2.4"

              xmlns="http://java.sun.com/xml/ns/j2ee"

              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

              xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd">

          ...

              <resource-ref>

                  <res-ref-name>sybaseDS</res-ref-name>

                  <res-type>javax.sql.sybaseDS</res-type>

                  <res-auth>Container</res-auth>

                  <res-sharing-scope>Shareable</res-sharing-scope>

              </resource-ref>

          </web-app>

          ...

           

          This should be:

           

          <res-type>javax.sql.DataSource</res-type>

           

           

          Also, consider updating your web.xml schema to 3.0:

           

          <web-app 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/web-app_3_0.xsd"
                version="3.0">