Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Christian Merkel
Switch Database from HSQL to MySQL - still Hypersonic?
January 27, 2010 12:23 AM
Answer

Christian Merkel

Rank: Regular Member

Posts: 111

Join Date: December 14, 2009

Recent Posts

HI,


liferay shows this warning-message when starting up using hsql:

1Liferay 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




i now set mysql the default db-engin in portal-ext. it loads the data, but in log there are still some warnings:
1Loading file:/D:/liferay/tomcat-6.0.18/webapps/wol-portlet/WEB-INF/classes/service.properties
208:18:24,765 INFO  [DialectDetector:64] Determining dialect for MySQL 5
308:18:24,765 INFO  [DialectDetector:97] Using dialect org.hibernate.dialect.MySQLDialect
4Loading file:/D:/liferay/tomcat-6.0.18/webapps/wol-portlet/WEB-INF/classes/service.properties
508:18:27,671 INFO  [DialectDetector:64] Determining dialect for HSQL Database Engine 1
608:18:27,671 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.
708:18:27,687 INFO  [DialectDetector:97] Using dialect org.hibernate.dialect.HSQLDialect


why that? do some portlets use there own db-connection?

pls help :<
Juan Fernández
RE: Switch Database from HSQL to MySQL - still Hypersonic?
January 27, 2010 1:57 AM
Answer

Juan Fernández

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1262

Join Date: October 2, 2008

Recent Posts

Hi:
every portlet has its own configuration file. It seems that the wol portlet is still using HSQL.

To fix this, just update the properties file in the wol portlet

Regards
Juan Fernández
Christian Merkel
RE: Switch Database from HSQL to MySQL - still Hypersonic?
January 27, 2010 2:07 AM
Answer

Christian Merkel

Rank: Regular Member

Posts: 111

Join Date: December 14, 2009

Recent Posts

Oki, thx.

I found this Entry in "jdbc.properties" in wol-portlet/web-inf:
1jira.driverClassName=org.hsqldb.jdbcDriver
2jira.url=jdbc:hsqldb:mem:jira
3jira.username=sa
4jira.password=



Now i need to change the hsqldb driver to mysql...
but how to config the url?

is it the same as in the portal-ext.properties?
Juan Fernández
RE: Switch Database from HSQL to MySQL - still Hypersonic?
January 27, 2010 2:47 AM
Answer

Juan Fernández

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1262

Join Date: October 2, 2008

Recent Posts

You have to behave like you where in the portal.
This is: create a portal-ext.properties en WEB_INF/src and add the following lines (with your data):

1    # MySQL
2   
3    jdbc.default.driverClassName=com.mysql.jdbc.Driver
4    jdbc.default.url=jdbc:mysql://localhost/liferay_53?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
5    jdbc.default.username=liferay
6    jdbc.default.password=liferay


Regards
David Mendoza
RE: Switch Database from HSQL to MySQL - still Hypersonic?
July 15, 2010 12:44 PM
Answer

David Mendoza

Rank: New Member

Posts: 16

Join Date: September 8, 2004

Recent Posts

Juan Fernández:
You have to behave like you where in the portal.
This is: create a portal-ext.properties en WEB_INF/src and add the following lines (with your data):

1    # MySQL
2   
3    jdbc.default.driverClassName=com.mysql.jdbc.Driver
4    jdbc.default.url=jdbc:mysql://localhost/liferay_53?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
5    jdbc.default.username=liferay
6    jdbc.default.password=liferay


Regards


This doesn't work Juan you have to change the WEB_INF/jdbc.properties, so that the wol-portlet creates the jira tables on your mysql database...

David M.
Juan Fernández
RE: Switch Database from HSQL to MySQL - still Hypersonic?
July 16, 2010 1:28 AM
Answer

Juan Fernández

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1262

Join Date: October 2, 2008

Recent Posts

Oops, you're right
Thanks! emoticon
Denis Signoretto
RE: Switch Database from HSQL to MySQL - still Hypersonic?
July 19, 2010 12:57 AM
Answer

Denis Signoretto

Rank: Expert

Posts: 307

Join Date: April 21, 2009

Recent Posts

Hi Juan,

what about connection pooling? WOL, or in general other portlets build on service builder, use the portal connection pooling?

Thanks,
D.
Henrik Bernström
RE: Switch Database from HSQL to MySQL - still Hypersonic?
July 20, 2010 3:06 AM
Answer

Henrik Bernström

Rank: Junior Member

Posts: 43

Join Date: October 5, 2007

Recent Posts

I can't see why you in general would like to put your database connection configuration in the portlet itself. Perhaps in a very specific case where you won't share the portlet back to the community, but even then I'm really sceptic about that approach.

I tend to solve it in Tomcat and MySQL with connection pooling.

{LIFERAY_HOME}/portal-ext.properties
 1
 2##
 3## JDBC
 4##
 5
 6    #
 7    # MySQL
 8    #
 9    jdbc.default.jndi.name=jdbc/LiferayPool
10
11    jdbc.another.jndi.name=jdbc/AnotherPool


{LIFERAY_HOME}/tomcat.../conf/context.xml
 1
 2<Context>
 3
 4        <Resource
 5                name="jdbc/LiferayPool"
 6                auth="Container"
 7                type="javax.sql.DataSource"
 8                driverClassName="com.mysql.jdbc.Driver"
 9                url="jdbc:mysql://[HOST]:3306/lportal?useUnicode=true&amp;characterEncoding=UTF-8&amp;useFastDateParsing=false"
10                username="[USERNAME]"
11                password="[PASSWORD]"
12                maxActive="20"
13        />
14             
15        <Resource
16                name="jdbc/AnotherPool"
17                auth="Container"
18                type="javax.sql.DataSource"
19                driverClassName="com.mysql.jdbc.Driver"
20                url="jdbc:mysql://[HOST]:3306/[DATABASE]?useUnicode=true&amp;characterEncoding=UTF-8&amp;useFastDateParsing=false"
21                username="[USERNAME]"
22                password="[PASSWORD]"
23                maxActive="20"
24        />
25...


Cheers,

/Henrik