Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Juanma Lopez
UndeclaredThrowableEx upgrading CE 6.1 from 6.0.6
September 18, 2012 3:53 AM
Answer

Juanma Lopez

Rank: New Member

Posts: 5

Join Date: September 18, 2012

Recent Posts

Hi,

I'm trying to upgrade Liferay CE 6.1 from 6.0.6 but throws an exception when upgrading UpgradeCamelCasePortletPreferences. I'm using Liferay bundled on Jboss 7.1.1, downloaded today, over SQL Server 2008.

Previously I had troubles with UpgradeUserName script that I solved running SQL scripts manually. But now, I don't know how I can reproduce the SQL manually or solve it.

Stacktrace:
10:18:02,179 INFO (MSC service thread 1-3) 10:18:02,179 INFO [MSC service thread 1-3][UpgradeProcess:207] Upgrading com.liferay.portal.upgrade.v6_1_0.UpgradeBlogs
10:18:02,196 INFO (MSC service thread 1-3) 10:18:02,196 INFO [MSC service thread 1-3][UpgradeProcess:207] Upgrading com.liferay.portal.upgrade.v6_1_0.UpgradeCamelCasePortletPreferences
10:18:02,438 INFO (MSC service thread 1-3) 10:18:02,437 ERROR [MSC service thread 1-3][MainServlet:217] com.liferay.portal.kernel.events.ActionException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.lang.reflect.UndeclaredThrowableException
10:18:02,439 INFO (MSC service thread 1-3) com.liferay.portal.kernel.events.ActionException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.lang.reflect.UndeclaredThrowableException
10:18:02,440 INFO (MSC service thread 1-3) at com.liferay.portal.events.StartupAction.run(StartupAction.java:58)
10:18:02,441 INFO (MSC service thread 1-3) at com.liferay.portal.servlet.MainServlet.processStartupEvents(MainServlet.java:1306)
10:18:02,441 INFO (MSC service thread 1-3) at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:214)
10:18:02,441 INFO (MSC service thread 1-3) at javax.servlet.GenericServlet.init(GenericServlet.java:242)
10:18:02,442 INFO (MSC service thread 1-3) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1202)
10:18:02,442 INFO (MSC service thread 1-3) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1102)
10:18:02,442 INFO (MSC service thread 1-3) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3655)
10:18:02,443 INFO (MSC service thread 1-3) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3873)
10:18:02,443 INFO (MSC service thread 1-3) at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90)
10:18:02,443 INFO (MSC service thread 1-3) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
10:18:02,444 INFO (MSC service thread 1-3) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
10:18:02,444 INFO (MSC service thread 1-3) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
10:18:02,444 INFO (MSC service thread 1-3) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
10:18:02,444 INFO (MSC service thread 1-3) at java.lang.Thread.run(Thread.java:662)
10:18:02,444 INFO (MSC service thread 1-3) Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.lang.reflect.UndeclaredThrowableException
10:18:02,445 INFO (MSC service thread 1-3) at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:213)
10:18:02,445 INFO (MSC service thread 1-3) at com.liferay.portal.upgrade.UpgradeProcessUtil._upgradeProcess(UpgradeProcessUtil.java:103)
10:18:02,445 INFO (MSC service thread 1-3) at com.liferay.portal.upgrade.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:56)
10:18:02,446 INFO (MSC service thread 1-3) at com.liferay.portal.upgrade.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:36)
10:18:02,446 INFO (MSC service thread 1-3) at com.liferay.portal.events.StartupHelper.upgradeProcess(StartupHelper.java:130)
10:18:02,446 INFO (MSC service thread 1-3) at com.liferay.portal.events.StartupHelperUtil.upgradeProcess(StartupHelperUtil.java:48)
10:18:02,446 INFO (MSC service thread 1-3) at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:129)
10:18:02,447 INFO (MSC service thread 1-3) at com.liferay.portal.events.StartupAction.doRun(StartupAction.java:144)
10:18:02,447 INFO (MSC service thread 1-3) at com.liferay.portal.events.StartupAction.run(StartupAction.java:52)
10:18:02,447 INFO (MSC service thread 1-3) ... 13 more
10:18:02,447 INFO (MSC service thread 1-3) Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: java.lang.reflect.UndeclaredThrowableException
10:18:02,448 INFO (MSC service thread 1-3) at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:213)
10:18:02,448 INFO (MSC service thread 1-3) at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:227)
10:18:02,448 INFO (MSC service thread 1-3) at com.liferay.portal.upgrade.UpgradeProcess_6_1_0.doUpgrade(UpgradeProcess_6_1_0.java:62)
10:18:02,448 INFO (MSC service thread 1-3) at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:210)
10:18:02,449 INFO (MSC service thread 1-3) ... 21 more
10:18:02,449 INFO (MSC service thread 1-3) Caused by: java.lang.reflect.UndeclaredThrowableException
10:18:02,449 INFO (MSC service thread 1-3) at $Proxy291.next(Unknown Source)
10:18:02,449 INFO (MSC service thread 1-3) at com.liferay.portal.kernel.upgrade.BaseUpgradePortletPreferences.updatePortletPreferences(BaseUpgradePortletPreferences.java:238)
10:18:02,450 INFO (MSC service thread 1-3) at com.liferay.portal.kernel.upgrade.BaseUpgradePortletPreferences.doUpgrade(BaseUpgradePortletPreferences.java:43)
10:18:02,450 INFO (MSC service thread 1-3) at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:210)
10:18:02,450 INFO (MSC service thread 1-3) ... 24 more
10:18:02,450 INFO (MSC service thread 1-3) Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: Upgrade code using unsupported class type -9
10:18:02,451 INFO (MSC service thread 1-3) at com.liferay.portal.kernel.upgrade.dao.orm.UpgradeOptimizedResultSetHandler._getValue(UpgradeOptimizedResultSetHandler.java:243)
10:18:02,451 INFO (MSC service thread 1-3) at com.liferay.portal.kernel.upgrade.dao.orm.UpgradeOptimizedResultSetHandler._cacheColumnValues(UpgradeOptimizedResultSetHandler.java:193)
10:18:02,454 INFO (MSC service thread 1-3) at com.liferay.portal.kernel.upgrade.dao.orm.UpgradeOptimizedResultSetHandler.invoke(UpgradeOptimizedResultSetHandler.java:80)
10:18:02,454 INFO (MSC service thread 1-3) ... 28 more
10:18:02,459 INFO (MSC service thread 1-3) Stopping the server due to unexpected startup errors

Can anyone help me?
Thanks!
Juanma Lopez
RE: UndeclaredThrowableEx upgrading CE 6.1 from 6.0.6
September 18, 2012 5:04 AM
Answer

Juanma Lopez

Rank: New Member

Posts: 5

Join Date: September 18, 2012

Recent Posts

Well, I've discovered that the error comes from unsupported SQL column types.
-9 is the code for NVARCHAR (http://docs.oracle.com/javase/6/docs/api/constant-values.html#java.sql.Types). I've changed column type to VARCHAR but similar errors are thrown for same reason.

Why getValue method from com/liferay/portal/kernel/upgrade/dao/orm/UpgradeOptimizedResultSetHandler don't handle all java.sql.Types? Could I replace this class? How?
Cristhian Camilo Lopez
RE: UndeclaredThrowableEx upgrading CE 6.1 from 6.0.6
January 21, 2013 4:39 PM
Answer

Cristhian Camilo Lopez

Rank: New Member

Posts: 15

Join Date: April 10, 2008

Recent Posts

I modified and re-compile the class to solve this issue, I attached it if you're still having the issue. You can replace it on the portal-service.jar file.
Attachments: UpgradeOptimizedResultSetHandler.class (5.8k)