4 Replies Latest reply on Jan 19, 2009 6:29 PM by herman06

    Deployment error in JPA with Firebird

    herman06

      Hi,

      I'm using Jboss5.0, jdk1.6, and Firebird as my database.

      I'm tring to deploy Java Persistence in my application.

      my persistence.xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0">
       <persistence-unit name="myjpa">
       <jta-data-source>java:/mydb</jta-data-source>
       </persistence-unit>
      </persistence>
      


      and the firebird-ds.xml:
      <?xml version="1.0" encoding="UTF-8"?>
      <connection-factories>
       <mbean code="org.firebirdsql.management.FBManager" name="jboss.jca:service=FirebirdManager">
       <attribute name="FileName">/Source/mydb.fdb</attribute>
       <attribute name="UserName">sysdba</attribute>
       <attribute name="Password">masterkey</attribute>
       <attribute name="CreateOnStart">false</attribute>
       <attribute name="DropOnStop">false</attribute>
       </mbean>
      
       <tx-connection-factory>
       <jndi-name>mydb</jndi-name>
       <xa-transaction/>
       <rar-name>jaybird-2.1.6.rar</rar-name>
       <connection-definition>javax.sql.DataSource</connection-definition>
       <config-property name="Database" type="java.lang.String">localhost/3050:/Source/mydb.fdb</config-property>
       <user-name>sysdba</user-name>
       <password>masterkey</password>
       <min-pool-size>5</min-pool-size>
       <metadata>
       <type-mapping>Firebird</type-mapping>
       </metadata>
       </tx-connection-factory>
      </connection-factories>
      



      And I always get the following error when I deploy my application:
      2009-01-19 12:31:52,718 ERROR [org.jboss.system.server.profileservice.ProfileServiceBootstrap] (main) Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
      
      *** CONTEXTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State}
      
      persistence.unit:unitName=application.ear/application1.jar#myjpa
       -> jboss.jca:name=mydb,service=DataSourceBinding{Create:** NOT FOUND Depends on 'jboss.jca:name=mydb,service=DataSourceBinding' **}
      
      
      *** CONTEXTS IN ERROR: Name -> Error
      
      jboss.jca:name=mydb,service=DataSourceBinding -> ** NOT FOUND Depends on 'jboss.jca:name=mydb,service=DataSourceBinding' **
      
      


      I'm pretty sure the java:/mydb is working as I'm using it in my Application.

      Also if I change the java:/mydb to java:/defaultDB, it is working.

      Anyone can help with that? Thanks a lot.


      Herman


        • 1. Re: Deployment error in JPA with Firebird
          jaikiran

           

          <?xml version="1.0" encoding="UTF-8"?>
          <connection-factories>
           <mbean code="org.firebirdsql.management.FBManager" name="jboss.jca:service=FirebirdManager">
           <attribute name="FileName">/Source/mydb.fdb</attribute>
           <attribute name="UserName">sysdba</attribute>
           <attribute name="Password">masterkey</attribute>
           <attribute name="CreateOnStart">false</attribute>
           <attribute name="DropOnStop">false</attribute>
           </mbean>
          
           <tx-connection-factory>
           <jndi-name>mydb</jndi-name>
           <xa-transaction/>
           <rar-name>jaybird-2.1.6.rar</rar-name>
           <connection-definition>javax.sql.DataSource</connection-definition>
           <config-property name="Database" type="java.lang.String">localhost/3050:/Source/mydb.fdb</config-property>
           <user-name>sysdba</user-name>
           <password>masterkey</password>
           <min-pool-size>5</min-pool-size>
           <metadata>
           <type-mapping>Firebird</type-mapping>
           </metadata>
           </tx-connection-factory>
          </connection-factories>
          


          That's the first time i am seeing a -ds.xml containing configurations for connection-factories. Where did you get that configuration from? The -ds.xml is meant to configure datasource elements.


          • 2. Re: Deployment error in JPA with Firebird
            herman06

            Thanks Jaikiran.

            It's from the Jboss5.0 dir/docs/examples/jca/firebird-ds.xml.

            • 3. Re: Deployment error in JPA with Firebird
              jaikiran

              Hmm, that's strange. I haven't tried that file. See the last section here http://www.jboss.org/community/docs/DOC-12237 for a possible alternative.

              • 4. Re: Deployment error in JPA with Firebird
                herman06

                Thanks. I'll have a try.