2237715 - NullPointerException: while trying to invoke the method java.sql.Connection.prepareStatement | SAP Knowledge Base Article

SAP Knowledge Base Article - Preview

2237715 - NullPointerException: while trying to invoke the method java.sql.Connection.prepareStatement


MII transaction is called via MII_TRANS_EXT activity and fails with exception:

SAP MII transaction path/transaction failed with message: java.lang.NullPointerException: while trying to invoke the method java.sql.Connection.prepareStatement(java.lang.String) of a null object loaded from local variable 'connection' (Message 10059)

in case of Oracle database. In case of MS SQL Server the exception may look like:

com.sap.engine.services.dbpool.exceptions.BaseSQLException: ResourceException occurred in method ConnectionFactoryImpl.getConnection(): com.sap.engine.services.connector.exceptions.BaseResourceException: The resource "SAPMEINT" does not support two-phase commit and cannot be enlisted in the current transaction, because another non supporting two-phase commit resource is already enlisted for component "ejbContexts/sap.com/xapps~xmii~ear/sap.com~xapps~xmii~ejb.jar/TransactionRunnerBean" in application "sap.com/xapps~xmii~ear". Only one of the enlisted resources is allowed to be non two-phase commit compliant.
at com.sap.engine.services.dbpool.cci.ConnectionFactoryImpl.getConnection(ConnectionFactoryImpl.java:60)
at com.sap.me.integration.frame.DBWrapper.getConnection(DBWrapper.java:65)
at com.sap.me.integration.dao.SAPIntQuery.getCustomDiscriminatorTransaction(SAPIntQuery.java:118)
at com.sap.me.integration.frame.workflow.BaseDocumentDiscriminator.getDocumentType(BaseDocumentDiscriminator.java:90)
at com.sap.me.integration.frame.workflow.WorkflowHelper.callBaseDiscriminatorTransaction(WorkflowHelper.java:167)
at com.sap.me.integration.frame.workflow.WorkflowHelper.enqueueMessage(WorkflowHelper.java:507)
at com.sap.me.integration.actions.workflow.Enqueuer.execute(Enqueuer.java:43)



SAP Manufacturing Execution


SAP Manufacturing Execution 15.0 ; SAP Manufacturing Execution 15.1 ; SAP Manufacturing Execution 6.1


Extension , KBA , MFG-ME-INT , Integration , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP ONE Support launchpad (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.