Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Database Configuration Changed in 5.2 JR Houn February 3, 2009 12:22 PM
RE: Database Configuration Changed in 5.2 Timothy Overly January 26, 2009 12:46 PM
RE: Database Configuration Changed in 5.2 steve rieger January 28, 2009 10:59 AM
RE: Database Configuration Changed in 5.2 steve rieger January 28, 2009 3:52 PM
RE: Database Configuration Changed in 5.2 Rinaldo S DiGiorgio February 3, 2009 3:41 AM
Re: [Liferay Forums][1. Installation / Deployment / Setup] RE: DatabaseConf steve rieger February 3, 2009 7:26 AM
RE: Re: [Liferay Forums][1. Installation / Deployment / Setup] RE: Database Jason Boyle February 3, 2009 2:29 PM
RE: Re: [Liferay Forums][1. Installation / Deployment / Setup] RE: Database Kevin S Neibarger February 4, 2009 6:30 AM
RE: Re: [Liferay Forums][1. Installation / Deployment / Setup] RE: Database Jason Boyle February 4, 2009 8:51 AM
RE: Re: [Liferay Forums][1. Installation / Deployment / Setup] RE: Database Joshua Asbury February 4, 2009 1:55 PM
RE: Re: [Liferay Forums][1. Installation / Deployment / Setup] RE: Database Joshua Asbury February 4, 2009 2:29 PM
RE: Re: [Liferay Forums][1. Installation / Deployment / Setup] RE: Database Kevin S Neibarger February 6, 2009 8:22 AM
RE: Re: [Liferay Forums][1. Installation / Deployment / Setup] RE: Database Nicholas Ho February 13, 2009 1:16 AM
RE: Re: [Liferay Forums][1. Installation / Deployment / Setup] RE: Database Nicholas Ho February 23, 2009 9:23 AM
RE: Re: [Liferay Forums][1. Installation / Deployment / Setup] RE: Database Shankar Baba October 19, 2012 12:15 AM
RE: Re: [Liferay Forums][1. Installation / Deployment / Setup] RE: Database David H Nebinger October 19, 2012 5:46 AM
RE: Database Configuration Changed in 5.2 Suresh Damodaran March 6, 2009 11:00 AM
RE: Database Configuration Changed in 5.2 Jonas Yuan March 6, 2009 11:05 AM
RE: Database Configuration Changed in 5.2 Lisa Simpson March 6, 2009 11:52 AM
RE: Database Configuration Changed in 5.2 Suresh Damodaran March 6, 2009 12:21 PM
RE: Database Configuration Changed in 5.2 Jonas Yuan March 6, 2009 1:08 PM
JR Houn
Database Configuration Changed in 5.2
February 3, 2009 12:22 PM
Answer

JR Houn

LIFERAY STAFF

Rank: Expert

Posts: 489

Join Date: November 19, 2007

Recent Posts

Hi Everyone,
The Liferay 5.2 release is imminent (hopefully being packaged over the weekend), I wanted to get one important bit of information out to the potential users of 5.2. The method of configuring your app server with your database of choice has changed significantly from previous versions; here is an excerpt from the updated wiki article:
Liferay v5.2 unifies the configuration of the database in a single file for all application servers. As most other configuration options you can set this up in the portal(-ext).properties file as follows (example for MySQL):
jdbc.default.driver=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=
jdbc.default.password=
The portal.properties file has examples for all the main databases supported.
Note that this system uses the apache commons pool for pooling connections to the database. If you prefer to use the pooling mechanism provided by the portal application server you can still do that through spring. In particular add this to the ext-spring.xml file:
<bean id="liferayDataSource"
class="org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy">
<property name="targetDataSource">
<bean
class="com.liferay.portal.spring.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="jdbc/LiferayPool" />
</bean>
</property>
</bean>
This file can be found in your extension environment. If you are not using this environment just create an Spring configuration file with that name and add it to the META-INF dir of your installation.

Hope this helps everyone avoid any surprising gotchas on 5.2 day. emoticon
Regards,
jr
Timothy Overly
RE: Database Configuration Changed in 5.2
January 26, 2009 12:46 PM
Answer

Timothy Overly

Rank: New Member

Posts: 4

Join Date: December 7, 2008

Recent Posts

The following would not work for me:

jdbc.default.driver=com.mysql.jdbc.Driver

It worked as following:

jdbc.default.driverClassName=com.mysql.jdbc.Driver
steve rieger
RE: Database Configuration Changed in 5.2
January 28, 2009 10:59 AM
Answer

steve rieger

Rank: Expert

Posts: 436

Join Date: September 11, 2006

Recent Posts

am misunderstanding you

my context.xml file looks like this

<Context>
<!--<Resource
name="jdbc/JIRAPool"
auth="Container"
type="javax.sql.DataSource"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/jira?useUnicode=true&amp;characterEncoding=UTF-8&amp;emulateLocators=true&amp;useFastDateParsing=false"
username=""
password=""
maxActive="20"
/>-->
</Context>

pwd
webapps/wol-portlet/META-INF

i think that the following line
url="jdbc:mysql://localhost/jira?useUnicode=true&amp;characterEncoding=UTF-
should be changed to
url="jdbc:mysql://localhost/lportal?useUnicode=true&amp;characterEncoding=UTF-
steve rieger
RE: Database Configuration Changed in 5.2
January 28, 2009 3:52 PM
Answer

steve rieger

Rank: Expert

Posts: 436

Join Date: September 11, 2006

Recent Posts

am using mysql as the db
cat ./webapps/ROOT/WEB-INF/classes/portal-ext.properties

# MySQL
#
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost/liferay52?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=user
jdbc.default.password=passwd

am having issues putting liferap portal (tomcat bundle) on mysql

can somebody please provide instructions, it seems to work (i see changes in mysql, however when i restart tomcat all the changes go away and it reverts to the default page...

thank you in advance.
Rinaldo S DiGiorgio
RE: Database Configuration Changed in 5.2
February 3, 2009 3:41 AM
Answer

Rinaldo S DiGiorgio

Rank: New Member

Posts: 15

Join Date: January 31, 2009

Recent Posts

Hello,

I just downloaded the 1/25/09 glassfish bundle. I want to use MySQL as the store. I don't see any of the files you mention in my distribution. Do I have to create them? How do I go from using the default embedded database to a mysql configuration.


Rinaldo
steve rieger
Re: [Liferay Forums][1. Installation / Deployment / Setup] RE: DatabaseConf
February 3, 2009 7:26 AM
Answer

steve rieger

Rank: Expert

Posts: 436

Join Date: September 11, 2006

Recent Posts

Yes you have to create the portal-ext.properties file

If you create that file and start liferay it will populate the db for you



--
Sent via Blackberry
I can be reached at 310-947-8565
Jason Boyle
RE: Re: [Liferay Forums][1. Installation / Deployment / Setup] RE: Database
February 3, 2009 2:29 PM
Answer

Jason Boyle

Rank: New Member

Posts: 3

Join Date: February 3, 2009

Recent Posts

after creating the portal-ext.properties file with the config items, what else needs to be done to switch from hypersonic to MySQL? My tomcat-55 bundle install is still trying to use hsdb..
As someone who's not a developer, trying to get into using Liferay, I have found it to be a very frustrating experience so far emoticon
thanks for anyone's guidance or pointers..
edit: nevermind - i was not placing my file into the /webapps/ROOT/WEB-INF/classes dir.

But now the startup connects, creates the tables in the DB, but still uses hypersonic - is it possible to configure a bundle to use MySQL w/o re-compiling?
Kevin S Neibarger
RE: Re: [Liferay Forums][1. Installation / Deployment / Setup] RE: Database
February 4, 2009 6:30 AM
Answer

Kevin S Neibarger

Rank: New Member

Posts: 12

Join Date: December 4, 2008

Recent Posts

Hi Jason - It's actually rather simple to switch databases. Just go to $LIFERAY_HOME\tomcat\conf\Catalina\localhost\ROOT.xml

And comment out the Hypersonic definition and uncomment the MySQL definition such as:

<!-- Hypersonic

<Resource
name="jdbc/LiferayPool"
auth="Container"
type="javax.sql.DataSource"
driverClassName="org.hsqldb.jdbcDriver"
url="jdbc:hsqldb:lportal"
username="sa"
password=""
maxActive="20"
/>-->

<!-- MySQL -->

<Resource
name="jdbc/LiferayPool"
auth="Container"
type="javax.sql.DataSource"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/lportal?useUnicode=true&amp;characterEncoding=UTF-8&amp;useFastDateParsing=false"
username="root"
password="admin"
maxActive="20"
/>

that should do it.
Jason Boyle
RE: Re: [Liferay Forums][1. Installation / Deployment / Setup] RE: Database
February 4, 2009 8:51 AM
Answer

Jason Boyle

Rank: New Member

Posts: 3

Join Date: February 3, 2009

Recent Posts

i thought the whole point of 5.2 was that there was only one place needed to modify db settings.. The bundled 5.2 root.xml file is pretty empty, and doesn't contain any DB settings.

it looks like i got things mostly working by copying the source's "portal.properties" file, creating a portal-ext.properties" file with the MySQL settings in there (dis/enabling the ones inside the portal.properties file didn't work..), and copying both to the ROOT/web-inf/classes dir.

i still get some references to hypersonic upon starting up the app, but i'm using the DB now and luckily haven't come across any problems so far within the 7cogs/demo site..
Joshua Asbury
RE: Re: [Liferay Forums][1. Installation / Deployment / Setup] RE: Database
February 4, 2009 1:55 PM
Answer

Joshua Asbury

LIFERAY STAFF

Rank: Expert

Posts: 497

Join Date: September 8, 2006

Recent Posts

Jason -
I'm seeing the same behavior.
JR -
Any thoughts?
Thanks,
Josh

21:55:08,218 INFO [DialectDetector:64] Determining dialect for MySQL 5
21:55:08,219 INFO [DialectDetector:97] Using dialect org.hibernate.dialect.MySQLDialect
21:55:09,586 INFO [DialectDetector:64] Determining dialect for HSQL Database Engine 1
21:55:09,587 WARN [DialectDetector:79] Liferay is configured to use Hypersonic as its database. Do NOT use Hypersonic in production. Hypersonic is an embedded database useful for development and demo'ing purposes. The database settings can be changed in portal.properties.
21:55:09,594 INFO [DialectDetector:97] Using dialect org.hibernate.dialect.HSQLDialect
Joshua Asbury
RE: Re: [Liferay Forums][1. Installation / Deployment / Setup] RE: Database
February 4, 2009 2:29 PM
Answer

Joshua Asbury

LIFERAY STAFF

Rank: Expert

Posts: 497

Join Date: September 8, 2006

Recent Posts

Looks like the wol-portlet is somehow bringing in HSQL. Try removing it and then starting Tomcat.

I'll see if I can figure out where this is happening and let everyone know...
Kevin S Neibarger
RE: Re: [Liferay Forums][1. Installation / Deployment / Setup] RE: Database
February 6, 2009 8:22 AM
Answer

Kevin S Neibarger

Rank: New Member

Posts: 12

Join Date: December 4, 2008

Recent Posts

I'm actually using 5.1.2 not 5.2. I don't know if that makes a difference. I'm glad you got it working
Nicholas Ho
RE: Re: [Liferay Forums][1. Installation / Deployment / Setup] RE: Database
February 13, 2009 1:16 AM
Answer

Nicholas Ho

Rank: New Member

Posts: 6

Join Date: July 2, 2008

Recent Posts

Josh Asbury:
Looks like the wol-portlet is somehow bringing in HSQL. Try removing it and then starting Tomcat.

I'll see if I can figure out where this is happening and let everyone know...



Hi Any Luck on this,

I have tried removing 7Cogs as well
then tried editing the portal-ext.properties with the above

Liferay still starts up by HSQL


been working on it all day - help


NickHO
Nicholas Ho
RE: Re: [Liferay Forums][1. Installation / Deployment / Setup] RE: Database
February 23, 2009 9:23 AM
Answer

Nicholas Ho

Rank: New Member

Posts: 6

Join Date: July 2, 2008

Recent Posts

Hi all,

I got 5.2.1 going with just MYSQL.

Here are the steps
1. Extract the files into /opt
a liferay-portal-5.2.1 directory should be created
DO NOT start liferay at this stage otherwise you will be stuck with the HSQL database

2. Delete the following portlet - these portlet will make request from the HSQL database and make it impossible for you to transition out to use the MYSQL database

3. Delete the following directories from liferay-portal-5.2.1/tomcat-5.5.27/webapps
sevencogs-hook
sevencogs-theme
wol-portlet

4. Make sure you have Mysql running
# /etc/init.d/mysql status | start

create database lportal;
grant a user eg "lportal" and grant all permission to lportal

5. Create a portal-ext.properties file
place the file in /liferay .../tomacat-5.5.27/webapps/ROOT/WEB-INF/classes
Place the following lines in the portal-ext.properties 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=lportal
jdbc.default.password=password
auth.forward.by.last.path=true

