openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1833076 - /openjpa/branches/2.4.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java
Date Wed, 06 Jun 2018 19:23:35 GMT
Author: struberg
Date: Wed Jun  6 19:23:34 2018
New Revision: 1833076

URL: http://svn.apache.org/viewvc?rev=1833076&view=rev
Log:
OPENJPA-2690 OPENJPA-2691 modern Oracle LOB handling

ported over the fix from cschneider from trunk.
Thanks to Matt Pavlovich (apacheId mattrpav) for the report!

apparently I picked up the wrong file in my previous commit

Modified:
    openjpa/branches/2.4.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java

Modified: openjpa/branches/2.4.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/branches/2.4.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java?rev=1833076&r1=1833075&r2=1833076&view=diff
==============================================================================
--- openjpa/branches/2.4.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java
(original)
+++ openjpa/branches/2.4.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java
Wed Jun  6 19:23:34 2018
@@ -241,8 +241,8 @@ public class OracleDictionary
             // all fine
         }
 
-        oracleClob_empty_lob_Method = getMethodByReflection("oracle.sql.CLOB", "empty_lob");
-        oracleBlob_empty_lob_Method = getMethodByReflection("oracle.sql.BLOB", "empty_lob");
+        oracleClob_empty_lob_Method = getMethodByReflection("oracle.sql.CLOB", "getEmptyCLOB");
+        oracleBlob_empty_lob_Method = getMethodByReflection("oracle.sql.BLOB", "getEmptyBLOB");
         oracleClob_isEmptyLob_Method = getMethodByReflection("oracle.sql.CLOB", "isEmptyLob");
 
     }
@@ -1267,6 +1267,10 @@ public class OracleDictionary
         throws SQLException {
         if (EMPTY_CLOB != null)
             return EMPTY_CLOB;
+
+        if (oracleClob_empty_lob_Method == null)
+            return null;       
+
         try {
             return EMPTY_CLOB = (Clob) oracleClob_empty_lob_Method.invoke(null, new Object[0]);
         } catch (Exception e) {
@@ -1278,6 +1282,10 @@ public class OracleDictionary
         throws SQLException {
         if (EMPTY_BLOB != null)
             return EMPTY_BLOB;
+
+	if (oracleBlob_empty_lob_Method == null)
+            return null;
+
         try {
             return EMPTY_BLOB = (Blob) oracleBlob_empty_lob_Method.invoke(null, new Object[0]);
         } catch (Exception e) {



Mime
View raw message