Fixes are available
7.0.0.21: WebSphere Application Server V7.0 Fix Pack 21
8.0.0.2: WebSphere Application Server V8.0 Fix Pack 2
8.0.0.3: WebSphere Application Server V8.0 Fix Pack 3
7.0.0.23: WebSphere Application Server V7.0 Fix Pack 23
8.0.0.4: WebSphere Application Server V8.0 Fix Pack 4
7.0.0.25: WebSphere Application Server V7.0 Fix Pack 25
8.0.0.5: WebSphere Application Server V8.0 Fix Pack 5
7.0.0.27: WebSphere Application Server V7.0 Fix Pack 27
8.0.0.6: WebSphere Application Server V8.0 Fix Pack 6
7.0.0.29: WebSphere Application Server V7.0 Fix Pack 29
8.0.0.7: WebSphere Application Server V8.0 Fix Pack 7
8.0.0.8: WebSphere Application Server V8.0 Fix Pack 8
7.0.0.31: WebSphere Application Server V7.0 Fix Pack 31
7.0.0.27: Java SDK 1.6 SR13 FP2 Cumulative Fix for WebSphere Application Server
7.0.0.33: WebSphere Application Server V7.0 Fix Pack 33
8.0.0.9: WebSphere Application Server V8.0 Fix Pack 9
7.0.0.35: WebSphere Application Server V7.0 Fix Pack 35
8.0.0.10: WebSphere Application Server V8.0 Fix Pack 10
7.0.0.37: WebSphere Application Server V7.0 Fix Pack 37
8.0.0.11: WebSphere Application Server V8.0 Fix Pack 11
7.0.0.39: WebSphere Application Server V7.0 Fix Pack 39
8.0.0.12: WebSphere Application Server V8.0 Fix Pack 12
7.0.0.41: WebSphere Application Server V7.0 Fix Pack 41
8.0.0.13: WebSphere Application Server V8.0 Fix Pack 13
7.0.0.43: WebSphere Application Server V7.0 Fix Pack 43
8.0.0.14: WebSphere Application Server V8.0 Fix Pack 14
7.0.0.45: WebSphere Application Server V7.0 Fix Pack 45
8.0.0.15: WebSphere Application Server V8.0 Fix Pack 15
7.0.0.21: Java SDK 1.6 SR9 FP2 Cumulative Fix for WebSphere
7.0.0.23: Java SDK 1.6 SR10 FP1 Cumulative Fix for WebSphere
7.0.0.25: Java SDK 1.6 SR11 Cumulative Fix for WebSphere Application Server
7.0.0.27: Java SDK 1.6 SR12 Cumulative Fix for WebSphere Application Server
7.0.0.29: Java SDK 1.6 SR13 FP2 Cumulative Fix for WebSphere Application Server
7.0.0.45: Java SDK 1.6 SR16 FP60 Cumulative Fix for WebSphere Application Server
7.0.0.31: Java SDK 1.6 SR15 Cumulative Fix for WebSphere Application Server
7.0.0.35: Java SDK 1.6 SR16 FP1 Cumulative Fix for WebSphere Application Server
7.0.0.37: Java SDK 1.6 SR16 FP3 Cumulative Fix for WebSphere Application Server
7.0.0.39: Java SDK 1.6 SR16 FP7 Cumulative Fix for WebSphere Application Server
7.0.0.41: Java SDK 1.6 SR16 FP20 Cumulative Fix for WebSphere Application Server
7.0.0.43: Java SDK 1.6 SR16 FP41 Cumulative Fix for WebSphere Application Server
APAR status
Closed as program error.
Error description
When using OpenJPA and persisting more than 4000 charaters to an Oracle XMLType the customer sees the following exception: ORA-01461: can bind a LONG value only for insert into a LONG column
Local fix
N/A
Problem summary
**************************************************************** * USERS AFFECTED: All users of IBM WebSphere Application * * Server V7.0.0 and V8.0.0 who make use of * * Oracle XMLType columns and attempt to * * store more than 4000 charaters in the * * column. * **************************************************************** * PROBLEM DESCRIPTION: Oracle XMLType column failed to * * insert/update when xml contains more * * than 4000 characters. * **************************************************************** * RECOMMENDATION: * **************************************************************** Oracle throws the following exception when XML content is greater than 4000 characters: ORA-01461: can bind a LONG value only for insert into a LONG column. This exception is due to the way OpenJPA retrieves the XML data from the Oracle database (i.e. it uses a 'getStringVal' method on the JDBC driver).
Problem conclusion
With this fix, code has been added which allows OpenJPA to use a Reader-based JDBC 4.0 method to set XML data. This allows XMLType values larger than 4000 characters to be successfully updated or inserted. There are a number of restrictions for this fix, as will be described now. The code for the fix requires an Oracle JDBC 4.0 level driver (e.g. ojdbc6.jar). Also note that it is not enough to simply get the Oracle JDBC 4 drivers, but the Oracle DB version must also support the JDBC 4 drivers and contain the code to allow XML content greater than 4000 characters (e.g. driver version 11.2.0.1.0). On WebSphere Application Server V7.0.0, the code changes are gated (enabled/disabled) via a system property. On WebSphere Application Server V8.0.0, the code changes are applied by default, and the system property described shortly should be removed from any application which used the property on V7.0.0; setting the property on V8.0.0 will result in a warning message. The system property is named 'supportsSetClob' and is defined on OpenJPA's Oracle dictionary class. As an example, the property can be defined as follows in a persistence.xml file: <property ‚  name="openjpa.jdbc.DBDictionary" ‚  value="oracle(s sSetClob=true)"/> ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   Next, it should be noted that OpenJPA code expects the ‚  XML field(s) ‚  to ‚  be ‚  annotated ‚  with the following: ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   @Strategy("org.apache.openjpa.jdbc.meta.strats.XMLValueHandler") ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   This allows a user to indicate that OpenJPA should use JAXB classmetadata to perform the to/from database value retrieval and storage. In addition, using this strategy indicates there is an XMLType used to store the value in the database. Instead, we've seen customers attempt to managing their own XML string, mapped to a string field, and expect the code changes of this fix to apply. While an appliation may have an XMLType specified in the column definition, OpenJPA cannot count on this data to detect whether the column is really an XML column in the database (the table could have been created manually ‚  with ‚  separate ‚  DDL ‚  instead ‚  of ‚  using ‚ tool). In the case where the user is doing their own String mapping rather than using the XMLValueHandler, there are some additional settings a user may need to set/enable in order to resolve the issue addressed in this fix. The necessary settings/actions are as follows: First, it may be necessary to annotate an XML field with @Lob, ‚  as ‚  follows: ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   @Lob ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   @Column(name="CONTENTS_XML", ‚  columnDefinition ‚  ="XMLCOLUMN e") ‚   private ‚  String ‚  contentsXml; ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚ ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   Second, in ‚  addition ‚  to ‚  annotating the XML field with @L user may also need to set this dictionary property: ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   maxEmbeddedClobSize=-1 ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚ ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   Therefore, ‚  the ‚  final ‚  DBDictionary ‚  property ‚  would ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   <property ‚  name="openjpa.jdbc.DBDictionary" ‚  value="oracle(s sSetClob=true,maxEmbeddedClobSize=-1)"/> ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   Finally, ‚  a user may need to ‚  use ‚  the ‚  native schema factory ‚  to ‚  pick ‚  up ‚  the ‚  XMLType ‚  from ‚  the ‚   that ‚  property ‚  is ‚  as ‚  follows: ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   <property ‚  name="openjpa.jdbc.SchemaFactory" ‚  value="native" ‚   ‚   ‚   ‚   ‚   ‚   ‚   ‚   By ‚  enabling ‚  OpenJPA's native schema factory, the database column type can be detected as XMLType. The fix for this APAR is currently targeted for inclusion in Service Levels (Fix Packs) 7.0.0.21 and 8.0.0.2 of WebSphere Application Server versions 7.0.0 and 8.0.0. Please refer to the recommended updates page for delivery information: http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
Temporary fix
Comments
APAR Information
APAR number
PM41128
Reported component name
WEBS APP SERV N
Reported component ID
5724H8800
Reported release
700
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2011-06-08
Closed date
2011-09-30
Last modified date
2011-09-30
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
PM43675
Fix information
Fixed component name
WEBS APP SERV N
Fixed component ID
5724H8800
Applicable component levels
R700 PSY
UP
R800 PSY
UP
Document Information
Modified date:
27 October 2021