0 Replies Latest reply on Mar 16, 2006 7:50 AM by balaji_t_ryan

    javax.naming.NamingException error

    balaji_t_ryan

      I am getting the following error:

      org.jboss.deployment.DeploymentException: Error during deploy; - nested throwable: (javax.naming.NamingException: resource-ref: jdbc/TestDS has no valid JNDI binding. Check the jboss-web/resource-ref.)

      at org.jboss.web.AbstractWebDeployer.linkResourceRefs(AbstractWebDeployer.java:596)
      at org.jboss.web.AbstractWebDeployer.parseWebAppDescriptors(AbstractWebDeployer.java:494)
      at org.jboss.web.AbstractWebDeployer$DescriptorParser.parseWebAppDescriptors(AbstractWebDeployer.java:851)
      at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:141)
      at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:88)
      at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:357)
      ... 63 more



      jboss-web.xml config is

      <?xml version="1.0" encoding="ISO-8859-1"?>
      <jboss-web>
      <context-root>/FirstThree</context-root>
      <resource-ref>
      <res-ref-name>TestDS</res-ref-name>
      <jndi-name>java:TestDS</jndi-name>
      </resource-ref>
      </jboss-web>

      web.xml config is

      <?xml version="1.0" encoding="ISO-8859-1"?>
      <web-app>
      <resource-ref>
      <res-ref-name>TestDS</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
      </resource-ref>
      </web-app>

      i have placed the mysql-ds.xml file under server/deploy directory

      <?xml version="1.0" encoding="UTF-8"?>

      <local-tx-datasource>
      <jndi-name>TestDS</jndi-name>
      <connection-url>jdbc:mysql://localhost:3306/dbtest</connection-url>
      <driver-class>com.mysql.jdbc.Driver</driver-class>
      <user-name>root</user-name>
      </local-tx-datasource>


      Thanks in advance