Exploring MQSeries Java libraries causing problems
theblob_bob at my-deja.com
theblob_bob at my-deja.com
Mon Aug 21 12:27:08 EDT 2000
Hi python enthousiastics,
I am trying to use jpython instead of java to code test programs
quicker.
I want to use the IBM MQSeries libraries.
I am trying something very simple that works if I write a normal java
program, but does not work with jpython:
the jpython code looks like that:
import com.ibm.mq.MQQueueManager
import com.ibm.mq.MQQueue
class MQUser:
__qm = None
__putq = None
def __init__(self):
try:
self.__qm = com.ibm.mq.MQQueueManager("QM")
self.__putq = com.ibm.mq.MQQueue(__qm,
"QUEUE","", "", "", "")
except com.ibm.mq.MQException, mqe:
mqe.printStackTrace()
if __name__ == '__main__':
mquser = MQUser()
When running this I get the following error:
MQJE016: MQ queue manager closed channel immediately during connect
Closure reason = 1
MQJE001: Completion Code 2, Reason 2009
com.ibm.mq.MQException: Completion Code 2, Reason 2009
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at com.ibm.mq.MQException.<init>(Compiled Code)
at com.ibm.mq.MQQueueManager.connect(Compiled Code)
at com.ibm.mq.MQQueueManager.<init>(Compiled Code)
at org.python.core.PyReflectedConstructor.__call__(Compiled
Code)
at org.python.core.PyJavaInstance.__init__(Compiled Code)
at org.python.core.PyJavaClass.__call__(Compiled Code)
at org.python.core.PyObject.__call__(Compiled Code)
at org.python.core.PyObject.invoke(Compiled Code)
at org.python.pycode._pyx0.__init__$2(Compiled Code)
at org.python.pycode._pyx0.call_function(Compiled Code)
at org.python.core.PyTableCode.call(Compiled Code)
at org.python.core.PyTableCode.call(Compiled Code)
at org.python.core.PyTableCode.call(Compiled Code)
at org.python.core.PyFunction.__call__(Compiled Code)
at org.python.core.PyInstance.__init__(Compiled Code)
at org.python.core.PyClass.__call__(Compiled Code)
at org.python.core.PyObject.__call__(Compiled Code)
at org.python.pycode._pyx0.f$0(Compiled Code)
at org.python.pycode._pyx0.call_function(Compiled Code)
at org.python.core.PyTableCode.call(Compiled Code)
at org.python.core.Py.runCode(Compiled Code)
at org.python.core.__builtin__.execfile(Compiled Code)
at org.python.core.__builtin__.execfile(Compiled Code)
at org.python.util.PythonInterpreter.execfile(Compiled Code)
at org.python.util.jpython.main(Compiled Code)
For some reason, the jpython program loses the connection to the
MQSeries Queue manager.
I know this is a very specific question. If anyone has an idea, any
help greatly appreciated.
Thanks,
B.
PS: moreover, for some reason, the packages are not imported correctly
and I need to declare the whole path...
Sent via Deja.com http://www.deja.com/
Before you buy.
More information about the Python-list
mailing list