You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Jeremy Bauer (JIRA)" <ji...@apache.org> on 2009/09/09 21:50:57 UTC
[jira] Created: (OPENJPA-1289) Oracle driver throws exception due
to incorrect mapping of XMLType column
Oracle driver throws exception due to incorrect mapping of XMLType column
-------------------------------------------------------------------------
Key: OPENJPA-1289
URL: https://issues.apache.org/jira/browse/OPENJPA-1289
Project: OpenJPA
Issue Type: Bug
Affects Versions: 2.0.0
Environment: Oracle 10i and 11 server. 10.x and 11.2.0.1.0 thin JDBC driver
Reporter: Jeremy Bauer
Assignee: Jeremy Bauer
Many variations of org.apache.openjpa.persistence.xmlmapping.query.TestXMLCustomerOrder are failing on Oracle with this exception:
<openjpa-2.0.0-SNAPSHOT-rexported nonfatal general error> org.apache.openjpa.persistence.PersistenceException: Invalid column type: getCLOB not implemented for class oracle.jdbc.driver.T4CVarcharAccessor
<snip/>
Caused by: java.sql.SQLException: Invalid column type: getCLOB not implemented for class oracle.jdbc.driver.T4CVarcharAccessor
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
at oracle.jdbc.driver.Accessor.unimpl(Accessor.java:358)
at oracle.jdbc.driver.Accessor.getCLOB(Accessor.java:1328)
at oracle.jdbc.driver.OracleResultSetImpl.getCLOB(OracleResultSetImpl.java:1305)
at oracle.jdbc.driver.OracleResultSetImpl.getClob(OracleResultSetImpl.java:1471)
at org.apache.commons.dbcp.DelegatingResultSet.getClob(DelegatingResultSet.java:515)
at org.apache.openjpa.lib.jdbc.DelegatingResultSet.getClob(DelegatingResultSet.java:612)
at org.apache.openjpa.jdbc.sql.DBDictionary.getClob(DBDictionary.java:690)
at org.apache.openjpa.jdbc.sql.OracleDictionary.getClobString(OracleDictionary.java:562)
at org.apache.openjpa.jdbc.sql.ResultSetResult.getStringInternal(ResultSetResult.java:471)
at org.apache.openjpa.jdbc.sql.ResultSetResult.getObjectInternal(ResultSetResult.java:399)
at org.apache.openjpa.jdbc.sql.AbstractResult.getObject(AbstractResult.java:696)
at org.apache.openjpa.jdbc.meta.strats.HandlerStrategies.loadDataStore(HandlerStrategies.java:220)
at org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy.load(HandlerFieldStrategy.java:186)
at org.apache.openjpa.jdbc.meta.FieldMapping.load(FieldMapping.java:913)
at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:1021)
at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:973)
at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initializeState(JDBCStoreManager.java:393)
at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initialize(JDBCStoreManager.java:292)
<snip/>
The Oracle driver does not allow the clob operations to operate on fields of XMLType. OpenJPA maps fields of type XMLType to CLOB and uses CLOB getter/setters, resulting in the exception above. The mapping should be changed such that the CLOB operations are not used for XML data.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (OPENJPA-1289) Oracle driver throws exception due
to incorrect mapping of XMLType column
Posted by "Jeremy Bauer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1289?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jeremy Bauer resolved OPENJPA-1289.
-----------------------------------
Resolution: Fixed
Fix Version/s: 2.0.0
This problem has been fixed by Catalina under OPENJPA-1461. Thanks, Milosz for keeping an eye on these issues.
> Oracle driver throws exception due to incorrect mapping of XMLType column
> -------------------------------------------------------------------------
>
> Key: OPENJPA-1289
> URL: https://issues.apache.org/jira/browse/OPENJPA-1289
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 2.0.0
> Environment: Oracle 10i and 11 server. 10.x and 11.2.0.1.0 thin JDBC driver
> Reporter: Jeremy Bauer
> Assignee: Jeremy Bauer
> Fix For: 2.0.0
>
>
> Many variations of org.apache.openjpa.persistence.xmlmapping.query.TestXMLCustomerOrder are failing on Oracle with this exception:
> <openjpa-2.0.0-SNAPSHOT-rexported nonfatal general error> org.apache.openjpa.persistence.PersistenceException: Invalid column type: getCLOB not implemented for class oracle.jdbc.driver.T4CVarcharAccessor
> <snip/>
> Caused by: java.sql.SQLException: Invalid column type: getCLOB not implemented for class oracle.jdbc.driver.T4CVarcharAccessor
> at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
> at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
> at oracle.jdbc.driver.Accessor.unimpl(Accessor.java:358)
> at oracle.jdbc.driver.Accessor.getCLOB(Accessor.java:1328)
> at oracle.jdbc.driver.OracleResultSetImpl.getCLOB(OracleResultSetImpl.java:1305)
> at oracle.jdbc.driver.OracleResultSetImpl.getClob(OracleResultSetImpl.java:1471)
> at org.apache.commons.dbcp.DelegatingResultSet.getClob(DelegatingResultSet.java:515)
> at org.apache.openjpa.lib.jdbc.DelegatingResultSet.getClob(DelegatingResultSet.java:612)
> at org.apache.openjpa.jdbc.sql.DBDictionary.getClob(DBDictionary.java:690)
> at org.apache.openjpa.jdbc.sql.OracleDictionary.getClobString(OracleDictionary.java:562)
> at org.apache.openjpa.jdbc.sql.ResultSetResult.getStringInternal(ResultSetResult.java:471)
> at org.apache.openjpa.jdbc.sql.ResultSetResult.getObjectInternal(ResultSetResult.java:399)
> at org.apache.openjpa.jdbc.sql.AbstractResult.getObject(AbstractResult.java:696)
> at org.apache.openjpa.jdbc.meta.strats.HandlerStrategies.loadDataStore(HandlerStrategies.java:220)
> at org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy.load(HandlerFieldStrategy.java:186)
> at org.apache.openjpa.jdbc.meta.FieldMapping.load(FieldMapping.java:913)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:1021)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:973)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initializeState(JDBCStoreManager.java:393)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initialize(JDBCStoreManager.java:292)
> <snip/>
> The Oracle driver does not allow the clob operations to operate on fields of XMLType. OpenJPA maps fields of type XMLType to CLOB and uses CLOB getter/setters, resulting in the exception above. The mapping should be changed such that the CLOB operations are not used for XML data.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-1289) Oracle driver throws exception due
to incorrect mapping of XMLType column
Posted by "Milosz Tylenda (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12798339#action_12798339 ]
Milosz Tylenda commented on OPENJPA-1289:
-----------------------------------------
Hi Jeremy. Are you still seeing the failure?
I noticed that for some reason the test case fails at table creation phase because it started adding column length to XMLTYPE:
PersistenceException: ORA-00907: missing right parenthesis
{stmnt 16108506 CREATE TABLE TORDER (oid NUMBER NOT NULL, amount NUMBER, delivered NUMBER, shipAddress XMLType(255), version NUMBER, CUSTOMER_COUNTRYCODE VARCHAR2(255), CUSTOMER_ID NUMBER, PRIMARY KEY (oid))} [code=907, state=42000]
It helped to add "XMLTYPE" to fixedSizeTypeNameSet. After that the test passes (I executed it from Eclipse).
My environment is Java 5, Oracle 10g Express Edition Release 10.2.0.1.0, Oracle JDBC driver 10.2.0.3.0
> Oracle driver throws exception due to incorrect mapping of XMLType column
> -------------------------------------------------------------------------
>
> Key: OPENJPA-1289
> URL: https://issues.apache.org/jira/browse/OPENJPA-1289
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 2.0.0
> Environment: Oracle 10i and 11 server. 10.x and 11.2.0.1.0 thin JDBC driver
> Reporter: Jeremy Bauer
> Assignee: Jeremy Bauer
>
> Many variations of org.apache.openjpa.persistence.xmlmapping.query.TestXMLCustomerOrder are failing on Oracle with this exception:
> <openjpa-2.0.0-SNAPSHOT-rexported nonfatal general error> org.apache.openjpa.persistence.PersistenceException: Invalid column type: getCLOB not implemented for class oracle.jdbc.driver.T4CVarcharAccessor
> <snip/>
> Caused by: java.sql.SQLException: Invalid column type: getCLOB not implemented for class oracle.jdbc.driver.T4CVarcharAccessor
> at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
> at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
> at oracle.jdbc.driver.Accessor.unimpl(Accessor.java:358)
> at oracle.jdbc.driver.Accessor.getCLOB(Accessor.java:1328)
> at oracle.jdbc.driver.OracleResultSetImpl.getCLOB(OracleResultSetImpl.java:1305)
> at oracle.jdbc.driver.OracleResultSetImpl.getClob(OracleResultSetImpl.java:1471)
> at org.apache.commons.dbcp.DelegatingResultSet.getClob(DelegatingResultSet.java:515)
> at org.apache.openjpa.lib.jdbc.DelegatingResultSet.getClob(DelegatingResultSet.java:612)
> at org.apache.openjpa.jdbc.sql.DBDictionary.getClob(DBDictionary.java:690)
> at org.apache.openjpa.jdbc.sql.OracleDictionary.getClobString(OracleDictionary.java:562)
> at org.apache.openjpa.jdbc.sql.ResultSetResult.getStringInternal(ResultSetResult.java:471)
> at org.apache.openjpa.jdbc.sql.ResultSetResult.getObjectInternal(ResultSetResult.java:399)
> at org.apache.openjpa.jdbc.sql.AbstractResult.getObject(AbstractResult.java:696)
> at org.apache.openjpa.jdbc.meta.strats.HandlerStrategies.loadDataStore(HandlerStrategies.java:220)
> at org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy.load(HandlerFieldStrategy.java:186)
> at org.apache.openjpa.jdbc.meta.FieldMapping.load(FieldMapping.java:913)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:1021)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:973)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initializeState(JDBCStoreManager.java:393)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initialize(JDBCStoreManager.java:292)
> <snip/>
> The Oracle driver does not allow the clob operations to operate on fields of XMLType. OpenJPA maps fields of type XMLType to CLOB and uses CLOB getter/setters, resulting in the exception above. The mapping should be changed such that the CLOB operations are not used for XML data.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1289) Oracle driver throws exception due
to incorrect mapping of XMLType column
Posted by "Milosz Tylenda (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1289?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Milosz Tylenda updated OPENJPA-1289:
------------------------------------
Fix Version/s: 1.3.0
Applied a similar fix to the 1.3.x branch.
> Oracle driver throws exception due to incorrect mapping of XMLType column
> -------------------------------------------------------------------------
>
> Key: OPENJPA-1289
> URL: https://issues.apache.org/jira/browse/OPENJPA-1289
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 2.0.0-M3
> Environment: Oracle 10i and 11 server. 10.x and 11.2.0.1.0 thin JDBC driver
> Reporter: Jeremy Bauer
> Assignee: Jeremy Bauer
> Fix For: 1.3.0, 2.0.0-beta
>
>
> Many variations of org.apache.openjpa.persistence.xmlmapping.query.TestXMLCustomerOrder are failing on Oracle with this exception:
> <openjpa-2.0.0-SNAPSHOT-rexported nonfatal general error> org.apache.openjpa.persistence.PersistenceException: Invalid column type: getCLOB not implemented for class oracle.jdbc.driver.T4CVarcharAccessor
> <snip/>
> Caused by: java.sql.SQLException: Invalid column type: getCLOB not implemented for class oracle.jdbc.driver.T4CVarcharAccessor
> at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
> at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
> at oracle.jdbc.driver.Accessor.unimpl(Accessor.java:358)
> at oracle.jdbc.driver.Accessor.getCLOB(Accessor.java:1328)
> at oracle.jdbc.driver.OracleResultSetImpl.getCLOB(OracleResultSetImpl.java:1305)
> at oracle.jdbc.driver.OracleResultSetImpl.getClob(OracleResultSetImpl.java:1471)
> at org.apache.commons.dbcp.DelegatingResultSet.getClob(DelegatingResultSet.java:515)
> at org.apache.openjpa.lib.jdbc.DelegatingResultSet.getClob(DelegatingResultSet.java:612)
> at org.apache.openjpa.jdbc.sql.DBDictionary.getClob(DBDictionary.java:690)
> at org.apache.openjpa.jdbc.sql.OracleDictionary.getClobString(OracleDictionary.java:562)
> at org.apache.openjpa.jdbc.sql.ResultSetResult.getStringInternal(ResultSetResult.java:471)
> at org.apache.openjpa.jdbc.sql.ResultSetResult.getObjectInternal(ResultSetResult.java:399)
> at org.apache.openjpa.jdbc.sql.AbstractResult.getObject(AbstractResult.java:696)
> at org.apache.openjpa.jdbc.meta.strats.HandlerStrategies.loadDataStore(HandlerStrategies.java:220)
> at org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy.load(HandlerFieldStrategy.java:186)
> at org.apache.openjpa.jdbc.meta.FieldMapping.load(FieldMapping.java:913)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:1021)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:973)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initializeState(JDBCStoreManager.java:393)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initialize(JDBCStoreManager.java:292)
> <snip/>
> The Oracle driver does not allow the clob operations to operate on fields of XMLType. OpenJPA maps fields of type XMLType to CLOB and uses CLOB getter/setters, resulting in the exception above. The mapping should be changed such that the CLOB operations are not used for XML data.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1289) Oracle driver throws exception due
to incorrect mapping of XMLType column
Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1289?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Donald Woods updated OPENJPA-1289:
----------------------------------
Affects Version/s: (was: 2.0.0)
2.0.0-M3
Fix Version/s: (was: 2.0.0)
2.0.0-beta
> Oracle driver throws exception due to incorrect mapping of XMLType column
> -------------------------------------------------------------------------
>
> Key: OPENJPA-1289
> URL: https://issues.apache.org/jira/browse/OPENJPA-1289
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 2.0.0-M3
> Environment: Oracle 10i and 11 server. 10.x and 11.2.0.1.0 thin JDBC driver
> Reporter: Jeremy Bauer
> Assignee: Jeremy Bauer
> Fix For: 2.0.0-beta
>
>
> Many variations of org.apache.openjpa.persistence.xmlmapping.query.TestXMLCustomerOrder are failing on Oracle with this exception:
> <openjpa-2.0.0-SNAPSHOT-rexported nonfatal general error> org.apache.openjpa.persistence.PersistenceException: Invalid column type: getCLOB not implemented for class oracle.jdbc.driver.T4CVarcharAccessor
> <snip/>
> Caused by: java.sql.SQLException: Invalid column type: getCLOB not implemented for class oracle.jdbc.driver.T4CVarcharAccessor
> at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
> at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
> at oracle.jdbc.driver.Accessor.unimpl(Accessor.java:358)
> at oracle.jdbc.driver.Accessor.getCLOB(Accessor.java:1328)
> at oracle.jdbc.driver.OracleResultSetImpl.getCLOB(OracleResultSetImpl.java:1305)
> at oracle.jdbc.driver.OracleResultSetImpl.getClob(OracleResultSetImpl.java:1471)
> at org.apache.commons.dbcp.DelegatingResultSet.getClob(DelegatingResultSet.java:515)
> at org.apache.openjpa.lib.jdbc.DelegatingResultSet.getClob(DelegatingResultSet.java:612)
> at org.apache.openjpa.jdbc.sql.DBDictionary.getClob(DBDictionary.java:690)
> at org.apache.openjpa.jdbc.sql.OracleDictionary.getClobString(OracleDictionary.java:562)
> at org.apache.openjpa.jdbc.sql.ResultSetResult.getStringInternal(ResultSetResult.java:471)
> at org.apache.openjpa.jdbc.sql.ResultSetResult.getObjectInternal(ResultSetResult.java:399)
> at org.apache.openjpa.jdbc.sql.AbstractResult.getObject(AbstractResult.java:696)
> at org.apache.openjpa.jdbc.meta.strats.HandlerStrategies.loadDataStore(HandlerStrategies.java:220)
> at org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy.load(HandlerFieldStrategy.java:186)
> at org.apache.openjpa.jdbc.meta.FieldMapping.load(FieldMapping.java:913)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:1021)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:973)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initializeState(JDBCStoreManager.java:393)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initialize(JDBCStoreManager.java:292)
> <snip/>
> The Oracle driver does not allow the clob operations to operate on fields of XMLType. OpenJPA maps fields of type XMLType to CLOB and uses CLOB getter/setters, resulting in the exception above. The mapping should be changed such that the CLOB operations are not used for XML data.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.