2 Replies Latest reply on Feb 17, 2014 9:25 AM by shahbaz07dbit

    "XAConnectionFactory not bound" on startup

    naveen123

      Need help understanding and resloving this error
      XAConnectionFactory not bound

      Occasionally on startup of JBoss I keep getting this error. The way to resolve it is to stop JBoss, delete
      the "data" directory and start JBoss and everything works fine.

      Tried tinkering with the hsqldb-ds.xml by uncommenting in-memory db and this prevents
      creation of the "data" directory, but after JBoss is running for a while an attempt is made to write to this directory and errors out something like table is missing.

      Should I be disabling something else as well?

      any pointers or direct me to some documention which will help me reslove this issue.

      This is my definition of mbean in question

      appstream/ste
      jboss:service=Naming


      Should I be adding any other attribute and depends elements to get this working consistently.

      Tried attaching server.log but it seems to fail for some reason.

      2003-09-08 16:37:15,561 WARN [com.appstream.server.datacenter.aswe.EMessageSenderReceiver] Unable to get Connection factory, try again in 2 seconds
      2003-09-08 16:37:16,863 ERROR [org.jboss.mq.pm.jdbc2.PersistenceManager] Starting failed
      org.jboss.mq.SpyJMSException: Could not resolve uncommited transactions. Message recovery may not be accurate; - nested throwable: (org.jboss.util.NestedSQLException: Could not create connection; - nested throwable: (java.sql.SQLException: Connection is broken: Connection refused: connect); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Connection is broken: Connection refused: connect)))
      at org.jboss.mq.pm.jdbc2.PersistenceManager.resolveAllUncommitedTXs(PersistenceManager.java:276)
      at org.jboss.mq.pm.jdbc2.PersistenceManager.startService(PersistenceManager.java:1299)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
      at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      ......
      ......
      at java.lang.Thread.run(Thread.java:536)
      Caused by: org.jboss.util.NestedSQLException: Could not create connection; - nested throwable: (java.sql.SQLException: Connection is broken: Connection refused: connect); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Connection is broken: Connection refused: connect))
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:106)
      at org.jboss.mq.pm.jdbc2.PersistenceManager.getConnection(PersistenceManager.java:1206)
      at org.jboss.mq.pm.jdbc2.PersistenceManager.resolveAllUncommitedTXs(PersistenceManager.java:219)
      ... 68 more
      Caused by: org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Connection is broken: Connection refused: connect)
      at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:157)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnection(InternalManagedConnectionPool.java:352)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:151)
      at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:429)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:413)
      at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:331)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:488)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:798)
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
      ... 70 more
      Caused by: java.sql.SQLException: Connection is broken: Connection refused: connect
      at org.hsqldb.Trace.getError(Unknown Source)
      at org.hsqldb.Trace.error(Unknown Source)
      at org.hsqldb.jdbcConnection.reconnectHSQL(Unknown Source)
      at org.hsqldb.jdbcConnection.openHSQL(Unknown Source)
      .......
      .......
      2003-09-08 16:37:36,561 ERROR [org.jboss.ejb.plugins.jms.DLQHandler] Initialization failed
      javax.jms.JMSException: Error creating the dlq connection: XAConnectionFactory not bound
      at org.jboss.ejb.plugins.jms.DLQHandler.createService(DLQHandler.java:152)
      at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:158)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerCreate(JMSContainerInvoker.java:394)
      ........
      .......

      thanks,
      naveen

        • 1. Re: "XAConnectionFactory not bound" on startup

          As from 3.2.1, JBossMQ persistence manager is mapper to the HSQL DB. When you get this XAConnectionFactory not bound on startup, it means in fac that the deployment of JMS failed (Go upper in the server.log to see why)

          I am afraid you have broken the HSQL configuration, preventing JMS to start. I don't know the usage you are making of JMS but you can go for a the File PM (see example in the deploy/jms/jbossmq-service.xml)

          Regards,

          Stephane

          • 2. Re: "XAConnectionFactory not bound" on startup
            shahbaz07dbit

            even i got the same error , jms was down ....changed

            Jboss-5.1.0.-jdk\server\default\deploy\messaging\connection-factories-service.xml

            and it stated working .......