Details
-
Bug
-
Status: Closed
-
Resolution: Won't Fix
-
7.0.X, Master
-
None
-
None
-
3
-
Database Upgrade
Description
Preconditions:
- Database upgrading from 6.2 to 7.0
- Some content recorded using a clob structure with a size >= 4000 bytes
- RDBMS Oracle using a ojdbc7.jar driver library.
Important: There may be other RDBMS in a similar issue.
Steps to reproduce:
- Launch an upgrade process from 6.2 to 7.0 using Liferay upgrade client.
Expected behaviour:
- Upgrade process ends without any errors.
Observed behaviour:
- Some entities generate errors during upgrade because of data retrieval is truncated.
Example:Caused by: com.liferay.portal.kernel.xml.DocumentException: Error on line 66 of document : XML document structures must start and end within the same entity. Nested exception: XML document structures must start and end within the same entity. at com.liferay.portal.xml.SAXReaderImpl.read(SAXReaderImpl.java:408) at com.liferay.portal.xml.SAXReaderImpl.read(SAXReaderImpl.java:384) at com.liferay.portal.xml.SAXReaderImpl.read(SAXReaderImpl.java:419) at com.liferay.portal.kernel.xml.SAXReaderUtil.read(SAXReaderUtil.java:165) at com.liferay.journal.internal.upgrade.v0_0_5.UpgradeJournal.convertStaticContentToDynamic(UpgradeJournal.java:237) at com.liferay.journal.internal.upgrade.v0_0_5.UpgradeJournal.updateJournalArticles(UpgradeJournal.java
Root cause:
Our code uses
java.sql.ResultSet.getString(String)
method instead of
java.sql.ResultSet.getClob(String)
for data retrieval from clob columns.
Under some context, getString(String) method gets truncated data.
See also: https://docs.oracle.com/javase/8/docs/api/java/sql/Clob.html
Workaround:
Oracle Support admits some bugs using getString(String) method under ojdbc7.jar driver library.
Oracle Support recommends using ojdbc8.jar driver library with at least Oracle 12.2.0.1.0 JDBC 4.2 versioning.
Attachments
Issue Links
- relates
-
LPS-82184 Oracle database does not support extremely large string as a query.
- Closed
-
LRDOCS-5275 Oracle ojdbc7.jar driver truncates large data retrievals that use getString(String)
-
- Closed
-