3 Replies Latest reply on Jul 4, 2006 8:52 AM by tefron

    Data source lookup returns null for mysql

    emwamba

      I have installed jboss 4.0.4.GA and have configured a MySQL datasource, named "qmmsDB", as I did in jboss 4.0.2. However, when my code attempts to look up the data source, a null value is returned and no exeception is returned. The code is as follows:

      Context ctx = new InitialContext();
      DataSource ds = (DataSource)ctx.lookup("java:/qmmsDB");

      The value of ds is always null, yet the same code and mysql-ds.xml worked in 4.0.2. The following are extracts from mysql-ds.xml:

      <jndi-name>qmmsDB</jndi-name>
      <connection-url>jdbc:mysql://localhost:3306/qmmsDB?autoReconnect=true</connection-url>
      <driver-class>com.mysql.jdbc.Driver</driver-class>

      Help anyone out there!