Technote

(FAQ)
SendMsgCmd fails with null pointer exception
When calling the SendMsgCmd it fails with an error similar to the one below:

[10/16/06 10:29:30:027 EDT] 1c9c5da CommerceSrvr E com.ibm.commerce.command.ECCommandTarget executeCommand CMN0420E: The following CommandException occurred during processing: "java.lang.NullPointerException".java.lang.NullPointerException
at com.ibm.ejs.persistence.RemoteEnumeratorImpl.nextNElements(RemoteEnumeratorImpl.java:91)
at com.ibm.ejs.persistence.PortableFinderEnumerator.fetchElements(PortableFinderEnumerator.java:375)
at com.ibm.ejs.persistence.PortableFinderEnumerator.hasMoreElementsR(PortableFinderEnumerator.java:179)
at com.ibm.ejs.persistence.PortableFinderEnumerator.hasMoreElements(PortableFinderEnumerator.java:140)
at com.ibm.ejs.persistence.PortableFinderEnumeration.hasMoreElements(PortableFinderEnumeration.java:80)
at com.ibm.ivj.ejb.runtime.AccessBeanEnumeration.hasMoreElements(AccessBeanEnumeration.java:56)
at com.ibm.commerce.messaging.util.RunTimeProfile.getCSForProfile(RunTimeProfile.java:79)
at com.ibm.commerce.messaging.outboundservice.Messaging.loadAdminData(Messaging.java:3140)
at com.ibm.commerce.messaging.outboundservice.Messaging._init(Messaging.java:395)
at com.ibm.commerce.messaging.outboundservice.Messaging.<init>(Messaging.java:245)
at com.ibm.commerce.messaging.outboundservice.Messaging.<init>(Messaging.java:186)
at com.ibm.commerce.messaging.commands.SendMsgCmdImpl.performExecute(SendMsgCmdImpl.java:313)
Cause
This error occurs due to custom code that commits the TransactionManager and does not start a new transaction.


Answer

Ensure that you intend to commit the transaction. If you do not, removal of the commit should resolve the error. If you cannot remove it, then starting a new transaction immediately after the commit should also resolve the error.
Cross Reference information
Segment Product Component Platform Version Edition
Commerce WebSphere Commerce Enterprise Not Applicable AIX, Linux, Solaris, Windows 5.6, 5.6.1, 6.0
Commerce WebSphere Commerce Business Edition AIX, Linux, Solaris, Windows 5.6, 5.6.1, 6.0
Commerce WebSphere Commerce - Express AIX, Linux, Solaris, Windows 5.6, 5.6.1, 6.0
Commerce WebSphere Commerce Professional AIX, Linux, Solaris, Windows 5.6, 5.6.1, 6.0
Commerce WebSphere Commerce Developer Enterprise AIX, Linux, Solaris, Windows 5.6, 5.6.1, 6.0
Commerce WebSphere Commerce Developer Business Edition AIX, Linux, Solaris, Windows 5.6, 5.6.1, 6.0
Commerce WebSphere Commerce Developer Professional AIX, Linux, Solaris, Windows 5.6, 5.6.1, 6.0
   

Document Information

Current web document: http://www.ibm.com/support/docview.wss?uid=swg21252743