Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Upgrade liferay-portal-6.2-ce-ga6 to liferay-ce-portal-7.0-ga4
Mohammed Rawoof Shaik, geändert vor 8 Jahren.
Junior Member
Beiträge: 37
Beitrittsdatum: 25.09.16
Neueste Beiträge
Hello LR Community,
Requirement:
Upgrade liferay-portal-6.2-ce-ga6 to liferay-ce-portal-7.0-ga4. I've followed the steps and details outlined in this page. I downloaded the items from sourceforge.
Issue:
When I run the tool I get the below error,
Error: Could not find or load main class com.liferay.portal.tools.DBUpgrader
Investigation & Details:
I unzipped the com.liferay.portal.tools.db.upgrade.client.jar and couldn't find the DBUpgrader class.
LR 6 portal directory - C:\sts-bundle\liferay-portal-6.2-ce-ga6
LR 7 portal directory - C:\sts-bundle\liferay-ce-portal-7.0-ga4
LR 7 tools directory - C:\sts-bundle\liferay-ce-portal-tools-7.0-ga4
I also tried placing the tools folder in the LR 6 portal & LR 7 portal directory, and tried running it from there, but I get the same error.
Environment
Windows 7, 64 bit
Question:
What am I missing here?
Requirement:
Upgrade liferay-portal-6.2-ce-ga6 to liferay-ce-portal-7.0-ga4. I've followed the steps and details outlined in this page. I downloaded the items from sourceforge.
Issue:
When I run the tool I get the below error,
Error: Could not find or load main class com.liferay.portal.tools.DBUpgrader
C:\sts-bundle\liferay-ce-portal-tools-7.0-ga4\portal-tools-db-upgrade-client>java -jar com.liferay.portal.tools.db.upgrade.client.jar
[ jboss jonas resin tcserver tomcat weblogic websphere wildfly ]
Please enter your application server (tomcat):
tomcat
Please enter your application server directory (..\..\tomcat-8.0.32):
C:\sts-bundle\liferay-ce-portal-7.0-ga4\tomcat-8.0.32
Please enter your extra library directories (..\..\tomcat-8.0.32\bin):
Please enter your global library directory (..\..\tomcat-8.0.32\lib):
Please enter your portal directory (..\..\tomcat-8.0.32\webapps\ROOT):
[ db2 mariadb mysql oracle postgresql sqlserver sybase ]
Please enter your database (mysql):
mysql
Please enter your database JDBC driver class name (com.mysql.jdbc.Driver):
com.mysql.jdbc.Driver
Please enter your database JDBC driver protocol (jdbc:mysql://):
jdbc:mysql://
Please enter your database host (localhost):
localhost
Please enter your database port (none):
Please enter your database name (/lportal):
/lportal_6.2.5
Please enter your database username:
root
Please enter your database password:
****
Please enter your Liferay home (../../):
C:\sts-bundle\liferay-ce-portal-7.0-ga4
Error: Could not find or load main class com.liferay.portal.tools.DBUpgrader
C:\sts-bundle\liferay-ce-portal-tools-7.0-ga4\portal-tools-db-upgrade-client>Investigation & Details:
I unzipped the com.liferay.portal.tools.db.upgrade.client.jar and couldn't find the DBUpgrader class.
LR 6 portal directory - C:\sts-bundle\liferay-portal-6.2-ce-ga6
LR 7 portal directory - C:\sts-bundle\liferay-ce-portal-7.0-ga4
LR 7 tools directory - C:\sts-bundle\liferay-ce-portal-tools-7.0-ga4
I also tried placing the tools folder in the LR 6 portal & LR 7 portal directory, and tried running it from there, but I get the same error.
C:\sts-bundle\liferay-ce-portal-7.0-ga4\portal-tools-db-upgrade-client>java -jar com.liferay.portal.tools.db.upgrade.client.jar
Error: Could not find or load main class com.liferay.portal.tools.DBUpgrader
C:\sts-bundle\liferay-portal-6.2-ce-ga6\portal-tools-db-upgrade-client>java -jar com.liferay.portal.tools.db.upgrade.client.jar
Error: Could not find or load main class com.liferay.portal.tools.DBUpgraderEnvironment
Windows 7, 64 bit
Question:
What am I missing here?
Dennis Ju, geändert vor 8 Jahren.
Regular Member
Beiträge: 228
Beitrittsdatum: 30.09.10
Neueste Beiträge
Hi Mohammed,
You should post under the Liferay Portal -> Installation / Deployment / Setup forum. You'll have better luck finding help w/ this question.
You should post under the Liferay Portal -> Installation / Deployment / Setup forum. You'll have better luck finding help w/ this question.
Olaf Kock, geändert vor 8 Jahren.
Liferay Legend
Beiträge: 6441
Beitrittsdatum: 23.09.08
Neueste Beiträge
I've moved the thread over there.
Mohammed Rawoof Shaik, geändert vor 8 Jahren.
Junior Member
Beiträge: 37
Beitrittsdatum: 25.09.16
Neueste Beiträge
Dennis, Olaf... Thank you directing this thread... I did a little investigation and have provided the details below,
Copied
C:\sts-bundle\liferay-ce-portal-7.0-ga4\tomcat-8.0.32\webapps\ROOT\WEB-INF\lib
to
C:\liferay-ce-portal-tools-7.0-ga4\portal-tools-db-upgrade-client\lib
After which,
Moved and renamed,
C:\liferay-ce-portal-tools-7.0-ga4\portal-tools-db-upgrade-client\lib
to
C:\z\portal-tools-db-upgrade-client
After which,
-- Added portal-service-6.2.5.jar to the 'C:\z\portal-tools-db-upgrade-client\lib' folder
After which,
-- Added com.liferay.portal.kernel-2.41.0.jar
After which,
Copied all jar files from
C:\sts-bundle\liferay-ce-portal-7.0-ga4\tomcat-8.0.32\lib
to
C:\z\portal-tools-db-upgrade-client\lib
After which it seems to run without any exceptions. Attached upgrade.log.
Copied
C:\sts-bundle\liferay-ce-portal-7.0-ga4\tomcat-8.0.32\webapps\ROOT\WEB-INF\lib
to
C:\liferay-ce-portal-tools-7.0-ga4\portal-tools-db-upgrade-client\lib
After which,
C:\liferay-ce-portal-tools-7.0-ga4\portal-tools-db-upgrade-client>java -jar com.liferay.portal.tools.db.upgrade.client.jar
Error running upgrade
java.io.IOException: Cannot run program "java": CreateProcess error=206, The filename or extension is too long
at java.lang.ProcessBuilder.start(Unknown Source)
at com.liferay.portal.tools.db.upgrade.client.UpgradeClient.upgrade(UpgradeClient.java:177)
at com.liferay.portal.tools.db.upgrade.client.UpgradeClient.main(UpgradeClient.java:107)
Caused by: java.io.IOException: CreateProcess error=206, The filename or extension is too long
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 3 more</init>Moved and renamed,
C:\liferay-ce-portal-tools-7.0-ga4\portal-tools-db-upgrade-client\lib
to
C:\z\portal-tools-db-upgrade-client
After which,
C:\z\portal-tools-db-upgrade-client>java -jar com.liferay.portal.tools.db.upgrade.client.jar
java.lang.NoClassDefFoundError: com/liferay/portal/kernel/exception/PortalException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.privateGetMethodRecursive(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at sun.launcher.LauncherHelper.validateMainClass(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.liferay.portal.kernel.exception.PortalException
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 7 more
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" -- Added portal-service-6.2.5.jar to the 'C:\z\portal-tools-db-upgrade-client\lib' folder
After which,
SEVERE: Portal ClassLoader is null
Exception in thread "main" java.lang.NoClassDefFoundError: com/liferay/portal/kernel/upgrade/dao/orm/UpgradeOptimizedConnectionProviderRegistry
at com.liferay.portal.tools.DBUpgrader.main(DBUpgrader.java:97)
Caused by: java.lang.ClassNotFoundException: com.liferay.portal.kernel.upgrade.dao.orm.UpgradeOptimizedConnectionProviderRegistry
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 1 more-- Added com.liferay.portal.kernel-2.41.0.jar
After which,
Loading jar:file:/C:/z/portal-tools-db-upgrade-client/lib/portal-impl.jar!/system.properties
Exception in thread "main" java.lang.NoClassDefFoundError: javax/servlet/ServletException
at com.liferay.portal.kernel.process.ClassPathUtil.initializeClassPaths(ClassPathUtil.java:143)
at com.liferay.portal.tools.DBUpgrader.main(DBUpgrader.java:95)
Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletException
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 2 moreCopied all jar files from
C:\sts-bundle\liferay-ce-portal-7.0-ga4\tomcat-8.0.32\lib
to
C:\z\portal-tools-db-upgrade-client\lib
After which it seems to run without any exceptions. Attached upgrade.log.
Anhänge:
Olaf Kock, geändert vor 8 Jahren.
Liferay Legend
Beiträge: 6441
Beitrittsdatum: 23.09.08
Neueste Beiträge
Wow. Thanks for reporting back. That is a description that I didn't expect.
My first thought, when I read this again, was that I wasn't sure if the backslashes were properly escaped in all cases and it might be worth to use forward-slashes / to separate Windows paths. I'd assume that the upgrader generates the classpath automatically from the available code - that should be why it's asking for the Liferay 7 directory. When (If) the backslashes aren't properly escaped, this would wreak havoc to the filenames - for example some-directory\tomcat would translate to some-directory<tab>omcat
But again, this is just a quick guess. I'm religiously staying away from backslashes as Windows Path separators.
My first thought, when I read this again, was that I wasn't sure if the backslashes were properly escaped in all cases and it might be worth to use forward-slashes / to separate Windows paths. I'd assume that the upgrader generates the classpath automatically from the available code - that should be why it's asking for the Liferay 7 directory. When (If) the backslashes aren't properly escaped, this would wreak havoc to the filenames - for example some-directory\tomcat would translate to some-directory<tab>omcat
But again, this is just a quick guess. I'm religiously staying away from backslashes as Windows Path separators.
Community
Company
Feedback