1 Reply Latest reply on Jul 21, 2008 6:53 PM by Clebert Suconic

    Jboss bridge- Unable to setup connections with Jboss MQ queu

    Shailesh P Newbie

      hI,
      I am using jboss-4.0.5.GA. I have placed jboss-messaging.jar(1.3.0.GA) in server lib. I have set up a bridge having source as Topic(Tibco JMS) on remote host and target as queue on local JbossMQ. I am getting following exception:

      01:04:04,635 INFO [testTopic] Bound to JNDI name: topic/testTopic
      01:04:04,650 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
      01:04:04,650 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic

      01:04:04,650 INFO [testQueue] Bound to JNDI name: queue/testQueue
      01:04:04,744 INFO [UILServerILService] JBossMQ UIL service available at : /0.0.
      0.0:8093
      01:04:04,822 INFO [DLQ] Bound to JNDI name: queue/DLQ
      01:04:05,072 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jb
      oss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
      01:04:05,244 WARN [Bridge] WARNING! The old JBoss transaction manager is being
      used. This does not have XA transaction recovery functionality. For XA transacti
      on recovery please deploy the JBoss Transactions JTA/JTS implementation.
      01:04:05,260 WARN [Bridge] Failed to set up connections
      java.lang.NullPointerException
      at javax.naming.InitialContext.getURLScheme(InitialContext.java:228)
      at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.jav
      a:277)
      at javax.naming.InitialContext.lookup(InitialContext.java:351)
      at org.jboss.jms.server.bridge.JNDIConnectionFactoryFactory.createConnec
      tionFactory(JNDIConnectionFactoryFactory.java:68)
      at org.jboss.jms.server.bridge.Bridge.createConnection(Bridge.java:812)
      at org.jboss.jms.server.bridge.Bridge.setupJMSObjects(Bridge.java:890)
      at org.jboss.jms.server.bridge.Bridge.start(Bridge.java:287)
      at org.jboss.jms.server.bridge.BridgeService.startService(BridgeService.
      java:345)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
      upport.java:289)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
      96)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
      er.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
      or.java:133)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
      BeanOperationInterceptor.java:142)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:995)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:417)
      at org.jboss.system.ServiceController.start(ServiceController.java:435)
      at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)


      Here are the configurations that I have done:

      Added tibco-bridge-service.xml to server\all\deploy-hasingleton\jms folder.
      It looks as follows:


      
      <server>
       <mbean code="org.jboss.jms.server.bridge.BridgeService"
       name="jboss.messaging:service=Bridge,name=TestBridge"
       xmbean-dd="xmdesc/Bridge-xmbean.xml">
       <depends optional-attribute-name="SourceProviderLoader">jboss.messaging:service=JMSProviderLoader,name=TibJMSProvider</depends>
       <depends optional-attribute-name="TargetProviderLoader">jboss.messaging:service=JMSProviderLoader,name=LocalJMSProvider</depends>
       <attribute name="SourceDestinationLookup">TopicName</attribute>
       <attribute name="TargetDestinationLookup">queue/testQueue</attribute>
       <attribute name="SourceUsername">userName</attribute>
       <attribute name="SourcePassword">password</attribute>
       <attribute name="QualityOfServiceMode">2</attribute>
       <attribute name="MaxBatchSize">5</attribute>
       <attribute name="MaxBatchTime">-1</attribute>
       <attribute name="SubName">Test</attribute>
       <!--attribute name="ClientID">myClientID</attribute-->
       <attribute name="FailureRetryInterval">5000</attribute>
       <attribute name="MaxRetries">-1</attribute>
       </mbean>
      </server>
      
      



      The target queue - queue/testQueue is the one which is by default in server\all\deploy-hasingleton\jms\jbossmq-destinations-service.xml file.

      The server\all\deploy\jms\hajndi-jms-ds.xml contains the following:

      <!-- Tibco JMS Provider -->
      <mbean code="org.jboss.jms.jndi.JMSProviderLoader" name="jboss.messaging:service=JMSProviderLoader,name=TibJMSProvider">
       <attribute name="ProviderName">TibcoJMSProvider</attribute>
       <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
       <attribute name="QueueFactoryRef">XAQueueConnectionFactory</attribute>
       <attribute name="TopicFactoryRef">XATopicConnectionFactory</attribute>
       <attribute name="Properties">
       java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory
       java.naming.provider.url=ldap://abc.xyz
       </attribute>
      </mbean>
      
      <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
       name="jboss.messaging:service=JMSProviderLoader,name=LocalJMSProvider">
       <attribute name="ProviderName">LocalJMSProvider</attribute>
       <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
       <attribute name="QueueFactoryRef">XAConnectionFactory</attribute>
       <attribute name="TopicFactoryRef">XAConnectionFactory</attribute>
       <attribute name="Properties">
       java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
       java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
       java.naming.provider.url=${jboss.bind.address:localhost}:1100
       jnp.disableDiscovery=false
       jnp.partitionName=${jboss.partition.name:DefaultPartition}
       jnp.discoveryGroup=${jboss.partition.udpGroup:230.0.0.4}
       jnp.discoveryPort=1102
       jnp.discoveryTTL=16
       jnp.discoveryTimeout=5000
       jnp.maxRetries=1
       </attribute>
       </mbean>
      
      



      Please let me know where I am going wrong.