Foren

How to know whether portal-ext.properties is consumed properly?

Eason Chen, geändert vor 9 Jahren.

How to know whether portal-ext.properties is consumed properly?

New Member Beiträge: 4 Beitrittsdatum: 22.01.15 Neueste Beiträge
Hi,
Recently, I installed the EE trial version to my local develop machine for evaluation. I need to test the SAML SP module, so I follow the following blog: http://www.liferay.com/web/armin.dahncke/blog/-/blogs/setting-up-liferay-portal-6-1-ee-as-a-sp, generate a file named: portal-ext.properties and the key file.
After I installed, launched and configured the portal successfully, I got the following file : portal-setup-wizard.properties in my Liferay Portal root folder C:\liferay-ee\. Then I renamed it to orig.portal-setup-wizard.properties.orig, kept it in the same place. The next step, I copied the content of the original file and pasted to the beginning of portal-ext file. Then I copied the portal-ext file to C:\liferay-ee\portal-ext.properties and C:\liferay-ee\tomcat-7.0.42\webapps\ROOT\WEB-INF\classes\portal-ext.properties, copied the key file to c:\liferay-ee\data folder.
I shutdown Tomcat and started-up again, however, the portal-ext files seemed not be consumed at all, I cannot get the SP metadata as it is supposed to be get. I cannot troubleshoot the problem whether is the files not consumed at all or there are some wrong configurations in the portal-ext file.

Could you please help me?

Thanks,
Eason
thumbnail
Olaf Kock, geändert vor 9 Jahren.

RE: How to know whether portal-ext.properties is consumed properly?

Liferay Legend Beiträge: 6400 Beitrittsdatum: 23.09.08 Neueste Beiträge
The portal*.properties files that are used will be shown in the startup log - pay attention to that output.

It should be enough to have it in ${liferay-home}, in your case this seems to be C:\liferay-ee\ - having it in ..../tomcat/webapp/ROOT/WEB-INF/classes typically just obfuscates where the settings are, and makes you loose it on upgrades (as it's well hidden). Technically it can be in both places, but I consider it best practice to use only the first option.

As you're obviously on Windows: Make extra extra extra sure that you don't accidentally are dealing with a file called portal-ext.properties.txt - I've seen Windows hiding the actual extension more than once.
Eason Chen, geändert vor 9 Jahren.

RE: How to know whether portal-ext.properties is consumed properly?

New Member Beiträge: 4 Beitrittsdatum: 22.01.15 Neueste Beiträge
Hi Olaf,
Thanks for your reply. First of all, the extension name is correct. Then I did saw portal-ext.properties file is loaded in the startup log. There is no WARNING nor ERROR after loading. So I think the file is loaded correctly. However, When I went to the SP Metadata URL http://localhost:8080/c/portal/saml/metadata, it redirected back to portal index page. I just cannot tell whether the problem from either properties file loading or the configuration itself.
thumbnail
Ravi Kumar Gupta, geändert vor 9 Jahren.

RE: How to know whether portal-ext.properties is consumed properly?

Liferay Legend Beiträge: 1302 Beitrittsdatum: 24.06.09 Neueste Beiträge
There might be one more case when your properties file may not work.. that's when you change the property through UI. Because in that case the property is stored in Database and will always override the one in portal.properties or portal-ext.properties
Eason Chen, geändert vor 9 Jahren.

RE: How to know whether portal-ext.properties is consumed properly?

New Member Beiträge: 4 Beitrittsdatum: 22.01.15 Neueste Beiträge
Hi Ravi,
If the properties are stored in Database and will override the ones in portal-ext.properties, then there should be some SAML configurations in database to override mine in the properties file. Yes?
In this case, how can I check and/or restore the properties (if I made any changes) in the database?
Moreover, can I insert records to database directly instead of using portal-ext.properties fileemoticon

Thanks,
Eason
thumbnail
Ravi Kumar Gupta, geändert vor 9 Jahren.

RE: How to know whether portal-ext.properties is consumed properly?

Liferay Legend Beiträge: 1302 Beitrittsdatum: 24.06.09 Neueste Beiträge

Moreover, can I insert records to database directly instead of using portal-ext.properties file

Whether or not you can, you should never do that.


If the properties are stored in Database and will override the ones in portal-ext.properties, then there should be some SAML configurations in database to override mine in the properties file. Yes?
In this case, how can I check and/or restore the properties (if I made any changes) in the database?

Check your PortalPreferences table in database.
thumbnail
Thomas Berg, geändert vor 9 Jahren.

RE: How to know whether portal-ext.properties is consumed properly?

Regular Member Beiträge: 131 Beitrittsdatum: 07.09.09 Neueste Beiträge
Hi Eason,

I guess you know this but anyway, also check which values are active by checking this location in your server:

http://localhost:8080/group/control_panel/manage/-/server/properties/portal-properties


This won't tell you explicitly if the value comes from portal-ext.properties or portal.properties but it will tell you what value a given property has and whether it was read from portal.properties (or one of its extensions) or set in the UI (and thus stored in the database).

Regards
Thomas
thumbnail
Ramalingaiah Dudidmetle, geändert vor 9 Jahren.

RE: How to know whether portal-ext.properties is consumed properly?

Expert Beiträge: 486 Beitrittsdatum: 16.08.14 Neueste Beiträge
Hi Thomas Berg,
portal-ext.properties in Just JDBC Connection to DB coneting Tables in Default

i am using in DB Postgres ,
in my portal-ext.properties inside ,
jdbc.default.driverClassName=org.postgresql.Driver
jdbc.default.username=postgres
jdbc.default.password=postgres
jdbc.default.url=jdbc:postgresql://localhost:5432/ebs?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
Eason Chen, geändert vor 9 Jahren.

RE: How to know whether portal-ext.properties is consumed properly?

New Member Beiträge: 4 Beitrittsdatum: 22.01.15 Neueste Beiträge
Thomas Berg:
Hi Eason,

I guess you know this but anyway, also check which values are active by checking this location in your server:

http://localhost:8080/group/control_panel/manage/-/server/properties/portal-properties


This won't tell you explicitly if the value comes from portal-ext.properties or portal.properties but it will tell you what value a given property has and whether it was read from portal.properties (or one of its extensions) or set in the UI (and thus stored in the database).

Regards
Thomas


Hi Thomas,
Thanks for your advice. From the given URL, I can find my SAML settings, which are exactly what I had set from portal-ext.properties. Now I can try why I still cannot use SAML SP.