11 Replies Latest reply on Mar 14, 2003 12:01 PM by Gary Kephart

    JBoss newbie: Connecting to JDBC

    Gary Kephart Newbie

      First off, I've tried this in WebLogic and got it to work. Now, I'm trying to get it to work in JBoss.

      Problem:
      I'm getting a "table not found" error.

      I'm connecting to an MS Access database using JDBC.

      My code says:
      this.dataSource = (DataSource)ic.lookup("java:comp/env/jdbc/bahiawebDB");

      The ejb-jar.xml says:
      <resource-ref>
      <res-ref-name>jdbc/bahiawebDB</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
      </resource-ref>

      jboss.xml says:
      <resource-ref>
      <res-ref-name>jdbc/bahiawebDB</res-ref-name>
      <resource-name>jdbc:odbc:bahiawebDB</resource-name>
      </resource-ref>

      and I modified msaccess-service.xml, replacing all occurrences of "InsightDB" with "bahiawebDB". I then put that file in my bahiaweb.jar as well as the default/deploy directory (just to be sure).

      So what gives?