3 Replies Latest reply on Apr 29, 2013 11:12 AM by kishore middleware

    Please help me in deploying JDBC application

    kishore middleware Newbie

      Hi All,

       

      I am a websphere  admin, now we are in migration to JBoss AS 7. I want to test  a sample JDBC aplication. While deplooying  sample application( also attached) i am receiving below exception.

       

      "10:18:00,873 ERROR [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS015870: Deploy of deployment "Dbtest.war" was rolled back with the following failure message: {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.module.Dbtest.Dbtest.env.jdbc.oracleds is missing [jboss.naming.context.java.oracleds]"]}"

       

      Please help me to work it out.

       

      Proceedure i followd:

       

      1)  Copied ojdc6.jar into deployments directory.

      2)  Updated standalone-ha.xml with following Datasource information, it worked fine.

          

      <datasource jndi-name="java:jboss/datasources/oracleds" pool-name="sss" enabled="true" use-java-context="true">

                          <connection-url>jdbc:oracle:thin:@centos.kishore.com:1521:XE</connection-url>

                          <driver>ojdbc6.jar</driver>

                          <security>

                              <user-name>jboss</user-name>

                              <password>jboss</password>

                          </security>

                      </datasource>

      3) My web.xml is below:

          

      <web-app>

      <display-name>HelloWorld Application</display-name>

          <description>

              This is a simple web application with a source code organization

              based on the recommendations of the Application Developer's Guide.

          </description>

            <servlet>

              <servlet-name>Dbtest</servlet-name>

              <servlet-class>Dbtest</servlet-class>

          </servlet>

            <servlet-mapping>

              <servlet-name>Dbtest</servlet-name>

              <url-pattern>/dbtest</url-pattern>

          </servlet-mapping>

                 <resource-ref>

               <res-ref-name>oracleds</res-ref-name>       

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

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

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

               <!-- Point to the jndi name of the datasource -->

               <lookup-name>java:jboss/datasources/oracleds</lookup-name>

            </resource-ref>

        </web-app>    

      4) My jboss-web.xml is below:

       

       

      <jboss-web>

           <resource-ref>

              <res-ref-name>jdbc/oracleds</res-ref-name>

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

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

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

          </resource-ref>

      </jboss-web>

       

      Finally when i copy the war file deployments directory i am receiving the error.

       

      Thanks in advance,

      Kishore,

      kishore.middleware7@gmail.com.