[jboss-user] [JBoss Messaging] - Not able to connect to remote Queue through Bridge

jjacobwip do-not-reply at jboss.com
Wed Jul 2 12:30:57 EDT 2008


Hi,

We were trying to setup a Messaging bridge between Jboss SOA platform 4.2.2 and Jboss AS 4.0.4. I have an remote MQ queue running on 4.0.4 server. We are doing this to avoid any incompatability between Jboss Messaging in SOA and MQ in 4.0.4. 

We set the Source as the remote queue running on 4.0.4 and target as a local queue running in SOA platform. But when the bridge configuration is deployed, its throwing the below exception
 
  | 2008-07-02 12:02:44,108 WARN  [org.jboss.jms.server.bridge.Bridge] Failed to set up connections
  | java.lang.NullPointerException
  | 	at javax.naming.InitialContext.getURLScheme(InitialContext.java:228)
  | 	at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:277)
  | 	at javax.naming.InitialContext.lookup(InitialContext.java:351)
  | 	at org.jboss.jms.server.bridge.JNDIFactorySupport.createObject(JNDIFactorySupport.java:66)
  | 	at org.jboss.jms.server.bridge.JNDIConnectionFactoryFactory.createConnectionFactory(JNDIConnectionFactoryFactory.java:46)
  | 	at org.jboss.jms.server.bridge.Bridge.createConnection(Bridge.java:832)
  | 	at org.jboss.jms.server.bridge.Bridge.setupJMSObjects(Bridge.java:944)
  | 	at org.jboss.jms.server.bridge.Bridge.start(Bridge.java:306)
  | 	at org.jboss.jms.server.bridge.BridgeService.startService(BridgeService.java:346)
  | 	at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
  | 

Below is excerpts from our hajndi-jms-ds.xml. We are using LocalJMSProvider


  | <!-- The JMS provider loader -->
  |   <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
  | 	 name="jboss.jms:service=JMSProviderLoader,name=HAJNDIJMSProvider">
  |     <attribute name="ProviderName">DefaultJMSProvider</attribute>
  |     <attribute name="ProviderAdapterClass">
  |       org.jboss.jms.jndi.JNDIProviderAdapter
  |     </attribute>
  |     <!-- The combined connection factory -->
  |     <attribute name="FactoryRef">XAConnectionFactory</attribute>
  |     <!-- The queue connection factory -->
  |     <attribute name="QueueFactoryRef">XAConnectionFactory</attribute>
  |     <!-- The topic factory -->
  |     <attribute name="TopicFactoryRef">XAConnectionFactory</attribute>
  |     <!-- Access JMS via HAJNDI -->
  |     <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>
  | <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
  | 	 </attribute>
  |  </mbean>
  | 

Our bridge config is as below


  | <mbean code="org.jboss.jms.server.bridge.BridgeService"
  |           name="jboss.messaging:service=Bridge,name=IPMBridge"
  |           xmbean-dd="xmdesc/Bridge-xmbean.xml">
  |           
  |       <!-- The JMS provider loader that is used to lookup the source destination -->   
  |       <depends optional-attribute-name="SourceProviderLoader">jboss.messaging:service=JMSProviderLoader,name=RemoteJMSProvider,server=10.200.171.60</depends>     
  |       
  |       <!-- The JMS provider loader that is used to lookup the target destination -->
  |       <depends optional-attribute-name="TargetProviderLoader">jboss.messaging:service=JMSProviderLoader,name=LocalJMSProvider</depends>    
  |       
  |       <!-- The JNDI lookup for the source destination -->
  |       <attribute name="SourceDestinationLookup">/queue/SOA_STD</attribute> 
  |       
  |       <!-- The JNDI lookup for the target destination -->
  |       <attribute name="TargetDestinationLookup">/queue/IPMQueue</attribute>
  |       
  |       <!-- The username to use for the source connection 
  |       <attribute name="SourceUsername">bob</attribute>
  |       -->
  |       
  |       <!-- The password to use for the source connection
  |       <attribute name="SourcePassword">cheesecake</attribute>
  |       -->
  | 

Below is our remote queue config


  | <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
  | 	       name="jboss.messaging:service=JMSProviderLoader,name=RemoteJMSProvider,server=10.200.171.60">
  | 		       
  | 	    <attribute name="ProviderName">RemoteJMSProvider</attribute>
  | 	    <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
  | 	    
  | 	    <!-- The combined connection factory -->
  | 	    <attribute name="FactoryRef">XAConnectionFactory</attribute>
  | 	    <!-- The queue connection factory -->
  | 	    <attribute name="QueueFactoryRef">XAConnectionFactory</attribute> 
  | 	    <!-- The topic factory -->
  | 	    <attribute name="TopicFactoryRef">XAConnectionFactory</attribute>
  | 	    <!-- Uncomment to use HAJNDI to access JMS -->
  | 	    
  | 	    <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=10.200.171.60:1199
  | 	    </attribute>   
  |   </mbean>
  | 

Could somebody let us know whats wrong with this configuration? We have gone through other threads which talks about the same issue, but was not that helpful. 

Thanks in advance

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4162134#4162134

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4162134



More information about the jboss-user mailing list