Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Unable to insert an oracle XMLType field

Hi,

I'm using eclipselink 2.4.1 in a RESTful web service deployed on tomcat
7.0.32 where I have to deal with an oracle 11gR1 table with an XMLType
field.
I created a class implementing DescriptorCustomizer interface as
described in several examples I found. After some troubles with the
oracle libraries (no problems with xdb6.jar but with xmlparserv2.jar
version 11.2.0.3.0 (the last one) I have no output and no logs, I had to
use version 11.1.1.3.0 (I suppose a jar conflicts)) I can read from the
XMLType field.
But persisting the object I have the following exception that I don't
know how to face.
Create an XMLType field require to deal directly with an
oracle.jdbc.OracleConnection connection and obviously
DirectToXMLTypeMapping class doesn't do it. How can I handle that?


java.lang.ClassCastException:
org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper
cannot be cast to oracle.jdbc.OracleConnection
	oracle.sql.OpaqueDescriptor.createDescriptor(OpaqueDescriptor.java:151)
	oracle.xdb.XMLType.<init>(XMLType.java:951)
	oracle.xdb.XMLType.createXML(XMLType.java:1082)
	oracle.xdb.XMLType.createXML(XMLType.java:1072)

org.eclipse.persistence.internal.platform.database.oracle.xdb.XMLTypeBindCallCustomParameter.set(XMLTypeBindCallCustomParameter.java:51)	org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.setParameterValueInDatabaseCall(DatabasePlatform.java:2256)	org.eclipse.persistence.platform.database.oracle.Oracle9Platform.setParameterValueInDatabaseCall(Oracle9Platform.java:478)	org.eclipse.persistence.internal.databaseaccess.DatabaseCall.prepareStatement(DatabaseCall.java:724)
...more


Best regards

Alberto



Back to the top