7 Replies Latest reply on Aug 14, 2003 1:39 PM by James Kuhn

    XAConnectionFactory problem

    michaelzhao Newbie

      Hi all,

      I use jboss3.2.1_tomcat4.1.24 as my ejb container and web server. I am trying to deploy Sun petstore 1.3.1_02 on it. My problem comes from the MDB, other Ejbs works fine right now. Following is the code and descriptor concerned with MDB. I appreciate if anyone can figure out my problem.

      Following is the information:

      package com.sun.j2ee.blueprints.supplier.processpo.ejb;

      import javax.ejb.CreateException;
      import javax.ejb.EJBException;
      import javax.ejb.MessageDrivenBean;
      import javax.ejb.MessageDrivenContext;
      import javax.jms.MessageListener;
      import javax.jms.Message;
      import javax.jms.TextMessage;
      import javax.jms.JMSException;
      import javax.naming.Context;
      import javax.naming.NamingException;
      import javax.ejb.FinderException;
      import com.sun.j2ee.blueprints.xmldocuments.XMLDocumentException;
      import com.sun.j2ee.blueprints.xmldocuments.tpa.TPAInvoiceXDE;

      import com.sun.j2ee.blueprints.supplier.orderfulfillment.ejb.OrderFulfillmentFacadeLocalHome;
      import com.sun.j2ee.blueprints.supplier.orderfulfillment.ejb.OrderFulfillmentFacadeLocal;
      import com.sun.j2ee.blueprints.servicelocator.ServiceLocatorException;
      import com.sun.j2ee.blueprints.servicelocator.ejb.ServiceLocator;
      import com.sun.j2ee.blueprints.processmanager.transitions.*;

      /**
      * This message driven bean that exposes Supplier functionality.
      * It receives purhase orders from the OPC component, processes the orders,
      * and, if orders are shipped, sends back the invoice.
      */
      public class SupplierOrderMDB implements MessageDrivenBean, MessageListener {
      private InitialContext ctx; //Michael add this line
      private Context context;
      private MessageDrivenContext mdc = null;
      private OrderFulfillmentFacadeLocal poProcessor = null;

      private TransitionDelegate transitionDelegate;

      public SupplierOrderMDB() {}

      public void ejbCreate() {
      try {

      ServiceLocator serviceLocator = new ServiceLocator();
      OrderFulfillmentFacadeLocalHome ref = (OrderFulfillmentFacadeLocalHome)
      serviceLocator.getLocalHome(JNDINames.ORDERFACADE_EJB);
      poProcessor = ref.create();
      String tdClassName = serviceLocator.getString(JNDINames.TRANSITION_DELEGATE__SUPPLIER_ORDER);
      TransitionDelegateFactory tdf = new TransitionDelegateFactory();
      transitionDelegate = tdf.getTransitionDelegate(tdClassName);
      transitionDelegate.setup();
      } catch (CreateException ce) {
      throw new EJBException(ce);
      } catch (TransitionException te) {
      throw new EJBException(te);
      } catch (ServiceLocatorException se) {
      throw new EJBException(se);
      //} catch (NamingException ne) { //Michael add this catch block
      //throw new EJBException(ne);
      }
      }

      /**
      * receives the supplier purchase order from the order processing
      * center, opc, and tries to fulfill the order
      *
      * @param recvMsg is the JMS message containing the xml for
      * the supplier Purchase Order.
      */
      public void onMessage(Message recvMsg) {
      try {
      String messageID = recvMsg.getJMSMessageID();
      TextMessage recdTM = (TextMessage)recvMsg;
      String recdText = recdTM.getText();

      // Do processing work on received message
      String invoice = doWork(recdText);

      // If orders were shipped, do the transition
      if(invoice!=null) {
      doTransition(invoice);
      } //else wait for the inventory to arrive at the inventory receiver
      } catch (TransitionException te) {
      throw new EJBException(te);
      } catch (CreateException ce) {
      throw new EJBException(ce);
      } catch (XMLDocumentException xe) {
      throw new EJBException(xe);
      } catch (JMSException je) {
      throw new EJBException(je);
      }
      }

      public void setMessageDrivenContext(MessageDrivenContext mdc) {
      this.mdc = mdc;
      }

      public void ejbRemove() {}

      /**
      * This method processes the order received by the supplier
      * @param xmlMessage the purchase order XML received
      * @returns invoice the invoice, in XML format, for the purchase order
      * @throws NamingException
      * @throws FinderException
      */
      private String doWork(String xmlMessage) throws
      CreateException, XMLDocumentException {
      String invoice = null;
      invoice = poProcessor.processPO(xmlMessage);
      return invoice;
      }

      /**
      * This method does the transition if the order was shipped.
      * Sends an invoice to the opc
      * @param xmlMessage the invoice, in XML, for the order received
      * @throws TransitionException for JMS failures
      */
      private void doTransition(String xmlMessage) throws TransitionException {
      TransitionInfo info = new TransitionInfo(xmlMessage);
      transitionDelegate.doTransition(info);
      }
      }


      package com.sun.j2ee.blueprints.supplier.processpo.ejb;


      /**
      * This class is the central location to store the internal
      * JNDI names of various entities. Any change here should
      * also be reflected in the deployment descriptors.
      */
      public class JNDINames {

      private JNDINames() { } //Prevents instantiation

      // JNDI names for JMS used to send invoice
      public static final String TOPIC_CONNECTION_FACTORY =
      "java:comp/env/jms/TopicConnectionFactory";
      public static final String INVOICE_MDB_TOPIC =
      "java:comp/env/jms/opc/InvoiceTopic";

      // JNDI names for OrderFulfillmentFacade EJB
      public static final String ORDERFACADE_EJB =
      "java:comp/env/ejb/OrderFulfillmentFacade";

      public static final String TRANSITION_DELEGATE__SUPPLIER_ORDER =
      "java:comp/env/param/transitiondelegate/SupplierOrderTD";

      }


      In ejb-jar.xml, the message driven bean descriptor like this:

      <message-driven>
      opc node to process PurchaseOrders from the Java Pet Store
      <display-name>SupplierOrderMDB</display-name>
      <ejb-name>SupplierOrderMDB</ejb-name>
      <ejb-class>com.sun.j2ee.blueprints.supplier.processpo.ejb.SupplierOrderMDB</ejb-class>
      <transaction-type>Container</transaction-type>
      <message-driven-destination>
      <destination-type>javax.jms.Queue</destination-type>
      </message-driven-destination>

      <env-entry>
      <env-entry-name>param/transitiondelegate/SupplierOrderTD</env-entry-name>
      <env-entry-type>java.lang.String</env-entry-type>
      <env-entry-value>com.sun.j2ee.blueprints.supplier.transitions.SupplierOrderTD</env-entry-value>
      </env-entry>

      <ejb-local-ref>
      <ejb-ref-name>ejb/OrderFulfillmentFacade</ejb-ref-name>
      <ejb-ref-type>Session</ejb-ref-type>
      <local-home>com.sun.j2ee.blueprints.supplier.orderfulfillment.ejb.OrderFulfillmentFacadeLocalHome</local-home>
      com.sun.j2ee.blueprints.supplier.orderfulfillment.ejb.OrderFulfillmentFacadeLocal
      <ejb-link>OrderFulfillmentFacadeEJB</ejb-link>
      </ejb-local-ref>

      <resource-ref>
      description

      <res-ref-name>jms/QueueConnectionFactory</res-ref-name>

      <res-type>javax.jms.QueueConnectionFactory</res-type>
      <res-auth>Container</res-auth>
      <res-sharing-scope>Shareable</res-sharing-scope>
      </resource-ref>

      <resource-ref>

      <res-ref-name>jms/TopicConnectionFactory</res-ref-name>

      <res-type>javax.jms.TopicConnectionFactory</res-type>
      <res-auth>Container</res-auth>
      <res-sharing-scope>Shareable</res-sharing-scope>
      </resource-ref>

      <resource-env-ref>

      <resource-env-ref-name>jms/opc/InvoiceTopic</resource-env-ref-name>

      <resource-env-ref-type>javax.jms.Topic</resource-env-ref-type>
      </resource-env-ref>

      </message-driven>

      In jboss.xml

      <message-driven>
      <ejb-name>SupplierOrderMDB</ejb-name>
      <destination-jndi-name>queue/jms/supplier/PurchaseOrderQueue</destination-jndi-name>

      <resource-ref>

      <res-ref-name>jms/QueueConnectionFactory</res-ref-name>

      <jndi-name>java:/JmsXA</jndi-name>
      <!--jndi-name>java:/ConnectionFactory</jndi-name-->

      </resource-ref>

      <resource-ref>

      <res-ref-name>jms/TopicConnectionFactory</res-ref-name>

      <jndi-name>java:/JmsXA</jndi-name>
      <!--jndi-name>java:/ConnectionFactory</jndi-name-->

      </resource-ref>

      <resource-env-ref>

      <resource-env-ref-name>jms/opc/InvoiceTopic</resource-env-ref-name>

      <jndi-name>topic/jms/opc/InvoiceTopic</jndi-name>
      </resource-env-ref>
      </message-driven>

      In jbossmq-destinations-service.xml, I add the following two



      <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager



      <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager


      I didn't make any changes on jms-ds.xml and jbossmq-service.xml.

      When I deploy the application, I got the "XAConnectionFactory not bound" error. I checked lgo file. I found the following message.

      =========================================================
      2003-06-05 15:08:11,843 DEBUG [org.jboss.system.ServiceController] Creating service jboss.j2ee:jndiName=local/SupplierOrderMDB,service=EJB
      2003-06-05 15:08:11,843 DEBUG [org.jboss.system.ServiceController] adding depends in ServiceController.create: []
      2003-06-05 15:08:11,843 INFO [org.jboss.ejb.MessageDrivenContainer] Creating
      2003-06-05 15:08:11,843 DEBUG [org.jboss.ejb.MessageDrivenContainer] Mapped onMessage 1175993645 to public void com.sun.j2ee.blueprints.supplier.processpo.ejb.SupplierOrderMDB.onMessage(javax.jms.Message)
      2003-06-05 15:08:11,843 INFO [org.jboss.ejb.plugins.MessageDrivenInstancePool] Creating
      2003-06-05 15:08:11,843 INFO [org.jboss.ejb.plugins.MessageDrivenInstancePool] Created
      2003-06-05 15:08:11,843 INFO [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Creating
      2003-06-05 15:08:11,843 INFO [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Created
      2003-06-05 15:08:11,843 INFO [org.jboss.ejb.MessageDrivenContainer] Created
      2003-06-05 15:08:11,843 DEBUG [org.jboss.management.j2ee.LocalJBossServerDomain] handleNotification: javax.management.Notification[source=jboss.system:service=ServiceController,type= org.jboss.system.ServiceMBean.create,sequenceNumber=108,timeStamp=1054847291843,message=null,userData=jboss.j2ee:jndiName=local/SupplierOrderMDB,service=EJB]
      2003-06-05 15:08:11,843 DEBUG [org.jboss.management.j2ee.factory.DefaultManagedObjectFactoryMap] Failed to find factory for event: javax.management.Notification[source=jboss.system:service=ServiceController,type= org.jboss.system.ServiceMBean.create,sequenceNumber=108,timeStamp=1054847291843,message=null,userData=jboss.j2ee:jndiName=local/SupplierOrderMDB,service=EJB]
      2003-06-05 15:08:11,843 DEBUG [org.jboss.system.ServiceController] Creating dependent components for: jboss.j2ee:jndiName=local/SupplierOrderMDB,service=EJB dependents are: []
      2003-06-05 15:08:11,843 DEBUG [org.jboss.ejb.EjbModule] Bound jmxName=jboss.j2ee:jndiName=local/SupplierOrderMDB,service=EJB, hash=325809796into Registry
      2003-06-05 15:08:11,843 INFO [org.jboss.ejb.EjbModule] Created
      2003-06-05 15:08:11,843 DEBUG [org.jboss.management.j2ee.LocalJBossServerDomain] handleNotification: javax.management.Notification[source=jboss.system:service=ServiceController,type= org.jboss.system.ServiceMBean.create,sequenceNumber=109,timeStamp=1054847291843,message=null,userData=jboss.j2ee:module=supplier-ejb.jar,service=EjbModule]
      2003-06-05 15:08:11,843 DEBUG [org.jboss.management.j2ee.factory.DefaultManagedObjectFactoryMap] Failed to find factory for event: javax.management.Notification[source=jboss.system:service=ServiceController,type= org.jboss.system.ServiceMBean.create,sequenceNumber=109,timeStamp=1054847291843,message=null,userData=jboss.j2ee:module=supplier-ejb.jar,service=EjbModule]
      2003-06-05 15:08:11,843 DEBUG [org.jboss.system.ServiceController] Creating dependent components for: jboss.j2ee:module=supplier-ejb.jar,service=EjbModule dependents are: []
      2003-06-05 15:08:11,843 DEBUG [org.jboss.management.j2ee.LocalJBossServerDomain] handleNotification: javax.management.Notification[source=jboss.ejb:service=EJBDeployer,type=org.jboss.deployment.SubDeployer.create,sequenceNumber=44,timeStamp=1054847291843,message=null,userData=org.jboss.deployment.DeploymentInfo@fe70aff3 { url=file:/C:/jboss-3.2.1_tomcat-4.1.24/server/isaac/tmp/deploy/server/isaac/deploy/supplier.ear/49.supplier.ear-contents/supplier-ejb.jar }
      deployer: org.jboss.ejb.EJBDeployer@de6817
      status: null
      state: CREATE_DEPLOYER
      watch: file:/C:/jboss-3.2.1_tomcat-4.1.24/server/isaac/tmp/deploy/server/isaac/deploy/supplier.ear/49.supplier.ear-contents/supplier-ejb.jar
      lastDeployed: 1054847291421
      lastModified: 1054847291281
      mbeans:
      jboss.j2ee:jndiName=supplier-com.sun.j2ee.blueprints.supplier.inventory.ejb.InventoryLocalHome,service=EJB state: Created
      jboss.j2ee:jndiName=supplier-com.sun.j2ee.blueprints.supplier.orderfulfillment.ejb.OrderFulfillmentFacadeLocalHome,service=EJB state: Created
      jboss.j2ee:jndiName=local/SupplierOrderMDB,service=EJB state: Created
      ]
      ===========================================================

      from the above message, it seems SupplierOrderMDB already created. But the following message makes me very confuse.

      ===========================================================

      15:08:12,281 DEBUG [org.jboss.system.ServiceController] Starting dependent components for: jboss.j2ee:jndiName=supplier-com.sun.j2ee.blueprints.supplier.orderfulfillment.ejb.OrderFulfillmentFacadeLocalHome,service=EJB dependent components: []
      2003-06-05 15:08:12,281 DEBUG [org.jboss.ejb.EjbModule] startService, starting container: SupplierOrderMDB
      2003-06-05 15:08:12,281 DEBUG [org.jboss.system.ServiceController] starting service jboss.j2ee:jndiName=local/SupplierOrderMDB,service=EJB
      2003-06-05 15:08:12,281 INFO [org.jboss.ejb.MessageDrivenContainer] Starting
      2003-06-05 15:08:12,281 DEBUG [org.jboss.ejb.MessageDrivenContainer] Begin java:comp/env for EJB: SupplierOrderMDB
      2003-06-05 15:08:12,281 DEBUG [org.jboss.ejb.MessageDrivenContainer] TCL: java.net.URLClassLoader@429be9
      2003-06-05 15:08:12,281 DEBUG [org.jboss.ejb.MessageDrivenContainer] Binding env-entry: param/transitiondelegate/SupplierOrderTD of type: java.lang.String to value:com.sun.j2ee.blueprints.supplier.transitions.SupplierOrderTD
      2003-06-05 15:08:12,281 DEBUG [org.jboss.ejb.MessageDrivenContainer] Binding an EJBLocalReference ejb/OrderFulfillmentFacade
      2003-06-05 15:08:12,281 DEBUG [org.jboss.ejb.MessageDrivenContainer] Binding ejb/OrderFulfillmentFacade to bean source: OrderFulfillmentFacadeEJB
      2003-06-05 15:08:12,281 DEBUG [org.jboss.ejb.MessageDrivenContainer] Binding resource manager: java:/JmsXA to JDNI ENC as: jms/QueueConnectionFactory
      2003-06-05 15:08:12,281 DEBUG [org.jboss.ejb.MessageDrivenContainer] Binding resource manager: java:/JmsXA to JDNI ENC as: jms/TopicConnectionFactory
      2003-06-05 15:08:12,281 DEBUG [org.jboss.ejb.MessageDrivenContainer] Binding env resource: topic/jms/opc/InvoiceTopic to JDNI ENC as: jms/opc/InvoiceTopic
      2003-06-05 15:08:12,281 DEBUG [org.jboss.ejb.MessageDrivenContainer] End java:comp/env for EJB: SupplierOrderMDB
      2003-06-05 15:08:12,281 DEBUG [org.jboss.ejb.plugins.local.BaseLocalProxyFactory] SupplierOrderMDB cannot be Bound, doesn't have local and local home interfaces
      2003-06-05 15:08:12,281 INFO [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Starting
      2003-06-05 15:08:12,281 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Initializing
      2003-06-05 15:08:12,281 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Looking up provider adapter: java:/DefaultJMSProvider
      2003-06-05 15:08:12,281 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Provider adapter: org.jboss.jms.jndi.JBossMQProvider@362a63
      2003-06-05 15:08:12,281 INFO [org.jboss.ejb.plugins.jms.DLQHandler] Creating
      2003-06-05 15:08:12,281 DEBUG [org.jboss.jms.jndi.JBossMQProvider] no provider url; connecting to local JNDI
      2003-06-05 15:08:12,281 DEBUG [org.jboss.jms.jndi.JBossMQProvider] created context: javax.naming.InitialContext@f51766
      2003-06-05 15:08:12,281 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)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker.startService(JMSContainerInvoker.java:579)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
      at org.jboss.ejb.MessageDrivenContainer.startService(MessageDrivenContainer.java:220)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
      at sun.reflect.GeneratedMethodAccessor71.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:966)
      at $Proxy11.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:392)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy92.start(Unknown Source)
      at org.jboss.ejb.EjbModule.startService(EjbModule.java:329)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
      at sun.reflect.GeneratedMethodAccessor71.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:966)
      at $Proxy11.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:392)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy20.start(Unknown Source)
      at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:540)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
      at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy7.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:200)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:273)
      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 org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:966)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:392)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy5.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:226)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:597)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy6.deploy(Unknown Source)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:365)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:272)
      at org.jboss.Main.boot(Main.java:150)
      at org.jboss.Main$1.run(Main.java:388)
      at java.lang.Thread.run(Thread.java:536)
      ..........

      2003-06-05 15:42:03,312 INFO [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Reconnected to JMS provider
      2003-06-05 15:42:03,312 WARN [org.jboss.ejb.plugins.jms.JMSContainerInvoker] JMS provider failure detected:
      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)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker.startService(JMSContainerInvoker.java:579)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker$ExceptionListenerImpl.onException(JMSContainerInvoker.java:1079)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker$1.run(JMSContainerInvoker.java:591)

      =========================================================================================

      Michael

        • 1. Re: XAConnectionFactory problem
          Adrian Brock Master

          Change RecursiveSearch in
          server/default/conf/jboss-service.xml
          to True

          It is a mistake

          Regards,
          Adrian

          • 2. Re: XAConnectionFactory problem
            michaelzhao Newbie

            > Change RecursiveSearch in
            > server/default/conf/jboss-service.xml
            > to True
            >
            > It is a mistake
            >
            > Regards,
            > Adrian

            Hi Adrian,

            I have already change ResurviveSearch to True. Still got the same error. Any other idea?

            Thanks,

            Michael

            • 3. Re: XAConnectionFactory problem
              Adrian Brock Master

              Since you are using 3.2.1,
              JMS persistence is dependent by default on
              your db adapter. Is that deployed correctly?

              Look for the first error in the log or a message
              about incomplete deployments.

              Regards,
              Adrian

              • 4. Re: XAConnectionFactory problem
                michaelzhao Newbie

                Hi Adrian,

                Thanks for your reply.
                I need tell you I use MS SQL server 2000 as my database.
                In my mssql-ds.xml file I have four datasource, PetStoreDS, OPCDS, SupplierDS and DefaultDS. The DefaultDS is used for message queue.
                Now, before I deploy my application, I just run the server first, then I found the following error message:
                ======================================

                [ObjectName: jboss.mq:service=InvocationLayer,type=HTTP
                state: CREATED
                I Depend On: jboss.mq:service=Invoker
                jboss.web:service=WebServer

                Depends On Me: , ObjectName: jboss.mq.destination:service=Topic,name=testTopic
                state: CREATED
                I Depend On: jboss.mq:service=DestinationManager
                jboss.mq:service=SecurityManager

                Depends On Me: , ObjectName: jboss.mq.destination:service=Topic,name=securedTop
                ic
                state: CREATED
                I Depend On: jboss.mq:service=DestinationManager
                jboss.mq:service=SecurityManager

                Depends On Me: , ObjectName: jboss.mq.destination:service=Topic,name=testDurabl
                eTopic
                state: CREATED
                I Depend On: jboss.mq:service=DestinationManager
                jboss.mq:service=SecurityManager

                Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=testQueue
                state: CREATED
                I Depend On: jboss.mq:service=DestinationManager
                jboss.mq:service=SecurityManager

                Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=A
                state: CREATED
                I Depend On: jboss.mq:service=DestinationManager

                Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=B
                state: CREATED
                I Depend On: jboss.mq:service=DestinationManager

                Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=C
                state: CREATED
                I Depend On: jboss.mq:service=DestinationManager

                Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=D
                state: CREATED
                I Depend On: jboss.mq:service=DestinationManager

                Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=ex
                state: CREATED
                I Depend On: jboss.mq:service=DestinationManager

                Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=queue/jms/
                opc/MailOrderApprovalQueue
                state: CREATED
                I Depend On: jboss.mq:service=DestinationManager

                Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=queue/jms/
                opc/MailOrderCompletedQueue
                state: CREATED
                I Depend On: jboss.mq:service=DestinationManager

                Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=queue/jms/
                opc/MailQueue
                state: CREATED
                I Depend On: jboss.mq:service=DestinationManager

                Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=queue/jms/
                opc/OrderApprovalQueue
                state: CREATED
                I Depend On: jboss.mq:service=DestinationManager

                Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=queue/jms/
                opc/OrderQueue
                state: CREATED
                I Depend On: jboss.mq:service=DestinationManager

                Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=queue/jms/
                supplier/PurchaseOrderQueue
                state: CREATED
                I Depend On: jboss.mq:service=DestinationManager

                Depends On Me: , ObjectName: jboss.mq.destination:service=Topic,name=topic/jms/
                opc/InvoiceTopic
                state: CREATED
                I Depend On: jboss.mq:service=DestinationManager

                Depends On Me: , ObjectName: jboss.mq:service=InvocationLayer,type=JVM
                state: CREATED
                I Depend On: jboss.mq:service=Invoker

                Depends On Me: , ObjectName: jboss.mq:service=InvocationLayer,type=RMI
                state: CREATED
                I Depend On: jboss.mq:service=Invoker

                Depends On Me: , ObjectName: jboss.mq:service=InvocationLayer,type=OIL
                state: CREATED
                I Depend On: jboss.mq:service=Invoker

                Depends On Me: , ObjectName: jboss.mq:service=InvocationLayer,type=UIL
                state: CREATED
                I Depend On: jboss.mq:service=Invoker

                Depends On Me: , ObjectName: jboss.mq:service=InvocationLayer,type=OIL2
                state: CREATED
                I Depend On: jboss.mq:service=Invoker

                Depends On Me: , ObjectName: jboss.mq:service=InvocationLayer,type=UIL2
                state: CREATED
                I Depend On: jboss.mq:service=Invoker

                Depends On Me: , ObjectName: jboss.mq:service=Invoker
                state: CREATED
                I Depend On: jboss.mq:service=TracingInterceptor

                Depends On Me: jboss.mq:service=InvocationLayer,type=HTTP
                jboss.mq:service=InvocationLayer,type=JVM
                jboss.mq:service=InvocationLayer,type=RMI
                jboss.mq:service=InvocationLayer,type=OIL
                jboss.mq:service=InvocationLayer,type=UIL
                jboss.mq:service=InvocationLayer,type=OIL2
                jboss.mq:service=InvocationLayer,type=UIL2
                , ObjectName: jboss.mq:service=TracingInterceptor
                state: CREATED
                I Depend On: jboss.mq:service=SecurityManager

                Depends On Me: jboss.mq:service=Invoker
                , ObjectName: jboss.mq:service=SecurityManager
                state: CREATED
                I Depend On: jboss.mq:service=DestinationManager

                Depends On Me: jboss.mq.destination:service=Topic,name=testTopic
                jboss.mq.destination:service=Topic,name=securedTopic
                jboss.mq.destination:service=Topic,name=testDurableTopic
                jboss.mq.destination:service=Queue,name=testQueue
                jboss.mq:service=TracingInterceptor
                jboss.mq.destination:service=Queue,name=DLQ
                , ObjectName: jboss.mq:service=DestinationManager
                state: CREATED
                I Depend On: jboss.mq:service=PersistenceManager
                jboss.mq:service=StateManager

                Depends On Me: jboss.mq.destination:service=Topic,name=testTopic
                jboss.mq.destination:service=Topic,name=securedTopic
                jboss.mq.destination:service=Topic,name=testDurableTopic
                jboss.mq.destination:service=Queue,name=testQueue
                jboss.mq.destination:service=Queue,name=A
                jboss.mq.destination:service=Queue,name=B
                jboss.mq.destination:service=Queue,name=C
                jboss.mq.destination:service=Queue,name=D
                jboss.mq.destination:service=Queue,name=ex
                jboss.mq.destination:service=Queue,name=queue/jms/opc/MailOrderApprovalQueue
                jboss.mq.destination:service=Queue,name=queue/jms/opc/MailOrderCompletedQueue
                jboss.mq.destination:service=Queue,name=queue/jms/opc/MailQueue
                jboss.mq.destination:service=Queue,name=queue/jms/opc/OrderApprovalQueue
                jboss.mq.destination:service=Queue,name=queue/jms/opc/OrderQueue
                jboss.mq.destination:service=Queue,name=queue/jms/supplier/PurchaseOrderQueue
                jboss.mq.destination:service=Topic,name=topic/jms/opc/InvoiceTopic
                jboss.mq:service=SecurityManager
                jboss.mq.destination:service=Queue,name=DLQ
                , ObjectName: jboss.mq:service=PersistenceManager
                state: FAILED
                I Depend On: jboss.mq:service=MessageCache
                jboss.jca:service=LocalTxCM,name=DefaultDS

                Depends On Me: jboss.mq:service=DestinationManager
                org.jboss.mq.SpyJMSException: Could not resolve uncommited transactions. Messag
                e recovery may not be accurate; - nested throwable: (java.sql.SQLException: [Mic
                rosoft][SQLServer 2000 Driver for JDBC]Can't start a cloned connection while in
                manual transaction mode.), ObjectName: jboss.mq.destination:service=Queue,name=D
                LQ
                state: CREATED
                I Depend On: jboss.mq:service=DestinationManager
                jboss.mq:service=SecurityManager

                Depends On Me: ]
                13:18:37,750 INFO [URLDeploymentScanner] Started
                13:18:37,765 INFO [MainDeployer] Deployed package: file:/C:/jboss-3.2.1_tomcat-
                4.1.24/server/isaac/conf/jboss-service.xml
                13:18:37,765 INFO [Server] JBoss (MX MicroKernel) [3.2.1 (build: CVSTag=JBoss_3
                _2_1 date=200305041533)] Started in 14s:484ms

                =====================================
                The PersistenceManager failed. It seems that SQLServer 2000 driver doesn't support Bean managed transaction (Manual transaction mode). In my case, all the queue trasactions are bean managed transaction. Is this the reason?

                Regards,

                By the way, the first error for incomplete deployments is none.

                Michael

                • 5. Re: XAConnectionFactory problem
                  Adrian Brock Master

                  You will need to change the sql properties
                  to match SQL server. The most likely problem
                  is the blob type.

                  Regards,
                  Adrian

                  • 6. Re: XAConnectionFactory problem
                    michaelzhao Newbie

                    Thanks Adrian, I solved the problem.

                    Michael

                    • 7. Re: XAConnectionFactory problem
                      James Kuhn Newbie

                      Hi,

                      I'm having the same problem.

                      What "blob" settings are you talking about?
                      Do you mean the db settings in standardjbosscmp-jdbc.xml?

                      Also... as a note: I wasn't having this problem until I tried to implement some security with JAAS. And then I started getting the XAConnectionFactory error, and the "I Depend On: jboss.mq:service=Invoker" problem.