ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » Do you spot the bug?

Post new topic  Reply to topic
 Do you spot the bug? « View previous topic :: View next topic » 
Author Message
fredand44
PostPosted: Mon Mar 27, 2006 5:57 am    Post subject: Do you spot the bug? Reply with quote

Acolyte

Joined: 14 Feb 2006
Posts: 63

Hello!

Life is unfair sometimes.

Me and my workmate are developing a application för JMS-communication between WebLogic and MQ.

The systems are similar:
Win XP
Weblogic 8.13
MQ 6.0

We have set up the systems the same but the strange thing is that his systems work and my system doesn't.

The error is that my Messaging Bridges is just getting this error:
TESTBridge Inactive WARN: failed to connect to the target.

My mate get of course:
TESTBridge Inactive WARN: Forwarding messages.


My guess is that the target at MQ is not config in the right way.


Now I hope you guys could spot the error.

This is the necesary xml from config.xml inside WebLogic:

The Server
<Server AcceptBacklog="50" Cluster="" DefaultProtocol="t3"
DefaultSecureProtocol="t3s"
DomainLogFilter="MyDomain Log Filter" HttpdEnabled="true"
ListenAddress="" ListenPort="7001" Name="cgServer"
NativeIOEnabled="true" ReliableDeliveryPolicy="RMDefaultPolicy"
ServerVersion="8.1.3.0" StdoutDebugEnabled="true"
StdoutSeverityLevel="32" TransactionLogFilePrefix="./logs/"
TunnelingClientPingSecs="45" TunnelingClientTimeoutSecs="40">
<WebServer AuthCookieEnabled="true"
LogFileName="./logs/access.log" LoggingEnabled="true" Name="cgServer"/>
<COM Name="cgServer"/>
<ServerStart Name="cgServer"/>
<SSL Enabled="true" IdentityAndTrustLocations="KeyStores"
ListenPort="7002" Name="cgServer"/>
<Log FileMinSize="20000" Name="cgServer" RotationType="bySize"/>
<KernelDebug Name="cgServer"/>
<KernelDebug Name="cgServer"/>
<ServerDebug Name="cgServer"/>
<ExecuteQueue Name="weblogic.kernel.Default"/>
<JTAMigratableTarget Name="cgServer" UserPreferredServer="cgServer"/>
</Server>

The JMSServer
<JMSServer Name="cgJMSServer" Store="" Targets="cgServer">
<JMSQueue CreationTime="1143210904798"
JNDIName="jms/TESTWL.QUEUE" Name="TESTWL.QUEUE"/>
</JMSServer>

The Connection Factory
<JMSBridgeDestination
ConnectionFactoryJNDIName="jms/cgServerConnectionFactory"
ConnectionURL="t3://inv1437:7001"
DestinationJNDIName="jms/IC0109_C.COUNTRYLIST"
Name="COUNTRYLISTTarget" UserName="weblogic" UserPassword="{3DES}pvhmtW+sQcMNnkt5iJVy5A=="/>

The messaging Bridge
<MessagingBridge Name="TESTBridge" QOSDegradationAllowed="true"
SourceDestination="TESTSource"
TargetDestination="TESTTarget" Targets="cgServer"/>

The JMS Bridge Destination
<JMSBridgeDestination
ConnectionFactoryJNDIName="jms/cgServerConnectionFactory"
ConnectionURL="t3://inv1437:7001"
DestinationJNDIName="jms/TESTWL.QUEUE"
Name="TESTSource" UserName="weblogic" UserPassword="{3DES}pvhmtW+sQcMNnkt5iJVy5A=="/>

