1 Reply Latest reply on May 18, 2003 8:47 PM by Jack Frosch

    Naming/DS Issue: JBoss 3.2.1, Firebird 1.5, FirebirdSQL

    Jack Frosch Newbie

      I know this kind of issue has been posted repeatedly in various forms, but alas, I'm having problems configuring a Firebird datasource.

      I've copied firebirdsql.rar into the server deploy directory. I created a firebird-ds.xml file in the deploy directory containing a line like:

      <jndi-name>ContactDS</jndi-name>

      (In the mbean element in firebird-ds.xml, I'm not exactly sure how the value should read on a Windows box. I have it as just the filepath to the database file, like: D:/database/CONTACT.GDB)

      I also copied the firebirdsql.jar file to the server's lib directory.

      I also included a jbosscmp-jdbc.xml file in which I overrode the default datasource element value to read:

      ContactDS

      (It seems like there are several places we declare a datasource element, but I'm not sure which is used to bind the name into JNDI.)

      When I deploy the EJB application JAR file, for each EJB, I get an exception like:

      NameNotFoundException: ContactDS not bound

      As a Full Docs subscriber, I've read through relevant sections of different docs in search of some solution, but to no avail. There's a lot of documentation on the internal design and workings of JBoss, but surprisingly, nowhere did I find a simple step-by-step procedure on configuring and testing a datasource.

      Again, I'm sorry to surface a recurring issue in this forum.

      Thanks for any help.

      Jack

        • 1. Re: Naming/DS Issue: JBoss 3.2.1, Firebird 1.5, FirebirdSQL
          Jack Frosch Newbie

          When at first you don't succeed ...

          I solved the problems I was having. Here's how:

          First, deploying the firbirdsql.rar file precludes deploying the JDBC database driver file, firbirdsql.jar, since the rar file includes that driver.

          Second, in the jbosscmp-jdbc.xml file, I was declaring the &lt;datasource&gt;ContactDS&lt;/datasource&gt; instead of &lt;datasource&gt;java:/ContactDS&lt;/datasource&gt;. After doing so, and changing the resource-ref entries to be like:

          &lt;resource-ref&gt;
          &lt;res-ref-name&gt;ContactDS&lt;/res-ref-name&gt;
          &lt;jndi-name&gt;java:/ContactDS&lt;/jndi-name&gt;
          &lt;/resource-ref&gt;

          everything worked!

          In my ejb-jar.xml, I was just referring to &lt;res-ref-name&gt;ContactDS&lt;/res-ref-name&gt;, but didn't realize I had to name the &lt;jndi-name&gt; with a "java:/" prefix.

          I'm sure that's probably documented somewhere in the JBoss docs I paid for, but I actually discovered it in the free O'Reilly JBoss Workbook beta PDF. (My thanks to Bill Burke for the tip.)