Monday, 19 October 2015

ConnectionFactory property platformClassName was set to org.eclipse.persistence.platform.database.oracle.Oracle10Platform but the database you are connecting to is DB2/LINUXX8664

I create a connection to DB2 server in weblogic admin console and tried to test one of my process and i go the error below


ConnectionFactory property platformClassName was set to org.eclipse.persistence.platform.database.oracle.Oracle10Platform but the database you are connecting to is DB2/LINUXX8664.  Please validate your platformClassName setting.  This mismatch can cause the adapter to trigger runtime exceptions or execute SQL that is invalid for the database you are connected to.  This exception is considered not retriable, likely due to a modelling mistake.  To classify it as retriable instead add property nonRetriableErrorCodes with value "--104" to your deployment descriptor (i.e. weblogic-ra.xml).  This polling process will shut down, unless the fault is related to processing a particular row, in which case polling will continue but the row will be rejected (faulted).
 
The reason for this issue was that by default when we create a jndi it takes org.eclipse.persistence.platform.database.oracle.Oracle10Platform as platformClassName

I changed it to
org.eclipse.persistence.platform.database.DB2Platform

and save the chnages + update the DB plan. You will not see the error again.
 
List of the platformClassName used for different database:-

Oracle10+ (including 11g)

org.eclipse.persistence.platform.database.Oracle10Platform
Oracle9+ (optional)

org.eclipse.persistence.platform.database.Oracle9Platform
Oracle8

org.eclipse.persistence.platform.database.Oracle8Platform
Oracle7

org.eclipse.persistence.platform.database.OraclePlatform

DB2

org.eclipse.persistence.platform.database.DB2Platform

DB2 on AS400e

oracle.tip.adapter.db.toplinkext.DB2AS400Platform
Informix

org.eclipse.persistence.platform.database.InformixPlatform
SQLServer
 
org.eclipse.persistence.platform.database.SQLServerPlatform
MySQL

org.eclipse.persistence.platform.database.MySQLPlatform
Any other database

org.eclipse.persistence.platform.database.DatabasePlatform

1 comment: