|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MQ 90 day eval support bindings mode? |
« View previous topic :: View next topic » |
Author |
Message
|
medloh |
Posted: Fri Apr 18, 2008 11:09 am Post subject: MQ 90 day eval support bindings mode? |
|
|
Newbie
Joined: 10 Mar 2008 Posts: 5
|
I'm a bit of an MQ newbie, and could use some guidance on an issue. I downloaded the 90 day MQ eval a month ago and have been developing a Java MQ client. I always assumed I needed to know the port/channel/host. The first time we deployed to the real system, much to my suprise, I was told I shouldn't need to specify values for these. My code runs great on my dev system, but the target system's admins don't want to give me values for port/channel/host. So its not working there yet.
I'm unsure how best to resolve this. I could try to insist they give me values for port/channel/host, even though MQ will always be running on same box as my Java client program. Or I could try getting my code to run without these values. I tried this and got the stacktrace below. Is it because the 90 day trial version of MQ doesn't support bindings mode?
darrel
Code: |
Exception in thread "main" java.lang.NoSuchFieldError: msgToken
at com.ibm.mq.server.MQSESSION.init_conversion(Native Method)
at com.ibm.mq.server.MQSESSION.<clinit>(MQSESSION.java:254)
at com.ibm.mq.MQSESSIONServer.getMQSESSION(MQSESSIONServer.java:68)
at com.ibm.mq.MQSESSION.getSession(MQSESSION.java:493)
at com.ibm.mq.MQManagedConnectionJ11.<init>(MQManagedConnectionJ11.java:155)
at com.ibm.mq.MQBindingsManagedConnectionFactoryJ11._createManagedConnection(MQBindingsManagedConnectionFactoryJ11.java:153)
at com.ibm.mq.MQBindingsManagedConnectionFactoryJ11.createManagedConnection(MQBindingsManagedConnectionFactoryJ11.java:189)
at com.ibm.mq.StoredManagedConnection.<init>(StoredManagedConnection.java:80)
at com.ibm.mq.MQSimpleConnectionManager.allocateConnection(MQSimpleConnectionManager.java:171)
at com.ibm.mq.MQQueueManager.obtainBaseMQQueueManager(MQQueueManager.java:754)
at com.ibm.mq.MQQueueManager.construct(MQQueueManager.java:688)
at com.ibm.mq.MQQueueManager.<init>(MQQueueManager.java:417)
at com.tririga.integration.mq.sample.GetQueueDepth_BindingMode.getData(GetQueueDepth_BindingMode.java:38)
at com.tririga.integration.mq.sample.GetQueueDepth_BindingMode.main(GetQueueDepth_BindingMode.java:24) |
Last edited by medloh on Tue May 06, 2008 8:57 am; edited 1 time in total |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Apr 18, 2008 1:30 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
No, it is because if you are doing JMS you should be retrieving the connection factory from the JNDI layer.
If you are using java base you will have to modify your code to pick up the qmgr name... and not use MQEnvironment ??
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
medloh |
Posted: Tue May 06, 2008 8:55 am Post subject: |
|
|
Newbie
Joined: 10 Mar 2008 Posts: 5
|
I'm hardcoding the Q Manager name and the Q name. Still stumped on this one. My example code below. Don't understand what would cause this error.
Code: |
public void putMsg( String msg )
{
try {
MQQueueManager qMgr = new MQQueueManager( "QM_lttririga334" );
int openOptions = MQC.MQOO_OUTPUT;
MQQueue queue = qMgr.accessQueue( "Q1", openOptions);
//put options
int putOptions = MQC.MQPMO_FAIL_IF_QUIESCING | MQC.MQPMO_SYNCPOINT;
MQPutMessageOptions pmo = new MQPutMessageOptions();
pmo.options = putOptions;
//set MQ MessageID
MQMessage putMessage = new MQMessage();
SimpleDateFormat formatter = new SimpleDateFormat( "yyyyMMddHHmmssSSS" );
Date dt = new Date();
String ts = formatter.format( dt );
putMessage.messageId = ts.getBytes();
StringBuffer dataBuffer = new StringBuffer( 2000 );
putMessage.format = MQC.MQFMT_STRING;
putMessage.putApplicationName = "APPNAME_TEST";
//Put Message
dataBuffer.append( msg );
putMessage.write( dataBuffer.toString().getBytes() );
queue.put(putMessage, pmo );
putMessage.clearMessage();
queue.close();
qMgr.commit();
qMgr.disconnect();
log.info( "success" );
} catch (MQException MQE1) {
log.error( "MQ Exception Completion Code: " +
MQE1.completionCode + " Reason Code: " + MQE1.reasonCode );
} catch ( IOException IOE1 ) {
log.error("IO Exception: " + IOE1.getMessage());
log.error(IOE1.getMessage());
}
}
|
|
|
Back to top |
|
 |
