0 Replies Latest reply on Feb 1, 2003 9:52 PM by Steven Makris

    FIles updated but still no datasource

    Steven Makris Newbie

      I am using jboss-3.0.4 with a mysql database on WIN2000.
      I have edited the jboss.xml and mysql-service.xml files with the appropriate
      properties (see fragments below). When I run a test client the application
      fails with the following exception: java.sql.SQLException Table not found.

      A connection is successfully retrieved but the failure occurs on the execution
      of the SQL statement inside the BMP.

      I can use the database from a non J2EE client without a problem
      and the table definitely exists.

      Any help is appreciated.

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

      <enterprise-beans>

      <ejb-name>PageBean</ejb-name>
      <jndi-name>ejb/PageBean</jndi-name>
      <resource-ref>
      <res-ref-name>smakedit/SmakEditDataSource</res-ref-name>
      <resource-name>smakedit/SmakEditDataSource</resource-name>
      </resource-ref>

      <resource-managers>
      <resource-manager>
      <res-name>smakedit/SmakEditDataSource</res-name>
      <res-jndi-name>java:/MySqlDS</res-jndi-name>
      </resource-manager>
      </resource-managers>
      </enterprise-beans>


      EJB-JAR.xml
      -----------
      <resource-ref>
      <res-ref-name>smakedit/SmakEditDataSource</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
      </resource-ref>

      BEAN SOURCE
      -----------
      ds = (DataSource) Util.getInitialContext().lookup("java:comp/env/smakedit/SmakEditDataSource");
      conn = ds.getConnection();