KB Article #183096

Enable debug for SQL connection in B2Bi

Problem

How to generate debugs for sql connection and activities in B2Bi?

Per default, logging of SQL queries will not show values of SQL parameters

Resolution

- Add/modify highlighted lines In datastoreconfig.xml (take a backup copy of this file):

<Properties>
<Property key="openjpa.ConnectionProperties" value="DisableConnectionTracking=true,ReleaseHelperThreads=0,MinConnectionsPerPartition=50,MaxConnectionsPerPartition=100,ConnectionTimeoutInMs=30000,IdleMaxAgeInMinutes=10,ConnectionTestStatement="SELECT SYSDATE FROM DUAL""/>
<Property key="openjpa.jdbc.DBDictionary" value="com.cyclonecommerce.persistence.providers.jpa.openjpa.dict.CycloneOracleDictionary"/>
<Property key="openjpa.ConnectionProperties" value="PrintParameters=true,PrettyPrint=true,PrettyPrintLineLength=72"/>
<Property key="openjpa.Log" value="log4j
"/>
</Properties>

- Enable following DEBUG in log4j2.xml:
<Logger name="openjpa.jdbc.SQL" level="DEBUG" />

-Restart B2Bi.