medloh |
Posted: Tue May 06, 2008 10:05 am Post subject: |
|
|
Newbie
Joined: 10 Mar 2008 Posts: 5
|
Here's a bit more info. I get the following similar but different error when I run the code on our target AIX system. Looks like I am missing a required Jar to run in server/bindings mode. Can anyone confirm or deny my hunch?
Darrel
Code: |
$ ./serverModeTest.sh
log4j.configuration=log4j.xml
putMsg(): qmgr=OURQMGR, qname=OURQNAME, msg=test server mode
Exception in thread "main" java.lang.UnsatisfiedLinkError: mqjbnd05 (Not found in java.library.path)
at java.lang.ClassLoader.loadLibraryWithPath(ClassLoader.java:981)
at java.lang.ClassLoader.loadLibraryWithClassLoader(ClassLoader.java:950)
at java.lang.System.loadLibrary(System.java:453)
at com.ibm.mq.MQSESSION.loadLib(MQSESSION.java:865)
at com.ibm.mq.server.MQSESSION$1.run(MQSESSION.java:227)
at java.security.AccessController.doPrivileged(AccessController.java:197)
at com.ibm.mq.server.MQSESSION.<clinit>(MQSESSION.java:221)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:194)
at com.ibm.mq.MQSESSIONServer.getMQSESSION(MQSESSIONServer.java:68)
at com.ibm.mq.MQSESSION.getSession(MQSESSION.java:493)
at com.ibm.mq.MQManagedConnectionJ11.<init>(MQManagedConnectionJ11.java:155)
at com.ibm.mq.MQBindingsManagedConnectionFactoryJ11._createManagedConnection(MQBindingsManagedConnectionFactoryJ11.java:153)
at com.ibm.mq.MQBindingsManagedConnectionFactoryJ11.createManagedConnection(MQBindingsManagedConnectionFactoryJ11.java:189)
at com.ibm.mq.StoredManagedConnection.<init>(StoredManagedConnection.java:80)
at com.ibm.mq.MQSimpleConnectionManager.allocateConnection(MQSimpleConnectionManager.java:171)
at com.ibm.mq.MQQueueManager.obtainBaseMQQueueManager(MQQueueManager.java:754)
at com.ibm.mq.MQQueueManager.construct(MQQueueManager.java:688)
at com.ibm.mq.MQQueueManager.<init>(MQQueueManager.java:417)
at com.tririga.integration.mq.MqDataSource.putMsg(MqDataSource.java:475)
at com.tririga.integration.mq.MqDataSource.main(MqDataSource.java:91)
$
|
|
|
Back to top |
|
 |
fjb_saper |
Posted: Tue May 06, 2008 1:43 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
medloh wrote: |
Here's a bit more info. I get the following similar but different error when I run the code on our target AIX system. Looks like I am missing a required Jar to run in server/bindings mode. Can anyone confirm or deny my hunch?
Darrel
Code: |
Exception in thread "main" java.lang.UnsatisfiedLinkError: mqjbnd05 (Not found in java.library.path)
|
|
What you are missing in the mqjbnd05.dll in the PATH or
mqjbnd05.so in the LIBPATH....
Lookup as well the java.library.path variable. See latest manuals
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|