2 Replies Latest reply on Apr 29, 2002 6:49 AM by Wayne Pennington

    Firebird jca-jdbc xa driver beta and JBoss3rc

    Wayne Pennington Newbie

      After an apparent successful deploy of the driver (and creating an fbtest.gdb via a locahost firebird server and with the firebird-service.xml below) ... why should I get the following error:

      2002-04-29 00:03:38,352 INFO [org.firebirdsql.jca.FBManagedConnectionFactory] Could not get a db connection!
      org.firebirdsql.gds.GDSException:
      at org.firebirdsql.jgds.GDS_Impl.connect(GDS_Impl.java:1240)
      at org.firebirdsql.jgds.GDS_Impl.isc_attach_database(GDS_Impl.java:263)
      at org.firebirdsql.jgds.GDS_Impl.isc_attach_database(GDS_Impl.java:247)
      at org.firebirdsql.jca.FBManagedConnectionFactory.createDbHandle(FBManagedConnecti onFactory.java:515)

      ...

      2002-04-29 00:03:38,812 ERROR [org.jboss.ejb.EntityContainer] Exception in service lifecyle operation: create
      org.jboss.deployment.DeploymentException: Error while fixing table name; - nested throwable is: java.sql.SQLException: Problem getting connection: javax.resource.ResourceException: could not get a db connection!
      java.sql.SQLException: Problem getting connection: javax.resource.ResourceException: could not get a db connection!
      at org.firebirdsql.jdbc.FBDataSource.getConnection(FBDataSource.java:100)
      at org.jboss.ejb.plugins.cmp.jdbc.SQLUtil.fixTableName(SQLUtil.java:38)


      MY FIREBIRD-SERVICE.XML:

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

      <!-- ==================================================================== -->
      <!-- New ConnectionManager setup for firebird dbs using jca-jdbc xa driver-->
      <!-- Build jmx-api (build/build.sh all) and view for config documentation -->
      <!-- ==================================================================== -->



      <!--FBManager can be used to create and drop databases.
      Drop is especially useful during testing, since it
      assures a clean start next time. -->

      c:\fbtest.gdb
      sysdba
      masterkey
      true
      false



      jboss.jca:service=RARDeployer

      <depends optional-attribute-name="ManagedConnectionFactoryName">

      <!--more hack-->
      <depends optional-attribute-name="OldRarDeployment">
      jboss.jca:service=RARDeployment,name=Firebird Database Connector



      <!-- <config-property>
      <config-property-name>Server</config-property-name>
      <config-property-type>java.lang.String</config-property-type>
      <config-property-value>localhost</config-property-value>
      </config-property>
      <config-property>
      <config-property-name>Port</config-property-name>
      <config-property-type>java.lang.Integer</config-property-type>
      <config-property-value>3050</config-property-value>
      </config-property> -->
      <config-property>
      <config-property-name>Database</config-property-name>
      <config-property-type>java.lang.String</config-property-type>
      <config-property-value>c:\fbtest.gdb</config-property-value>
      </config-property>
      <config-property>
      <config-property-name>UserName</config-property-name>
      <config-property-type>java.lang.String</config-property-type>
      <config-property-value>sysdba</config-property-value>
      </config-property>
      <config-property>
      <config-property-name>Password</config-property-name>
      <config-property-type>java.lang.String</config-property-type>
      <config-property-value>masterkey</config-property-value>
      </config-property>


      FirebirdDS



      <depends optional-attribute-name="ManagedConnectionPool">


      0
      50
      5000
      15
      ByContainer


      <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedCo nnectionManager

      java:/jaas/FirebirdDBRealm

      java:/TransactionManager



        • 1. Re: Firebird jca-jdbc xa driver beta and JBoss3rc
          David Jencks Master

          I'm afraid you might have to look into the firebird code... I don't think I'll have time to look at this for a couple of days, and I don't have windows... Please report anything you find out.

          thanks
          david jencks

          • 2. Re: Firebird jca-jdbc xa driver beta and JBoss3rc
            Wayne Pennington Newbie

            The solution was agonizingly simple ... for my setup it was really just two changes:

            1. in the FBManager:
            c:test.gdb

            2. for the database config-property under the connection manager:
            <config-property-value>localhost/3050:c:test.gdb</config-property-value>

            NOTE. Just change "localhost" to your database server's IP address.. If using Windows need to be mindful of the directory delimiters .. //

            3. one last thing, for folks new to Firebird ... it's a great thing. Even tremedously greater now that Mr. Jencks and friends have built this driver!!

            4. firebird-service.xml file:

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



            c:test.gdb
            sysdba
            masterkey
            true
            false



            jboss.jca:service=RARDeployer
            <depends optional-attribute-name="ManagedConnectionFactoryName">

            <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=Firebird Database Connector



            <config-property>
            <config-property-name>Database</config-property-name>
            <config-property-type>java.lang.String</config-property-type>
            <config-property-value>localhost/3050:c:test.gdb</config-property-value>
            </config-property>
            <config-property>
            <config-property-name>UserName</config-property-name>
            <config-property-type>java.lang.String</config-property-type>
            <config-property-value></config-property-value>
            </config-property>
            <config-property>
            <config-property-name>Password</config-property-name>
            <config-property-type>java.lang.String</config-property-type>
            <config-property-value></config-property-value>
            </config-property>



            FirebirdDS


            <depends optional-attribute-name="ManagedConnectionPool">


            0
            50
            5000
            15
            ByContainer


            <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager

            java:/jaas/FirebirdDBRealm

            java:/TransactionManager