Forums de discussion

Portal-ext.properties file location

thumbnail
lalit jangra, modifié il y a 14 années.

Portal-ext.properties file location

New Member Publications: 7 Date d'inscription: 31/03/09 Publications récentes
Hi,

i am using Liferay 5.2.3 bundle with JBoss 4.2.3.I want to configure the MySql databse for my installation.I read of creating portal-ext.properties file but i am not getting where should i put it correctly.I created portal-ext.properties file,copied content from portal.properties, uncommented Mysql configurations & commented Hsql one and put it under server\default\conf, created database schema lportal in MYSql & put liferay-ds.xml in server\default\deploy directory.But i is giving this error :

10:50:59,603 INFO [TomcatDeployer] deploy, ctxPath=/EJustice, warUrl=.../deploy/EJustice.war/
10:51:19,022 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/ROOT.war/
10:51:44,279 INFO [STDOUT] Loading jar:file:/D:/lalit/liferay-portal-5.2.3/jboss-tomcat-4.2.3/server/default/deploy/ROOT.war/WEB-INF/lib/portal-impl.
jar!/system.properties
10:51:44,609 ERROR [STDERR] log4j:ERROR A "org.jboss.logging.appender.FileAppender" object is not assignable to a "org.apache.log4j.Appender" variable
.
10:51:44,609 ERROR [STDERR] log4j:ERROR The class "org.apache.log4j.Appender" was loaded by
10:51:44,609 ERROR [STDERR] log4j:ERROR [org.jboss.mx.loading.UnifiedClassLoader3@c5f9fe{ url=file:/D:/lalit/liferay-portal-5.2.3/jboss-tomcat-4.2.3/s
erver/default/deploy/ROOT.war/ ,addedOrder=44}] whereas object of type
10:51:44,619 ERROR [STDERR] log4j:ERROR "org.jboss.logging.appender.FileAppender" was loaded by [org.jboss.system.server.NoAnnotationURLClassLoader@fa
3ac1].
10:51:44,619 ERROR [STDERR] log4j:ERROR Could not instantiate appender named "FILE".
10:51:45,310 INFO [[/]] Initializing Spring root WebApplicationContext
10:53:04,666 INFO [STDOUT] 10:52:52,568 ERROR [ContextLoader] Context initialization failed
java.lang.StackOverflowError
at java.lang.ClassNotFoundException.<init>(ClassNotFoundException.java:65)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at java.net.URL.getURLStreamHandler(URL.java:1137)
at java.net.URL.<init>(URL.java:572)
at java.net.URL.<init>(URL.java:464)
at java.net.URL.<init>(URL.java:413)
at org.apache.commons.configuration.ConfigurationUtils.locate(ConfigurationUtils.java:418)
at org.apache.commons.configuration.AbstractFileConfiguration.load(AbstractFileConfiguration.java:211)
at org.apache.commons.configuration.AbstractFileConfiguration.load(AbstractFileConfiguration.java:195)
at org.apache.commons.configuration.AbstractFileConfiguration.<init>(AbstractFileConfiguration.java:140)
at org.apache.commons.configuration.PropertiesConfiguration.<init>(PropertiesConfiguration.java:242)
at com.germinus.easyconf.AggregatedProperties.addFileProperties(AggregatedProperties.java:164)
at com.germinus.easyconf.AggregatedProperties.addPropertiesSource(AggregatedProperties.java:140)
at com.germinus.easyconf.AggregatedProperties.addIncludedPropertiesSources(AggregatedProperties.java:222)
at com.germinus.easyconf.AggregatedProperties.addFileProperties(AggregatedProperties.java:180)
at com.germinus.easyconf.AggregatedProperties.addPropertiesSource(AggregatedProperties.java:140)
at com.germinus.easyconf.AggregatedProperties.addIncludedPropertiesSources(AggregatedProperties.java:222)
at com.germinus.easyconf.AggregatedProperties.addFileProperties(AggregatedProperties.java:180)
at com.germinus.easyconf.AggregatedProperties.addPropertiesSource(AggregatedProperties.java:140)
at com.germinus.easyconf.AggregatedProperties.addIncludedPropertiesSources(AggregatedProperties.java:222)
at com.germinus.easyconf.AggregatedProperties.addFileProperties(AggregatedProperties.java:180)
at com.germinus.easyconf.AggregatedProperties.addPropertiesSource(AggregatedProperties.java:140)
at com.germinus.easyconf.AggregatedProperties.addIncludedPropertiesSources(AggregatedProperties.java:222)
at com.germinus.easyconf.AggregatedProperties.addFileProperties(AggregatedProperties.java:180)
at com.germinus.easyconf.AggregatedProperties.addPropertiesSource(AggregatedProperties.java:140)
at com.germinus.easyconf.AggregatedProperties.addIncludedPropertiesSources(AggregatedProperties.java:222)
at com.germinus.easyconf.AggregatedProperties.addFileProperties(AggregatedProperties.java:180)
at com.germinus.easyconf.AggregatedProperties.addPropertiesSource(AggregatedProperties.java:140)
at com.germinus.easyconf.AggregatedProperties.addIncludedPropertiesSources(AggregatedProperties.java:222)
at com.germinus.easyconf.AggregatedProperties.addFileProperties(AggregatedProperties.java:180)
at com.germinus.easyconf.AggregatedProperties.addPropertiesSource(AggregatedProperties.java:140)
at com.germinus.easyconf.AggregatedProperties.addIncludedPropertiesSources(AggregatedProperties.java:222)
at com.germinus.easyconf.AggregatedProperties.addFileProperties(AggregatedProperties.java:180)



