Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 338585

Summary: Issue while inserting blobs with delimited identifiers on Oracle Database
Product: z_Archived Reporter: Mitesh Meswani <mitesh.meswani>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: christopher.delahunt
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
testapp sources with build scripts to reproduce the issue
none
Proposed patch to Oracle10Platform
none
proposed fix and test case none

Description Mitesh Meswani CLA 2011-03-01 15:31:51 EST
Created attachment 190086 [details]
testapp sources with build scripts to reproduce the issue

We have an issue while inserting LOBs in Oracle when delimited identifiers are in effect.  The issue is caused at following line in Oracle10Platform  (Line 70 in my workspace) We get  exception at [1] while executing it

    java.sql.Blob blob = (java.sql.Blob)resultSet.getObject(field.getNameDelimited(this));

Attached is a test case that reproduces the issue. To execute unzip and modify build.properties and test.properties for your environment and execute "ant run"

This results in GlassFish issue http://java.net/jira/browse/GLASSFISH-16079

[1] Exception stack
[java] Caused by: java.sql.SQLException: Invalid column name     [java]
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)     [java]
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)     [java]
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227)     [java]
at oracle.jdbc.driver.OracleStatement.get_column_index(OracleStatement.java:3047)     [java]
at oracle.jdbc.driver.OracleResultSetImpl.findColumn(OracleResultSetImpl.java:1861)     [java]
at oracle.jdbc.driver.OracleResultSet.getObject(OracleResultSet.java:1547)     [java]
at org.eclipse.persistence.platform.database.oracle.Oracle10Platform.writeLOB(Oracle10Platform.java:70)     [java]
at org.eclipse.persistence.internal.helper.LOBValueWriter.fetchLocatorAndWriteValue(LOBValueWriter.java:92)     [java]
Comment 1 Mitesh Meswani CLA 2011-03-01 15:38:14 EST
Created attachment 190088 [details]
Proposed patch to Oracle10Platform

Proposed Patch to Oracle10Platform. Please note that as suggested by Chris, similar changes might be needed for Oracle8Plaform also.
Comment 2 Chris Delahunt CLA 2011-03-07 11:52:10 EST
Created attachment 190569 [details]
proposed fix and test case

patch contains fixes to Oracle8Platform and Oracle10Platform for both blobs and clobs, as well as the test case to be commited.
Comment 3 Chris Delahunt CLA 2011-03-07 13:17:55 EST
fix checked into trunk (2.3) revision 9083 and into 2.2.1 revision 9084
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:16:57 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 5 Eclipse Webmaster CLA 2022-06-09 10:30:41 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink