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: My experiences with the setup of Liferay 7.2.1
Maybe this helps other NewBe's to avoid some struggeling :-) Or someone may tell me other options of installing it better.
Situation:
1. First time installation of Liferay
2. Target System: Windows7, OpenJDK 11, MySql 8, Tomcat 9.29 (NO Bundle)
3. Existing basic understanding of JAVA und Tomcat
Firstoff: The deployment guide given here: https://portal.liferay.dev/docs/7-2/deploy is straighforward and helpfull...
... until it comes to the point when you need to generate the Liferay Home folder. Using the Bundle this is the parent folder of the applicationserver. But if you choose to install Liferay to an existing Tomcat, things become complicated.
As Tomcat is a standalone server I didn't want it under a Liferay parent folder. The guide (or some research) told me that Liferay generates the Liferay Home folder under c:\users\[account]\liveray on first startup. In my case that didn't work... but anyway: This would intent that you need to start Liferay for the first time knowing that you run into errors because there is no Liferay Home.
That's why I created the folder manually and added the osgi file structure AND the portal-ext-properties file as Liferay Home is the recommended location for that file.
BUT: Of course Liferay, when starting, so far had no clue of the Liferay Home location. BTW, this leads immediatly to the " Unable to load the module framework" ERROR that is described here: https://liferay.dev/forums/-/message_boards/message/88916578
So, how to inform Liferay of the Liferay Home location on startup?
-> Setting an environment variable %LIVERAY_HOME% -> not working
-> Setting a JDK option -Dliveray.home -> not working
-> Setting liveray.home in portal-ext-properties -> worked!
But of course that means that portal-ext-properties needs to go to WEB_INF/classes, which is not recommended :-(
OK, so far so good Liferay was starting, configuring the DB, I was happy... :-)...
... until I ran into the startup wizard. This helpfull tool creates the file portal-setup-wizard.properties in, guess where..., Liferay Home folder when finished. The last line of that file says setup.wizard.enabled=false, because the wizard has already done his job and hence doesn't need to be started again.
Long story short: I found myself in a situation where Liferay was stuck on the setup wizard basic configuration screen. Because Liferay never reads the portal-setup-wizard.properties from Liferay Home.
Conclusion: I ended up having a portal-ext.properties file in WEB_INF/classes with
liferay.home=C:/Liferay
setup.wizard.enabled=false
If there is a better way to get around this, please let me know. Making use of %LIVERAY_HOME% on startup would resolve the whole thing. But, anyway, the installation guide for a No Bundle Installation maybe needs a little update :-)
Situation:
1. First time installation of Liferay
2. Target System: Windows7, OpenJDK 11, MySql 8, Tomcat 9.29 (NO Bundle)
3. Existing basic understanding of JAVA und Tomcat
Firstoff: The deployment guide given here: https://portal.liferay.dev/docs/7-2/deploy is straighforward and helpfull...
... until it comes to the point when you need to generate the Liferay Home folder. Using the Bundle this is the parent folder of the applicationserver. But if you choose to install Liferay to an existing Tomcat, things become complicated.
As Tomcat is a standalone server I didn't want it under a Liferay parent folder. The guide (or some research) told me that Liferay generates the Liferay Home folder under c:\users\[account]\liveray on first startup. In my case that didn't work... but anyway: This would intent that you need to start Liferay for the first time knowing that you run into errors because there is no Liferay Home.
That's why I created the folder manually and added the osgi file structure AND the portal-ext-properties file as Liferay Home is the recommended location for that file.
BUT: Of course Liferay, when starting, so far had no clue of the Liferay Home location. BTW, this leads immediatly to the " Unable to load the module framework" ERROR that is described here: https://liferay.dev/forums/-/message_boards/message/88916578
So, how to inform Liferay of the Liferay Home location on startup?
-> Setting an environment variable %LIVERAY_HOME% -> not working
-> Setting a JDK option -Dliveray.home -> not working
-> Setting liveray.home in portal-ext-properties -> worked!
But of course that means that portal-ext-properties needs to go to WEB_INF/classes, which is not recommended :-(
OK, so far so good Liferay was starting, configuring the DB, I was happy... :-)...
... until I ran into the startup wizard. This helpfull tool creates the file portal-setup-wizard.properties in, guess where..., Liferay Home folder when finished. The last line of that file says setup.wizard.enabled=false, because the wizard has already done his job and hence doesn't need to be started again.
Long story short: I found myself in a situation where Liferay was stuck on the setup wizard basic configuration screen. Because Liferay never reads the portal-setup-wizard.properties from Liferay Home.
Conclusion: I ended up having a portal-ext.properties file in WEB_INF/classes with
liferay.home=C:/Liferay
setup.wizard.enabled=false
If there is a better way to get around this, please let me know. Making use of %LIVERAY_HOME% on startup would resolve the whole thing. But, anyway, the installation guide for a No Bundle Installation maybe needs a little update :-)
Actually I would use the ROOT/WEB-INF/classes/portal-ext.properties to set your liferay.home value, but combine that with an additional line:
This way you still get the opportunity to set liferay.home but the additional advantage of using an external file for the properties management. Note that it does require the full path in this usage, but that seems like a small price to pay.
I'm not sure why the JVM parameter and/or environment variable weren't working for you, the whole docker setup really depends upon being able to externalize details like that since portal-ext.properties management is typically not possible.
That said, I like the properties approach because it takes the ambiguity off the table of where it would be set. What happens if someone edits the JVM parameters and makes a mistake with the liferay.home property? What if you set a user env variable in Windows and not a system variable? Etc.
include-and-override=/full/path/to/another/portal-ext.properties
This way you still get the opportunity to set liferay.home but the additional advantage of using an external file for the properties management. Note that it does require the full path in this usage, but that seems like a small price to pay.
I'm not sure why the JVM parameter and/or environment variable weren't working for you, the whole docker setup really depends upon being able to externalize details like that since portal-ext.properties management is typically not possible.
That said, I like the properties approach because it takes the ambiguity off the table of where it would be set. What happens if someone edits the JVM parameters and makes a mistake with the liferay.home property? What if you set a user env variable in Windows and not a system variable? Etc.
Hi David,
I tried your approach and it worked. But it also means that you have to include and override every other xyz-ext.properties as well. (See the situation with the portal-setup-wizard.properties.
It seems that settting liveray.home here does not cause Liferay to look up .properties files up in Liferay Home...
I tried your approach and it worked. But it also means that you have to include and override every other xyz-ext.properties as well. (See the situation with the portal-setup-wizard.properties.
It seems that settting liveray.home here does not cause Liferay to look up .properties files up in Liferay Home...
Worst case scenario is that you might need to use full path to the other properties files if you want to use them.
Because of the order of how the include-and-override is processed vs resetting liferay.home, it doesn't surprise me much that it is unhappy w/ the change.
Because of the order of how the include-and-override is processed vs resetting liferay.home, it doesn't surprise me much that it is unhappy w/ the change.
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™