Can anyone let me know how to configure mysql with liferay correctly? I can directly update the portal.property file in portal-impl jar but project requirements want it to be done using portal-ext.properties file.
thumbnail
Aarti Jain, modifié il y a 14 années.

RE: Portal-ext.properties file location

Regular Member Publications: 116 Date d'inscription: 02/09/08 Publications récentes
Hi Lalit,

you have to create portal-ext.properties file in /webapps/ROOT/WEB-INF/classes and in that add ur properties.

Regards,
Aarti Jain
Impetus Infotech Pvt. Ltd.
Noida
thumbnail
Chris Wirth, modifié il y a 14 années.

RE: Portal-ext.properties file location

Junior Member Publications: 77 Date d'inscription: 08/05/09 Publications récentes
Hi Lalit,

As Aarti mentioned you do need to create the portal-ext file yourself and she is correct about the path for it. Regarding setting up Liferay on MySQL it's easy:

1. Create a database in MySQL called "lportal" (or anything you want) -- do not create any tables on it (Liferay will do that).
2. Create the portal-ext.properties file and put it in the directory that Aarti mentioned
3. Add these lines to the portal-ext file:

jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=root
jdbc.default.password=
schema.run.enabled=true
schema.run.minimal=true

The first line specifies the MySQL driver
The second identifies the URL for MySQL and the database name (lportal)
The third line is the dbase user name
The fourth line is the dbase password
The final two lines create the database tables and polulate them with minimal data.

That is all you need to do. You will know if it worked when you startup Liferay and you see "MySQL dialect" line during boot. the bootup will also pause and tell you it's creating the schema and populating it with data.

Hope this helps. The portal-ext file is read before portal.properties file AND before the certain liferay GUI settings which are stored in the database get read. It is a shame that the download docs don't specifically state this!!!!!

Best,

-Chris
thumbnail
lalit jangra, modifié il y a 14 années.

RE: Portal-ext.properties file location

New Member Publications: 7 Date d'inscription: 31/03/09 Publications récentes
Hi All,

Thanks for reply.Yes there is documentation for configuring portal-ext.properties file in Liferay+Tomcat setup as you have mentioned.But i am using Liferay over JBoss AS as i mentioned earlier.So where can i put my portal-ext.properties file in JBoss installation to setup MySql database using portal-ext.properties file.The way i mentioned in my previous post was not successful.

Any ideas?
thumbnail
Aarti Jain, modifié il y a 14 années.

RE: Portal-ext.properties file location

Regular Member Publications: 116 Date d'inscription: 02/09/08 Publications récentes
Hi Lalit,

If you are using Liferay over JBoss then its location will be in:

server/default/deploy/ROOT.war/WEB-INF/classes

Hope That Helps!!!

Regards,
Aarti Jain
Impetus Infotech Pvt. Ltd.
Noida
metilmarket newell kanavaro, modifié il y a 14 années.

RE: Portal-ext.properties file location

New Member Publications: 12 Date d'inscription: 03/08/09 Publications récentes
hi Aarti Jain

if i used the classfish for configuration connect database , Does it use the lportal-ext.properties ? if it is use in the classfish ,

Where is the location put it ?

thank regards
thumbnail
Zsolt Balogh, modifié il y a 14 années.

RE: Portal-ext.properties file location

Expert Publications: 463 Date d'inscription: 23/03/09 Publications récentes
You can put portal-ext.properties in domains/domain1/lib/classes
metilmarket newell kanavaro, modifié il y a 14 années.

RE: Portal-ext.properties file location

New Member Publications: 12 Date d'inscription: 03/08/09 Publications récentes
Thank Zsolt Balogh .

Hi. All


i am new user to liferay . Now i am intend to do the function records liferay users action .

That means ,I want to record all action of user like visit a friend, post something, view something,downloading something use what

application, interact with any portlet . I want to log all action that user create.This records will store something such as mysql data

table or other ways . Does it possible?

Please give me the right way.

thank regards.
thumbnail
Zsolt Balogh, modifié il y a 14 années.

RE: Portal-ext.properties file location

Expert Publications: 463 Date d'inscription: 23/03/09 Publications récentes
Activities portlet is something like this, but with limited functionality.

Probably you could implement this user tracking with hook plugins, but I'm not sure it's really possible.

Here's a topic about this:
http://www.liferay.com/web/guest/community/forums/-/message_boards/message/2971056
metilmarket newell kanavaro, modifié il y a 14 années.

RE: Portal-ext.properties file location

New Member Publications: 12 Date d'inscription: 03/08/09 Publications récentes
Hi Zsolt Balogh

thank your reply.

i also do follow by the topic at : http://www.liferay.com/web/guest/community/forums/-/message_boards/message/3680242#_19_message_3679914

i am create the lportal-ext.properties with the content like the following line and put it into webapps\ROOT\WEB-INF\classes

after that i restarts up the liferay portal again , But i did not find in the usertrackerpath table entries like
| 5 | 2 | /web/guest/home | 2009-07-29 16:44:05 |
| 6 | 2 | /portal/logout?null | 2009-07-29 16:44:41 |

As the topic mentions of Dan Keiper



jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=root
jdbc.default.password=root
schema.run.enabled=true
schema.run.minimal=true


## Live Users
##
#
# Set this to true to enable tracking via Live Users.
#
live.users.enabled=true

#
# Set this to true to convert the tracked paths to friendly URLs.
#
session.tracker.friendly.paths.enabled=true

#
# Set the following to true to track user clicks in memory for the duration
# of a user's session. Setting this to true allows you to view all live
# sessions in the Admin portlet.
#
session.tracker.memory.enabled=true

#
# Set the following to true to track user clicks in the database after a
# user's session is invalidated. Setting this to true allows you to generate
# usage reports from the database. Use this cautiously because this will
# store a lot of usage data.
#
session.tracker.persistence.enabled=true

thank regards
benzema karim, modifié il y a 14 années.

RE: Portal-ext.properties file location

New Member Publications: 14 Date d'inscription: 01/09/09 Publications récentes
hi Dan Keiper

i just read your topic and do follow what you aldready have . But i get the result just is data tables.

it is contain usertracker,usertrackerpath tables . it is empty data, not track path like:

>>I then find in the usertrackerpath table entries like
>>| 5 | 2 | /web/guest/home | 2009-07-29 16:44:05 |
>>| 6 | 2 | /portal/logout?null | 2009-07-29 16:44:41 |

my portal-ext as :

jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=root
jdbc.default.password=root
schema.run.enabled=true
schema.run.minimal=true

# Live Users
#
#
# Set this to true to enable tracking via Live Users.
#
live.users.enabled=true

#
# Set this to true to convert the tracked paths to friendly URLs.
#
session.tracker.friendly.paths.enabled=true

#
# Set the following to true to track user clicks in memory for the duration
# of a user's session. Setting this to true allows you to view all live
# sessions in the Admin portlet.
#
session.tracker.memory.enabled=true

#
# Set the following to true to track user clicks in the database after a
# user's session is invalidated. Setting this to true allows you to generate
# usage reports from the database. Use this cautiously because this will
# store a lot of usage data.
#
session.tracker.persistence.enabled=true


Does everyone know that ?

thank in advance.
benzema karim, modifié il y a 14 années.

RE: Portal-ext.properties file location

New Member Publications: 14 Date d'inscription: 01/09/09 Publications récentes
No display on usertracker,usertrackerpath tables.
thumbnail
Lisa Simpson, modifié il y a 14 années.

RE: Portal-ext.properties file location

Liferay Legend Publications: 2034 Date d'inscription: 05/03/09 Publications récentes
Go to the command line of your server and try connecting to your database with the information in your portal-ext.properties file. See if it works. I'm guessing that it isn't working.
thumbnail
Bhavik Rameshbhai Patel, modifié il y a 14 années.

RE: Portal-ext.properties file location

New Member Publications: 5 Date d'inscription: 16/09/09 Publications récentes
hi...
I am trying to insall liferay on glassfish v2.

I put .properties file at domain1/lib/classes
and deployed war file from admin panel

I got following exception

WebModule[/liferay-portal-5.2.3]PWC1257: Error configuring application listener of class com.liferay.portal.servlet.PortalSessionListener
java.lang.NoSuchMethodError: java.lang.ThreadDeath: method <init>(Ljava/lang/String;)V not found
at org.apache.log4j.LogManager.getLoggerRepository(LogManager.java:175)
at org.apache.log4j.LogManager.getLogger(LogManager.java:199)
at com.liferay.portal.log.Log4jLogFactoryImpl.getLog(Log4jLogFactoryImpl.java:43)
at com.liferay.portal.kernel.log.LogFactoryWrapper.getLog(LogFactoryWrapper.java:78)
at com.liferay.portal.kernel.log.LogFactoryWrapper.getLog(LogFactoryWrapper.java:66)
at com.liferay.portal.kernel.log.LogFactoryUtil.getLog(LogFactoryUtil.java:42)
at com.liferay.portal.servlet.PortalSessionListener.<clinit>(PortalSessionListener.java:163)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4576)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5312)
at com.sun.enterprise.web.WebModule.start(WebModule.java:353)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:989)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:973)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:704)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1627)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1232)
at com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebModuleDeployEventListener.java:182)
at com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebModuleDeployEventListener.java:278)
at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:1005)
at com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:992)
at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:470)
at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:182)
at com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multicastEvent(DeploymentNotificationHelper.java:308)
at com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.multicastEvent(DeploymentServiceUtils.java:231)
at com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStartEvent(ServerDeploymentTarget.java:298)
at com.sun.enterprise.deployment.phasing.ApplicationStartPhase.runPhase(ApplicationStartPhase.java:132)
at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:966)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:609)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:653)
at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.start(ApplicationsConfigMBean.java:773)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:381)
at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:364)
at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:477)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90)
at $Proxy1.invoke(Unknown Source)
at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304)
at com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:174)
at com.sun.enterprise.deployment.client.DeploymentClientUtils.startApplication(DeploymentClientUtils.java:159)
at com.sun.enterprise.deployment.client.DeployAction.run(DeployAction.java:538)
at java.lang.Thread.run(Thread.java:619)
PWC1258: Skipped installing application listeners due to previous error(s)
PWC1306: Startup of context /liferay-portal-5.2.3 failed due to previous errors


Any help will be appreciated?
Thanks
thumbnail
Victor Zorin, modifié il y a 14 années.

RE: Portal-ext.properties file location

Liferay Legend Publications: 1228 Date d'inscription: 14/04/08 Publications récentes
Reading your stacktrace, it does not seem that the problems are caused by database connectivity.
Where you able to run it successfully under HSQLDB?
Have you moved any classes/libraries around?
Remove your own custom war/jar/ and ear projects from deploy, and see whether problems go away.
You may have clashes in library versions.