Sunday, June 28, 2015

ConnectionFactory property platformClassName was set to org.eclipse.persistence.platform.database.oracle.Oracle10Platform but the database you are connecting to is Microsoft SQL Server.


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

Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'write' failed due to: DBWriteInteractionSpec Execute Failed Exception. write failed. Descriptor name: [WriteToDD.InterfaceErrors]. Caused by weblogic.jdbc.sqlserverbase.ddc: [FMWGEN][SQLServer JDBC Driver][SQLServer]String or binary data would be truncated.. Please see the logs for the full DBAdapter logging output prior to this exception. ConnectionFactory property platformClassName was set to org.eclipse.persistence.platform.database.oracle.Oracle10Platform but the database you are connecting to is Microsoft SQL Server. 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 "-8152" to your deployment descriptor (i.e. weblogic-ra.xml). To auto retry a retriable fault set these composite.xml properties for this invoke: jca.retry.interval, jca.retry.count, and jca.retry.backoff. All properties are integers. ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution.


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 oracle.toplink.platform.database.SQLServerPlatform





AFter making the changes i updated the configuration plan and then i didn't get this issue.

No comments: