problem starting Transaction Manager

38 views
Skip to first unread message

vijayp

unread,
May 9, 2008, 1:50:41 AM5/9/08
to jPOS Users
Hi,
I am jpos beginner ,I am tring to implement transaction manager what i
have done i have created 3 Transaction Partcipant classes that
implements org.jpos.transaction.TransactionParticipant ,
and created qbean descriptor for Transaction Manager as per jpos dev
guide.

<?xml version="1.0" encoding="windows-1252" ?>
<txnmgr name="Txn" class="org.jpos.q2.transaction.TransactionManager"
logger="Q2">
<property name="space" value="transient:default" />
<property name="queue" value="queue" />
<property name="persistent-space" value="transient:default" />
<property name="sessions" value="32" />
<participant class="testtm.TMPart1" logger="Q2" />
<participant class="testtm.TMPart2" logger="Q2" />
<participant class="testtm.TMPart3" logger="Q2" />

</txnmgr>

When i tried to run programme i am geeting following error

<warn>
deploy
<exception name="The MBean class could not be loaded by the
context classloader">
javax.management.ReflectionException: The MBean class could not be
loaded by the context classloader
at
com.sun.jmx.mbeanserver.MBeanInstantiatorImpl.loadClass(MBeanInstantiatorImpl.java:
440)
at
com.sun.jmx.mbeanserver.MBeanInstantiatorImpl.findClass(MBeanInstantiatorImpl.java:
72)
at
com.sun.jmx.mbeanserver.MBeanInstantiatorImpl.findClass(MBeanInstantiatorImpl.java:
93)
at
com.sun.jmx.mbeanserver.MBeanInstantiatorImpl.instantiate(MBeanInstantiatorImpl.java:
408)
at
com.sun.jmx.mbeanserver.MBeanInstantiatorImpl.instantiate(MBeanInstantiatorImpl.java:
374)
at
com.sun.jmx.mbeanserver.JmxMBeanServer.instantiate(JmxMBeanServer.java:
973)
at org.jpos.q2.QFactory.instantiate(QFactory.java:122)
at org.jpos.q2.Q2.deploy(Q2.java:404)
at org.jpos.q2.Q2.deploy(Q2.java:260)
at org.jpos.q2.Q2.start(Q2.java:183)
at testtm.TMPart1.main(TMPart1.java:44)
Caused by: java.lang.ClassNotFoundException:
org.jpos.q2.transaction.TransactionManager
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at
com.sun.jmx.mbeanserver.MBeanInstantiatorImpl.loadClass(MBeanInstantiatorImpl.java:
435)
... 10 more
</exception>
</warn>
</log>



Alejandro Revilla

unread,
May 9, 2008, 7:30:11 AM5/9/08
to jpos-...@googlegroups.com
Please note that the transaction manager package name has changed, it's
now org.jpos.transaction.TransactionManager.

I would recommend to remove the space definitions there so the TM can
pick the default spaces (tspace:default for the main space and a
dynamically created space for the persistent one).

--Alejandro

David Bergert

unread,
May 9, 2008, 6:09:13 PM5/9/08
to jpos-...@googlegroups.com
Hi I wanted to share the resolution to a jdbm issue that I recently
experienced:
(jPOS can be configured to use jdbm as an underlying space)

From:
http://sourceforge.net/forum/forum.php?thread_id=2034077&forum_id=12569
----------------------------------------------------------------------------
--
We experienced this error when attempting to open a jdbm space using JRE
1.5.0_15 -- (The system was not shutdown probably I suspect that the jdbm
file was either corrupted or needed checkpointing in the jdbm recovery()
method)

java.lang.NullPointerException
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1820)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
at jdbm.recman.TransactionManager.recover(TransactionManager.java:223)
at jdbm.recman.TransactionManager.<init>(TransactionManager.java:104)
at jdbm.recman.RecordFile.<init>(RecordFile.java:99)
at jdbm.recman.BaseRecordManager.<init>(BaseRecordManager.java:140)
at jdbm.recman.Provider.createRecordManager(Provider.java:89)
at
jdbm.RecordManagerFactory.createRecordManager(RecordManagerFactory.java:118)


We discovered that this was an issue for versions 1.5.0_08 through 1.6.0_03
of the Java JRE.
See this bug report:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6541870

When we used 1.5.0_07 or 1.6.0_06 - this error went away.


--Dave
www.paymentsystemsblog.com

vijayp

unread,
May 13, 2008, 2:06:37 AM5/13/08
to jPOS Users
Thanks,
It worked afeter changing Package name to
org.jpos.transaction.TransactionManager

-- vijayp
Reply all
Reply to author
Forward
0 new messages