My Oracle Support Banner

WLS 10.3: Character Data type in JPA Entities treated as Integer and throwing Data Type Mismatch Error. (Doc ID 1159084.1)

Last updated on AUGUST 31, 2020

Applies to:

Oracle WebLogic Server - Version 10.3 and later
Information in this document applies to any platform.

Symptoms

In Open JPA 'Character' is treated as Integer by EJB 3.0 implementation and throws Data Type mismatch error as below:

Exception in thread "main" javax.ejb.EJBException: EJB Exception: ; nested exception is:
<openjpa-1.1.1-SNAPSHOT-r422266:891341 fatal user error> org.apache.openjpa.persistence.ArgumentException: "<PACKAGE>.Person.sex" declares a column that is not compatible with the expected type "integer". Column details:
Full Name: TST_PERSON.SEX
Type: varchar
Size: 1
Default: null
Not Null: false

at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.unwrapRemoteException(RemoteBusinessIntfProxy.java:105)
at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:87)
at $Proxy0.addPerson(Unknown Source)
at <PACKAGE>.addPersonwithCharDataType(TestPersonService.java:49)
at <PACKAGE>.main(TestPersonService.java:54)
Caused by: <openjpa-1.1.1-SNAPSHOT-r422266:891341 fatal user error> org.apache.openjpa.persistence.ArgumentException:

Changes

N/A

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.