Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 6.1.1 CE GA2, 6.1.20 EE GA2
-
Fix Version/s: 6.1.X EE, 6.2.0 CE M5
-
Component/s: Infrastructure, Infrastructure > ORM
-
Environment:Upgrade from 6.1.0 CE GA1 to 6.1.1 CE GA2
-
Branch Version/s:6.1.x
-
Backported to Branch:Committed
-
Similar Issues:
Description
Various columns in the DLFileEntry-table are created as nvarchar with SQL type -9.
When the UpgradeProcess is running, the UpgradeOptimizedResultSetHandler throws an UpgradeException due to unsupported class type -9.
Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: Upgrade code using unsupported class type -9
at com.liferay.portal.kernel.upgrade.dao.orm.UpgradeOptimizedResultSetHandler._getValue(UpgradeOptimizedResultSetHandler.java:243)
at com.liferay.portal.kernel.upgrade.dao.orm.UpgradeOptimizedResultSetHandler._cacheColumnValues(UpgradeOptimizedResultSetHandler.java:193)
at com.liferay.portal.kernel.upgrade.dao.orm.UpgradeOptimizedResultSetHandler.invoke(UpgradeOptimizedResultSetHandler.java:80)
... 35 more

After creating a local fix for the UpgradeOptimizedResultSetHandler to start to support data class type -9 (NVARCHAR) I got an expection with type -16:
The UpgradeOptimizedResultSetHandler only supports the following java.sql.Types.
Types.BIGINT
Types.BIT
Types.BLOB
Types.BOOLEAN
Types.CLOB
Types.DOUBLE
Types.FLOAT
Types.INTEGER
Types.NUMERIC
Types.SMALLINT
Types.TIMESTAMP
Types.VARCHAR
Since Java 1.6 addition types were added to support JDBC 4.0.
public final static int BOOLEAN = 16;
public final static int DATALINK = 70;
public final static int ROWID = -8;
public static final int LONGNVARCHAR = -16;
public static final int NCHAR = -15;
public static final int NCLOB = 2011;
public static final int NVARCHAR = -9;
public static final int SQLXML = 2009;
Using a JDBC 4.0 Driver iwth a properly implemented ResultSetMetaData would these kind of exceptions.
(Note even more types are availabe in the java.sql.Types 1.6 and 1.7)