Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 338585 - Issue while inserting blobs with delimited identifiers on Oracle Database
Summary: Issue while inserting blobs with delimited identifiers on Oracle Database
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-01 15:31 EST by Mitesh Meswani CLA
Modified: 2022-06-09 10:30 EDT (History)
1 user (show)

See Also:


Attachments
testapp sources with build scripts to reproduce the issue (17.48 KB, application/x-zip-compressed)
2011-03-01 15:31 EST, Mitesh Meswani CLA
no flags Details
Proposed patch to Oracle10Platform (1.06 KB, patch)
2011-03-01 15:38 EST, Mitesh Meswani CLA
no flags Details | Diff
proposed fix and test case (13.52 KB, patch)
2011-03-07 11:52 EST, Chris Delahunt CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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