mirror of https://github.com/apache/openjpa.git
OPENJPA-1837 - reset Oracle dictionary maxEmbedded*lobSize = -1 for jdbc driver (11.2.0.x) that can handle *lob size > 4000 characters.
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1023925 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
60e88f82fa
commit
fdf58d63ba
|
@ -227,9 +227,15 @@ public class OracleDictionary
|
|||
if (metadataClassName.startsWith("oracle.")
|
||||
|| url.indexOf("jdbc:oracle:") != -1
|
||||
|| "Oracle JDBC driver".equals(driverName)) {
|
||||
driverVendor = VENDOR_ORACLE + meta.getDriverMajorVersion()
|
||||
+ meta.getDriverMinorVersion();
|
||||
int jdbcMajor = meta.getDriverMajorVersion();
|
||||
int jdbcMinor = meta.getDriverMinorVersion();
|
||||
driverVendor = VENDOR_ORACLE + jdbcMajor + jdbcMinor;
|
||||
|
||||
int jdbcVersion = jdbcMajor * 1000 + jdbcMinor;
|
||||
if( jdbcVersion >= 11002) {
|
||||
maxEmbeddedBlobSize = -1;
|
||||
maxEmbeddedClobSize = -1;
|
||||
}
|
||||
String productVersion = meta.getDatabaseProductVersion()
|
||||
.split("Release ",0)[1].split("\\.",0)[0];
|
||||
int release = Integer.parseInt(productVersion);
|
||||
|
|
|
@ -658,7 +658,7 @@
|
|||
<oracle.maven.repo>http://not.a.real.repository</oracle.maven.repo>
|
||||
<oracle.groupid>com.oracle</oracle.groupid>
|
||||
<oracle.artifactid>jdbc-driver</oracle.artifactid>
|
||||
<oracle.version>10g</oracle.version>
|
||||
<oracle.version>11.2.0.1-jdbc6</oracle.version>
|
||||
<connection.driver.name>oracle.jdbc.driver.OracleDriver</connection.driver.name>
|
||||
<!--<connection.url>jdbc:oracle:thin:@localhost:1521:OPENJPA</connection.url>-->
|
||||
<connection.url>${openjpa.oracle.url}</connection.url>
|
||||
|
|
|
@ -1139,11 +1139,11 @@ List results = query.getResultList();
|
|||
<listitem>
|
||||
<para>
|
||||
The Oracle JDBC driver has significant differences between different versions.
|
||||
It is important to use the officially supported version of the driver
|
||||
(10.2.0.1.0), which is backward compatible with previous versions of the Oracle
|
||||
It is important to use the officially supported version of the drivers
|
||||
(10.2.0.1.0/11.2.0.x.0), which is backward compatible with previous versions of the Oracle
|
||||
server. It can be downloaded from
|
||||
<ulink url="http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc101040.html">
|
||||
http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc101040.html</ulink>.
|
||||
<ulink url="http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html">
|
||||
http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html</ulink>.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
|
@ -1211,7 +1211,22 @@ openjpa.ConnectionRetainMode: always
|
|||
Mapping persistent attributes to <link linkend="ref_guide_xmlmapping">XML columns</link> requires
|
||||
a JDBC 4 compliant driver if XML strings are longer than 4000 bytes, as counted in database.
|
||||
Otherwise an <literal>ORA-01461: can bind a LONG value only for insert into a LONG column</literal>
|
||||
error may result.
|
||||
error may result. This limitation is removed in Oracle jdbc driver 11.2.0.x.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
If Oracle dictionary property <literal>MaxEmbeddedBlobSize</literal> or
|
||||
<literal>MaxEmbeddedClobSize</literal> is set to some limit (i.e. not -1) and embedded collection
|
||||
with blob/clob attribute is used, a
|
||||
<literal>"org.apache.openjpa.persistence.ArgumentException:
|
||||
"x.y.z.EmbedOwner.embedCollection<element:class x.y.z.EmbedValue>"
|
||||
is mapped as embedded, but embedded field
|
||||
"x.y.z.EmbedOwner.embedCollection.x.y.z.EmbedValue.blob" is not embeddable.
|
||||
Embedded element/key/value types are limited to simple fields and direct relations to other
|
||||
persistent types"</literal> error may result. To overcome this limitation, either use jdbc driver
|
||||
11.2.0.x.0 (or later version) or set both <literal>MaxEmbeddedBlobSize</literal> and
|
||||
<literal>MaxEmbeddedClobSize</literal> oracle dictiionary properties to -1.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
|
Loading…
Reference in New Issue