0 Replies Latest reply on Nov 24, 2004 9:25 AM by SS S

    Problem Configuring MySQL Datasource with JBoss 3.2.6

    SS S Newbie

      Hello guys,

      I am trying to configure a simple EAR with one EJB Jar and WAR file to access a MySQL database. I keep getting 'jdbc not bound' even though I have put mysql-ds.xml, modified standatdjbosscmp-jdbc.xml and standardjaws.xml files to reflect the new JNDI name for my datasource...What am I doing wrong ? The JNDI name that I have in mysql-ds.xml is 'jdbc/testdb'. I have the following entries :

      In standardjbosscmp-jdbc.xml

      java:/jdbc/testdb
      <datasource-mapping>mySQL</datasource-mapping>


      In standardjaws.xml

      java:/jdbc/testdb
      <type-mapping>mySQL</type-mapping>


      In mysql-ds.xml

      <local-tx-datasource>
      <jndi-name>jdbc/testdb</jndi-name>
      <connection-url>jdbc:mysql://localhost:3306/testdb</connection-url>
      <driver-class>com.mysql.jdbc.Driver</driver-class>
      <user-name>jboss</user-name>
      password

      <type-mapping>mySQL</type-mapping>

      </local-tx-datasource>


      The JNDI name that I have in the EJBs is "jdbc/testdb".

      Here is the exception I get :

      Caused by: javax.naming.NameNotFoundException: jdbc not bound
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:490)
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:498)
      at org.jnp.server.NamingServer.getObject(NamingServer.java:504)
      at org.jnp.server.NamingServer.lookup(NamingServer.java:248)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
      at sun.rmi.transport.Transport$1.run(Transport.java:148)
      at java.security.AccessController.doPrivileged(Native Method)

      I read your documentation over and over and searched the internet for thousands of posts but no one seems to have a definite answer. Are things so somplicated when workign with JBoss ?? I am using JBoss 3.2.6..

      Can anyone please help.

      Regards,
      Sonu