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 CE from 7.1 to 7.3 fails for obscure reason
I'm trying to upgrade my portlets and Liferay 7.1 to the version 7.3.3.
I downloaded the portal-tools-db-upgrade-client and configure these files:
app-server.properties
portal-upgrade-database.properties
portal-upgrade-ext.properties
./db_upgrade.sh -j "-Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.timezone=GMT -Xmx10240m"
I got :
I dont'know why it is asking for MARIADB, I use postgresql.
It is tiring.
Please how could I correct it ?
Thanks.
I downloaded the portal-tools-db-upgrade-client and configure these files:
app-server.properties
dir=C:\Users\tkossoko\Documents\Capgemini\Biomass\liferay-ce-portal-7.3.3-ga4\tomcat-9.0.33
extra.lib.dirs=C://Users//tkossoko//Documents//Capgemini//Biomass//liferay-ce-portal-7.3.3-ga4//tomcat-9.0.33//bin
global.lib.dir=C://Users//tkossoko//Documents//Capgemini//Biomass//liferay-ce-portal-7.3.3-ga4//tomcat-9.0.33//lib
portal.dir=C://Users//tkossoko//Documents//Capgemini//Biomass//liferay-ce-portal-7.3.3-ga4//tomcat-9.0.33//webapps//ROOT
server.detector.server.id=tomcat
portal-upgrade-database.properties
jdbc.default.driverClassName=org.postgresql.Driver
jdbc.default.password=myPwd
jdbc.default.url=jdbc:postgresql://localhost:5432/liferay-full-map
jdbc.default.username=liferay
portal-upgrade-ext.properties
liferay.home=C:/Users/tkossoko/liferay-workspace/BMAP-Source/BMAP-source
When i run this command ./db_upgrade.sh -j "-Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.timezone=GMT -Xmx10240m"
I got :
JVM arguments: -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.timezone=GMT -Xmx10240m -Dexternal-properties=portal-upgrade.properties -Dserver.detector.server.id=tomcat
Loading jar:file:/C:/Users/tkossoko/Documents/Capgemini/Biomass/portal-tools-db-upgrade-client/lib/portal-impl.jar!/system.properties
Loading jar:file:/C:/Users/tkossoko/Documents/Capgemini/Biomass/portal-tools-db-upgrade-client/lib/portal-impl.jar!/system.properties
Loading jar:file:/C:/Users/tkossoko/Documents/Capgemini/Biomass/portal-tools-db-upgrade-client/lib/portal-impl.jar!/portal.properties
Loading jar:file:/C:/Users/tkossoko/Documents/Capgemini/Biomass/portal-tools-db-upgrade-client/com.liferay.portal.tools.db.upgrade.client.jar!/portal-upgrade.properties
Loading file:/C:/Users/tkossoko/Documents/Capgemini/Biomass/portal-tools-db-upgrade-client/portal-upgrade-ext.properties
Loading file:/C:/Users/tkossoko/Documents/Capgemini/Biomass/portal-tools-db-upgrade-client/portal-upgrade-database.properties
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.liferay.portal.tools.db.upgrade.client.DBUpgraderLauncher.main(DBUpgraderLauncher.java:54)
Caused by: java.lang.NoSuchFieldError: MARIADB
at com.liferay.portal.dao.db.MariaDBDBFactory.getDBType(MariaDBDBFactory.java:33)
at com.liferay.portal.dao.db.DBManagerImpl.<init>(DBManagerImpl.java:64)
at com.liferay.portal.util.InitUtil.init(InitUtil.java:168)
at com.liferay.portal.util.InitUtil.initWithSpring(InitUtil.java:210)
at com.liferay.portal.util.InitUtil.initWithSpring(InitUtil.java:199)
at com.liferay.portal.tools.DBUpgrader.main(DBUpgrader.java:126)
... 5 more
</init>
I dont'know why it is asking for MARIADB, I use postgresql.
It is tiring.
Please how could I correct it ?
Thanks.
That's a very weird error. It should actually never happen, since the field exists and is unchanged.
https://github.com/liferay/liferay-portal/blob/master/portal-impl/src/com/liferay/portal/dao/db/MariaDBDBFactory.java
https://github.com/liferay/liferay-portal/blob/master/portal-kernel/src/com/liferay/portal/kernel/dao/db/DBType.java
It could be some kind of classloader issue.
Is this Liferay 7.1?: C:/Users/tkossoko/liferay-workspace/BMAP-Source/BMAP-source
And this maybe Liferay 7.3: C:/Users/tkossoko/Documents/Capgemini/Biomass/portal-tools-db-upgrade-client
In any case, I would check for something like that. For me it looks weird that liferay.home points "elsewhere".
https://github.com/liferay/liferay-portal/blob/master/portal-impl/src/com/liferay/portal/dao/db/MariaDBDBFactory.java
https://github.com/liferay/liferay-portal/blob/master/portal-kernel/src/com/liferay/portal/kernel/dao/db/DBType.java
It could be some kind of classloader issue.
Is this Liferay 7.1?: C:/Users/tkossoko/liferay-workspace/BMAP-Source/BMAP-source
And this maybe Liferay 7.3: C:/Users/tkossoko/Documents/Capgemini/Biomass/portal-tools-db-upgrade-client
In any case, I would check for something like that. For me it looks weird that liferay.home points "elsewhere".
yes,
the path " C:/Users/tkossoko/liferay-workspace/BMAP-Source/BMAP-source " is the liferay 7.1 home and the " C:/Users/tkossoko/Documents/Capgemini/Biomass/portal-tools-db-upgrade-client " is the path of the tool for liferay 7.3. Should I point the conf to my Liferay home ? and not the tool home folder ?
the path " C:/Users/tkossoko/liferay-workspace/BMAP-Source/BMAP-source " is the liferay 7.1 home and the " C:/Users/tkossoko/Documents/Capgemini/Biomass/portal-tools-db-upgrade-client " is the path of the tool for liferay 7.3. Should I point the conf to my Liferay home ? and not the tool home folder ?
Yes. liferay.home should point to the 7.3 instance. When you do the upgrade, Liferay basically starts the Liferay server to do the upgrade. I suspect that you get a mixup between 7.1 and 7.3 modules when you configure the upgrader in 7.3 to point to the 7.1 instance.
There was a discussion about upgrade documentation in the blog a while ago:
https://liferay.dev/blogs/-/blogs/liferay-portal-7-3-ce-ga3-release
I wrote a bit of a recipe for upgrading there, maybe it helps.
There was a discussion about upgrade documentation in the blog a while ago:
https://liferay.dev/blogs/-/blogs/liferay-portal-7-3-ce-ga3-release
I wrote a bit of a recipe for upgrading there, maybe it helps.
Thanks for your answer. I started migrating manually all contents and portlets...I know that it is not the most effective solution, but it was the smpliest I found. Thanks.
Hey Teddy,
Probably the error is caused because of the paths in the app-server.properties, they should be relative to dir, something like this:
Can you try with this configuration?
Cheers!
Probably the error is caused because of the paths in the app-server.properties, they should be relative to dir, something like this:
dir=C:\Users\tkossoko\Documents\Capgemini\Biomass\liferay-ce-portal-7.3.3-ga4\tomcat-9.0.33
extra.lib.dirs=/bin
global.lib.dir=/lib
portal.dir=/webapps/ROOT
server.detector.server.id=tomcat
Can you try with this configuration?
Cheers!
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™