6. startup liferay
once the above steps have been completed then
CD /opt/liferay-portal-5.2.1/tomcat-5.5.27/bin

# ./setenv.sh (to ensure environment is ok)
# ./startup.sh

The script will auto populate the mysql database

If you are executing these commands on the server console and you have access to the GUI
Firefox will automatically startup with liferay portlet will display on port 8080 (takes 2 minutes)

Good Luck

NickHo
Suresh Damodaran
RE: Database Configuration Changed in 5.2
March 6, 2009 11:00 AM
Answer

Suresh Damodaran

Rank: New Member

Posts: 4

Join Date: March 6, 2009

Recent Posts

How can the JNDI resource jdbc/LiferayPool be shared with portlets in 5.2.2?

In 5.2.1 and before, there was an easy way to share by defining
<ResourceLink name="jdbc/LiferayPool" global="LiferayPool"/>
in Catalina/ROOT.xml, and defining the JNDI resource in conf/server.xml

(http://www.liferay.com/web/guest/community/forums/-/message_boards/message/383667)

Thanks for the quick response!
Jonas Yuan
RE: Database Configuration Changed in 5.2
March 6, 2009 11:05 AM
Answer

Jonas Yuan

Rank: Liferay Master

Posts: 993

Join Date: April 26, 2007

Recent Posts

Hi,

For the JNDI resource jdbc/LiferayPool, if you prefer to use the pooling mechanism provided by the portal application server you can still do that through spring. In particular add this to the ext-spring.xml file:

<bean id="liferayDataSource"
class="org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy">
<property name="targetDataSource">
<bean
class="com.liferay.portal.spring.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="jdbc/LiferayPool" />
</bean>
</property>
</bean>

Thanks

Jonas Yuan
Lisa Simpson
RE: Database Configuration Changed in 5.2
March 6, 2009 11:52 AM
Answer

Lisa Simpson

Rank: Liferay Legend

Posts: 2034

Join Date: March 5, 2009

Recent Posts

Make sure that you also edit the server.xml to show that it is using MySQL (or whatever) instead of the defaults.
Suresh Damodaran
RE: Database Configuration Changed in 5.2
March 6, 2009 12:21 PM
Answer

Suresh Damodaran

Rank: New Member

Posts: 4

Join Date: March 6, 2009

Recent Posts

Jonas Yuan:
Hi,

For the JNDI resource jdbc/LiferayPool, if you prefer to use the pooling mechanism provided by the portal application server you can still do that through spring. In particular add this to the ext-spring.xml file:

<bean id="liferayDataSource"
class="org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy">
<property name="targetDataSource">
<bean
class="com.liferay.portal.spring.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="jdbc/LiferayPool" />
</bean>
</property>
</bean>

Thanks

Jonas Yuan


Where should ext-spring.xml be placed? In the EXT environment, I see it @ ext-impl/src/META-INF, but I don't know where it will go in the deployed environment, in case I wantto manually place it in the deployment environment. I do see portal-impl.jar (/META-INF) having some spring configurations - is that where it goes? Also, I am supposing you do this after setting
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost/portaldb?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=
jdbc.default.password=

Thanks
Jonas Yuan
RE: Database Configuration Changed in 5.2
March 6, 2009 1:08 PM
Answer

Jonas Yuan

Rank: Liferay Master

Posts: 993

Join Date: April 26, 2007

Recent Posts

Hi,

It is here

{liferay-home}\{tomcat}\webapps\ROOT\WEB-INF\classes

and

{liferay-home}\{tomcat}\webapps\ROOT\WEB-INF\classes\META-INF

Thanks

Jonas Yuan
Shankar Baba
RE: Re: [Liferay Forums][1. Installation / Deployment / Setup] RE: Database
October 19, 2012 12:15 AM
Answer

Shankar Baba

Rank: Regular Member

Posts: 144

Join Date: October 17, 2012

Recent Posts

Hi, Nikolas as u said to remove the folders , i does't have wol portal folder , what should i do?
David H Nebinger
RE: Re: [Liferay Forums][1. Installation / Deployment / Setup] RE: Database
October 19, 2012 5:46 AM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11780

Join Date: September 1, 2006

Recent Posts

Seriously? You revived this dead thread?

If you need to remove a plugin that is not there, it's already been removed...