<JMSBridgeDestination
Classpath="D:\Fredrik\jarfiles\providerutil.jar;D:\Fredrik\jarfiles\com.ibm.mqjms.jar;D:\Fredrik\jarfiles\ldap.jar;D:\Fredrik\jarfiles\jta.jar;D:\Fredrik\jarfiles\jndi.jar;D:\Fredrik\jarfiles\jms.jar;D:\Fredrik\jarfiles\connector.jar;D:\Fredrik\jarfiles\fscontext.jar;D:\Fredrik\jarfiles\com.ibm.mq.jar;D:\Fredrik\jarfiles\com.ibm.mqjms.jar;D:\Fredrik\jarfiles\ws\naming.jar;D:\Fredrik\jarfiles\ws\ras.jar;D:\Fredrik\jarfiles\ws\bootstrap.jar;D:\Fredrik\jarfiles\ws\wsexception.jar;D:\Fredrik\jarfiles\ws\emf.jar;D:\Fredrik\jarfiles\ws\namingclient.jar;D:\Fredrik\jarfiles\ws\ibmorb.jar;D:\Fredrik\jarfiles\ws\ecutils.jar;D:\Fredrik\jarfiles\ws\iwsorb.jar;D:\Fredrik\jarfiles\ws\ffdc.jar;D:\Fredrik\jarfiles\core.jar"
ConnectionFactoryJNDIName="MyQueueManager"
ConnectionURL="file:/C:/jms-jndi-directories/testjndi"
DestinationJNDIName="TESTMQ.QUEUE"
InitialContextFactory="com.sun.jndi.fscontext.RefFSContextFactory"
Name="TESTTarget" UserName="fa" UserPassword="{3DES}5HYDDbFW7h5S5+HJ45wp1w=="/>

We set up the JNDI with JMSAdmin like:

DEF QCF(MyQueueManager) QMANAGER(MyQueueManager) TRANSPORT(CLIENT) HOSTNAME(INV1437) CHANNEL(SYSTEM.DEF.SVRCONN) PORT(1480)
DEF Q(TESTMQ.QUEUE) QUEUE(TESTMQ.QUEUE) FAILIFQUIESCE(YES)QMANAGER(MyQueueManager) TARGCLIENT(JMS)

We start JmsAdmin with this settings inside the JMSAdmin.config so the .bindings will end up in C:/jms-jndi-directories/testjndi
INITIAL_CONTEXT_FACTORY=com.sun.jndi.fscontext.RefFSContextFactory
PROVIDER_URL=file:/C:/jms-jndi-directories/testjndi


But during runtime we get this messages from the weblogic console:
<2006-mar-27 kl 14:29 CEST> <Debug> <MessagingBridge> <BEA-200006> <Messaging bridge debugging RUNTIME! Bridge TESTBridge Successfully got connection to the source destination.>
<2006-mar-27 kl 14:29 CEST> <Debug> <MessagingBridge> <BEA-200006> <Messaging bridge debugging RUNTIME! Bridge TESTBridge Getting target connection.>
<2006-mar-27 kl 14:29 CEST> <Warning> <Connector> <BEA-190032> << Weblogic Messaging Bridge Adapter (XA)_eis/jms/WLSConnectionFactoryJNDIXA > ResourceAllocationException of javax.resource.ResourceException: Failed to start the connection on createManagedConnection.>

To me this says that the bridge get connected to the source at WebLogic but not to the target at MQ.

Do you guys see the error?

BTW of course we have checked the name inside MQ compare to the JMSAdmin input, they match!

Best regards
Fredrik
Back to top
View user's profile Send private message
fredand44
PostPosted: Mon Mar 27, 2006 6:35 am    Post subject: Correction of the info above!!! Reply with quote

Acolyte

Joined: 14 Feb 2006
Posts: 63

Correction of the info above!!!
The Connection Factory is configured like:
<JMSConnectionFactory JNDIName="jms/cgServerConnectionFactory"
Name="cgServerConnectionFactory" Targets="cgServer" XAConnectionFactoryEnabled="true"/>
Sorry for that mistake!!!
Back to top
View user's profile Send private message
fredand44
PostPosted: Tue Apr 04, 2006 5:28 am    Post subject: This was the error Reply with quote

Acolyte

Joined: 14 Feb 2006
Posts: 63

The mq.*.jar:s needed to be in the MQ-installation folder. I bundled them into a own folder with other jars. Strange, but having them and point them out from the classpath made it work!

Best regards
Fredrik
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Apr 04, 2006 5:33 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Server connections are not made with 100% pure java - they have to use JNI to load the necessary shared libraries/dlls to connect to the kernel shared memory that the queue manager exposes, and to connect to any XA resources needed.

So that's why you can't just bundle a server connection package into a jar file and use it - there's a lot more stuff that's needed and it can't be jarred up.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Do you spot the bug?
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.