2 Replies Latest reply on Jan 30, 2007 1:04 PM by jonefun

    JBoss 4.0.5GA Problem with Firebird will not deploy was ok o

    jonefun Newbie

      Hi, I recently upgraded to JBoss 4.0.5GA from 4.0.4GA and for some reason my code will no longer deploy. I have been racking my brains on this for some time now and I would be very grateful if someone could give me a point in the right direction. Here is a couple of extracts from my JBoss startup :-

      16:21:32,234 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=Mobile2DateDS' to JNDI name 'java:Mobile2DateDS'
      16:21:32,953 INFO [WrapperDataSourceService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'


      This seems to suggest that the data source Mobile2DateDS has been registered ok.

      16:21:33,828 INFO [EARDeployer] Init J2EE application: file:/C:/JBoss4/server/default/deploy/Mobile2Date.ear
      16:21:34,093 INFO [Ejb3Deployment] EJB3 deployment time took: 218
      16:21:34,828 INFO [TomcatDeployer] deploy, ctxPath=/Mobile2Date, warUrl=.../tmp/deploy/Mobile2Date.ear-Mobile2Date.jar-ws42840.war/
      16:21:34,984 INFO [JmxKernelAbstraction] installing MBean: persistence.units:ear=Mobile2Date.ear,jar=Mobile2Date.jar,unitName=Mobile2Date with dependencies:
      16:21:34,984 INFO [JmxKernelAbstraction] jboss.jca:name=Mobile2DateDS,service=DataSourceBinding
      16:21:35,046 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=Mobile2Date.ear,jar=Mobile2Date.jar,name=PersonManagerBean,service=EJB3 with dependencies:
      16:21:35,046 INFO [JmxKernelAbstraction] persistence.units:ear=Mobile2Date.ear,jar=Mobile2Date.jar,unitName=Mobile2Date
      16:21:35,046 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=Mobile2Date.ear,jar=Mobile2Date.jar,name=SetupBean,service=EJB3 with dependencies:
      16:21:35,046 INFO [JmxKernelAbstraction] persistence.units:ear=Mobile2Date.ear,jar=Mobile2Date.jar,unitName=Mobile2Date
      16:21:35,046 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=Mobile2Date.ear,jar=Mobile2Date.jar,name=SimpleWSBean,service=EJB3 with dependencies:
      16:21:35,187 INFO [EJBContainer] STARTED EJB: com.htc.htcws.SimpleWSBean ejbName: SimpleWSBean
      16:21:35,828 INFO [EJB3Deployer] Deployed: file:/C:/JBoss4/server/default/tmp/deploy/tmp42838Mobile2Date.ear-contents/Mobile2Date.jar
      16:21:35,828 INFO [WSDLFilePublisher] WSDL published to: file:/C:/JBoss4/server/default/data/wsdl/Mobile2Date.ear/Mobile2Date.jar/SimpleWSService42839.wsdl
      16:21:35,843 INFO [ServiceEndpointManager] WebService started: http://0090f548fc23:8080/Mobile2Date/SimpleWSBean
      16:21:35,859 INFO [EARDeployer] Started J2EE application: file:/C:/JBoss4/server/default/deploy/Mobile2Date.ear
      16:21:35,859 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
      
      --- MBeans waiting for other MBeans ---
      ObjectName: jboss.jmx:name=SnmpAgent,service=trapd,type=logger
       State: FAILED
       Reason: java.net.BindException: Address already in use: Cannot bind
      
      ObjectName: persistence.units:ear=Mobile2Date.ear,jar=Mobile2Date.jar,unitName=Mobile2Date
       State: NOTYETINSTALLED
       I Depend On:
       jboss.jca:name=Mobile2DateDS,service=DataSourceBinding
       Depends On Me:
       jboss.j2ee:ear=Mobile2Date.ear,jar=Mobile2Date.jar,name=PersonManagerBean,service=EJB3
       jboss.j2ee:ear=Mobile2Date.ear,jar=Mobile2Date.jar,name=SetupBean,service=EJB3
      
      ObjectName: jboss.j2ee:ear=Mobile2Date.ear,jar=Mobile2Date.jar,name=PersonManagerBean,service=EJB3
       State: NOTYETINSTALLED
       I Depend On:
       persistence.units:ear=Mobile2Date.ear,jar=Mobile2Date.jar,unitName=Mobile2Date
      
      ObjectName: jboss.j2ee:ear=Mobile2Date.ear,jar=Mobile2Date.jar,name=SetupBean,service=EJB3
       State: NOTYETINSTALLED
       I Depend On:
       persistence.units:ear=Mobile2Date.ear,jar=Mobile2Date.jar,unitName=Mobile2Date
      
      --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
      ObjectName: jboss.jca:name=Mobile2DateDS,service=DataSourceBinding
       State: NOTYETINSTALLED
       Depends On Me:
       persistence.units:ear=Mobile2Date.ear,jar=Mobile2Date.jar,unitName=Mobile2Date
      
      ObjectName: jboss.jmx:name=SnmpAgent,service=trapd,type=logger
       State: FAILED
       Reason: java.net.BindException: Address already in use: Cannot bind
      
      
      16:21:35,937 INFO [Http11BaseProtocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080
      16:21:36,156 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
      16:21:36,156 INFO [JkMain] Jk running ID=0 time=0/63 config=null
      16:21:36,171 INFO [Server] JBoss (MX MicroKernel) [4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)] Started in 28s:171ms


      However you can see from the end of the log that JBoss is not happy about the PersistenceUnit not being registered.

      My firebird-ds.xml file :
      <connection-factories>
      
       <!--FBManager can be used to create and drop databases.
       Drop is especially useful during testing, since it
       assures a clean start next time. -->
       <mbean code="org.firebirdsql.management.FBManager" name="jboss.jca:service=FirebirdManager">
       <attribute name="FileName">/Project/Mobile2Date/Database/MOBILE2DATE.GDB</attribute>
       <attribute name="UserName">sysdba</attribute>
       <attribute name="Password">masterkey</attribute>
       <attribute name="CreateOnStart">true</attribute>
       <attribute name="DropOnStop">false</attribute>
       </mbean>
      
       <tx-connection-factory>
       <jndi-name>Mobile2DateDS</jndi-name>
       <xa-transaction/>
       <rar-name>jaybird-2.1.0.rar</rar-name>
       <connection-definition>javax.sql.DataSource</connection-definition>
       <config-property name="Database" type="java.lang.String">localhost/3050:C:/Project/Mobile2Date/Database/MOBILE2DATE.GDB</config-property>
       <user-name>sysdba</user-name>
       <password>masterkey</password>
       <min-pool-size>0</min-pool-size>
       <metadata>
       <type-mapping>Firebird</type-mapping>
       </metadata>
       </tx-connection-factory>
      
      </connection-factories>
      


      and finally my persistence.xml

      <persistence>
       <persistence-unit name="Mobile2Date">
       <!--provider>org.hibernate.ejb.HibernatePersistence</provider-->
       <jta-data-source>java:/Mobile2DateDS</jta-data-source>
       <properties>
       <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
       </properties>
       </persistence-unit>
      </persistence>
      


      If anyone can help I will be very very grateful :)
      Cheers
      Jono

        • 1. Re: JBoss 4.0.5GA Problem with Firebird will not deploy was
          jonefun Newbie

          Just one other point .. if i change my persistence.xml file to use the "DefaultDS" and therefore uses Hypersonic and instead of Firebird it works.

          • 2. Re: JBoss 4.0.5GA Problem with Firebird will not deploy was
            jonefun Newbie

            It looks like there may be an issue with JBoss 4.0.5 when defining a persistence unit that maps on to a ConnectionFactoryBinding service instead of the DataSourceBinding service.

            I found a jira issue raised that points to the same problem : http://jira.jboss.com/jira/browse/JBPORTAL-613

            Here is the jboss error :

            
            --- MBeans waiting for other MBeans ---
            ObjectName: persistence.units:jar=Mobile2Date.jar,unitName=Mobile2Date
             State: NOTYETINSTALLED
             I Depend On:
             jboss.jca:name=Mobile2DateDS,service=DataSourceBinding
             Depends On Me:
             jboss.j2ee:jar=Mobile2Date.jar,name=PersonManagerBean,service=EJB3
             jboss.j2ee:jar=Mobile2Date.jar,name=SetupBean,service=EJB3
            
            


            You can see that it says it depends on :

            jboss.jca:name=Mobile2DateDS,service=DataSourceBinding

            which is odd because I have not defined my database as a DataSource, it is defined as a ConnectionFactory so it can't find it because it is looking up on the wrong service. It should be depending on :

            jboss.jca:name=Mobile2DateDS,service=ConnectionFactoryBinding

            because I am using a JCA Resource Adapter

            If anyone can help I will be very grateful