8 Replies Latest reply on Aug 30, 2002 3:26 PM by madlyr

    JBoss 3.0.1 - Firebird JDBC/JCA driver configuration - pleas

    madlyr

      Hi,
      I try to connect to Firebird. First, I'm newbie to J2EE/JBoss. Some info about my environment.
      - JBoss 3.0.1 on Windows 2000, 786 MB RAM,
      - Firebird 1.0,
      - latest Firebird JDBC/JCA driver from CVS.
      I added and configured firebird-service.xml to servers deploy directory.

      On the startup of Firebird service I see the following error message:

      16:53:52,890 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()'
      Cause: Incomplete Deployment listing:
      Packages waiting for a deployer:

      Incompletely deployed packages:

      MBeans waiting for classes:

      MBeans waiting for other MBeans:
      [ObjectName: jboss.jca:service=XaTxCM,name=FirebirdDS
      state: CONFIGURED
      I Depend On: jboss.jca:service=RARDeployer
      jboss.jca:service=XaTxDS,name=FirebirdDS
      jboss.jca:service=XaTxPool,name=FirebirdDS
      jboss.jca:service=CachedConnectionManager
      jboss.security:service=JaasSecurityManager

      Depends On Me: , ObjectName: jboss.jca:service=XaTxDS,name=FirebirdDS
      state: CONFIGURED
      I Depend On: jboss.jca:service=RARDeployment,name=Firebird Database Connector

      Depends On Me: jboss.jca:service=XaTxCM,name=FirebirdDS
      ]


      What could be a reason of this message?
      Please help me.

      Some lines from firebird-service.xml file:
      <!--FBManager can be used to create and drop databases.
      Drop is especially useful during testing, since it
      assures a clean start next time. -->

      localhost/3050:c://App//Firebird//databases//BIO.GDB
      sysdba
      masterkey
      true
      true


      Firebird manager is accessible, database BIO.GDB is deleted and created on stop/start, so path should be good.


      <!--make the rar deploy - A BIG HACK till xslt based deployment is written-->
      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>localhost/3050:c://App//Firebird//databases//BIO.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


      In JNDI view I see this mbean.


      <!--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>localhost/3050:c://App//Firebird//databases//BIO.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


      Another mbean which I see in JNDI view (total of 3 mbeans).

      I added block <application-policy name = "FirebirdDBRealm"> to login-conf.xml.

      Regards,

      Radoslaw Sliwinski

        • 1. Re: JBoss 3.0.1 - Firebird JDBC/JCA driver configuration - p
          madlyr

          Some strange (please verify if it is reasonable) solution which I found (maybe it helps somebody):

          1. put firebirdsql.jar in [jboss_home]/server/[default]/lib directory (it's standard configuration),
          2. create firebirdsql.rar with the same firebirdsql.jar and META-INF directory containing ra.xml file, below is content of my ra.xml file:
          <?xml version="1.0" encoding="UTF-8"?>


          <display-name>Firebird Database Connector</display-name>
          <vendor-name>Firebird Database</vendor-name>
          <spec-version>1.0</spec-version>
          <eis-type>Relational Database</eis-type>
          1.0

          <managedconnectionfactory-class>org.firebirdsql.jca.FBManagedConnectionFactory</managedconnectionfactory-class>
          <connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>
          <connectionfactory-impl-class>org.firebirdsql.jdbc.FBDataSource</connectionfactory-impl-class>
          <connection-interface>java.sql.Connection</connection-interface>
          <connection-impl-class>org.firebirdsql.jdbc.FBConnection</connection-impl-class>
          <transaction-support>XATransaction</transaction-support>
          <!-- TODO: add server and port properties. Right now, you must specify
          them in the Database property like this: /:<path to db file> -->
          <config-property>
          <config-property-name>Database</config-property-name>
          <config-property-type>java.lang.String</config-property-type>
          <config-property-value>localhost/3050:c:\\App\\Firebird\\databases\\BIO.GDB</config-property-value>
          </config-property>
          <config-property>
          <config-property-name>TransactionIsolation</config-property-name>
          <config-property-type>java.lang.Integer</config-property-type>
          <config-property-value></config-property-value>
          </config-property>
          <config-property>
          <config-property-name>TransactionIsolationName</config-property-name>
          <config-property-type>java.lang.String</config-property-type>
          <config-property-value>TRANSACTION_READ_COMMITTED</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>
          <config-property>
          <config-property-name>BlobBufferLength</config-property-name>
          <config-property-type>int</config-property-type>
          <config-property-value></config-property-value>
          </config-property>
          <config-property>
          <config-property-name>Encoding</config-property-name>
          <config-property-type>java.lang.String</config-property-type>
          <config-property-value></config-property-value>
          </config-property>
          <authentication-mechanism>
          <authentication-mechanism-type>BasicPassword</authentication-mechanism-type>
          <credential-interface>javax.resource.security.PasswordCredential</credential-interface>
          </authentication-mechanism>
          <reauthentication-support>false</reauthentication-support>


          3. put this rar file in deploy directory (sic!) and... it works.

          Please correct me if this solution is something... mad (two jars with driver in different places). When I delete firebirdsql.jar from lib directory JBoss doesn't see driver, when I put only ra.xml file in deploy directory I have other error messages.

          Hope it helps,

          Radoslaw Sliwinski

          • 2. Re: JBoss 3.0.1 - Firebird JDBC/JCA driver configuration - p
            davidjencks

            ???????
            Only use the firebirdsql.rar that is built by the firebird driver build system, from {firebirdsql]/output/lib. The correct ra.xml is supplied with the firebird driver.

            Put the firebirdsql.rar in server/[config name]/deploy, along with your firebird-service.xml

            I strongly do not recommend having 2 copies of the same classes deployed, you will probably get bizarred IllegalAccessErrors.

            If this setup does not deploy properly for you please supply more details of what does happen.

            • 3. Re: JBoss 3.0.1 - Firebird JDBC/JCA driver configuration - p
              madlyr

              Thanks,
              I made all changes so:
              - in lib directory is no firebirdsql.jar,
              - in deploy directory there are two files firebird-service.xml and firebirdsql.rar with latest CVS driver and configured ra.xml inside rar.

              When I start JBoss I obtain the following error messages, it looks like firebird-service.xml is deployed before start of FirebirdManager:

              11:39:15,401 INFO [MainDeployer] Starting deployment of package: file:/C:/Java/jboss-3.0.1/server/default/deploy/firebird-service.xml
              11:39:15,591 ERROR [URLDeploymentScanner] Failed to deploy: org.jboss.deployment.scanner.URLDeploymentScanner$DeployedURL@5b6a401a{ url=file
              :/C:/Java/jboss-3.0.1/server/default/deploy/firebird-service.xml, deployedLastModified=0 }
              org.jboss.deployment.DeploymentException: jboss.jca:service=FirebirdManager is not registered.; - nested throwable: (javax.management.Instan
              ceNotFoundException: jboss.jca:service=FirebirdManager is not registered.)

              When I redeploy file firebird-service.xml after JBoss start, then FB service starts properly and bounds to the data source.

              I saw another thread with the same problem but it was not solved. Please help me how to manage this problem.

              Thanks in advance,

              Radoslaw Sliwinski

              • 4. Re: JBoss 3.0.1 - Firebird JDBC/JCA driver configuration - p
                madlyr

                Thanks,
                I made all changes so:
                - in lib directory is no firebirdsql.jar,
                - in deploy directory there are two files firebird-service.xml and firebirdsql.rar with latest CVS driver and configured ra.xml inside rar.

                When I start JBoss I obtain the following error messages, it looks like firebird-service.xml is deployed before start of FirebirdManager:

                11:39:15,401 INFO [MainDeployer] Starting deployment of package: file:/C:/Java/jboss-3.0.1/server/default/deploy/firebird-service.xml
                11:39:15,591 ERROR [URLDeploymentScanner] Failed to deploy: org.jboss.deployment.scanner.URLDeploymentScanner$DeployedURL@5b6a401a{ url=file
                :/C:/Java/jboss-3.0.1/server/default/deploy/firebird-service.xml, deployedLastModified=0 }
                org.jboss.deployment.DeploymentException: jboss.jca:service=FirebirdManager is not registered.; - nested throwable: (javax.management.Instan
                ceNotFoundException: jboss.jca:service=FirebirdManager is not registered.)

                When I redeploy file firebird-service.xml after JBoss start, then FB service starts properly and bounds to the data source.

                I saw another thread with the same problem but it was not solved. Please help me how to manage this problem.

                Thanks in advance,

                Radoslaw Sliwinski

                • 5. Re: JBoss 3.0.1 - Firebird JDBC/JCA driver configuration - p
                  davidjencks

                  Here are some things to try, only the first will work for sure:

                  1. use jboss 4 from cvs. The functionality that makes mbeans wait for their classes is currently broken in 3.0.x and 3.2.

                  1.a. Figure out which changes from the fix in jboss 4 are needed in jboss 3.0.x and 3.2 and supply a patch.

                  2. Put everything in an .ear. You need to refer to the firebird-service.xml in a jboss-app.xml

                  ....
                  <jboss-app>

                  firebird-service.xml

                  </jboss-app>

                  if I rememeber correctly

                  3. Name the packages

                  10firebirdsql.rar
                  20firebird-service.xml

                  You may need to name your app

                  30my-app.ear

                  to get it to deploy after the datasource.

                  4. Add a



                  element to your firebird-service.xml file. I think this won't work, but I'm not sure.

                  • 6. Re: JBoss 3.0.1 - Firebird JDBC/JCA driver configuration - p
                    madlyr

                    Thanks,

                    points 3 & 4 does not work, point 1 is too complicated for me (I'm newbie to JBoss and J2EE), second solution - I'll try soon.

                    Will this broken functionality restored in the next JBoss maintenance version (3.0.2)?

                    Thanks,

                    Radoslaw Sliwinski

                    • 7. Re: JBoss 3.0.1 - Firebird JDBC/JCA driver configuration - p
                      davidjencks

                      3.0.2 is released, and I don't think the "mbean waits for its class" functionality got fixed. However, I think the deployment scanner was swapped so I think (3), numbering the deployments, should work.

                      • 8. Re: JBoss 3.0.1 - Firebird JDBC/JCA driver configuration - p
                        madlyr

                        David,
                        thanks for help.

                        > 3.0.2 is released, and I don't think the "mbean waits for its class" functionality got fixed.

                        Yes, still buggy.

                        > However, I think the deployment scanner was swapped so I think (3), numbering the deployments, should work.

                        Yes, at least it works.

                        Info for others, that to enable 3-rd solution it should be:

                        1. changed /server/[default|all]/conf/jboss-service.xml in section the it should be changed default DeploymentSorter from version:

                        org.jboss.deployment.DeploymentSorter

                        to:

                        <attribute name="URLComparator">org.jboss.deployment.scanner.PrefixDeploymentSorter

                        2. rename firebirdsql.rar to 10-firebirdsql.rar and firebird-service.xml to 20-firebird-service.xml

                        3. restart JBoss.

                        Thanks,
                        Radoslaw Sliwinski