掲示板

Liferay und Mysql

thumbnail
12年前 に Serdar Ayalp によって更新されました。

Liferay und Mysql

Junior Member 投稿: 45 参加年月日: 11/09/02 最新の投稿
Hey guys,

I have the following problem. According to the Liferay documentation I wrote the following lines in the file "portal-ext.properties", to use mysql instead of hsql

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


and then restarted the Server. All tables should now be automatically created. But unfortunately, the database is empty. I'm working with Liferay 6.0.6 and Linux Debian. This works fine under Windows. What could be the problem?

greetings from Berlin
thumbnail
12年前 に David H Nebinger によって更新されました。

RE: Liferay und Mysql

Liferay Legend 投稿: 14919 参加年月日: 06/09/02 最新の投稿
A couple of prereqs there - the database must exist and the credentials must exist and be valid, and the credentials require permissions to create and alter objects (we do the "grant all on * to ..." for the liferay login since that is the only box the credentials are good from.
thumbnail
12年前 に Milen Dyankov によって更新されました。

RE: Liferay und Mysql

Regular Member 投稿: 171 参加年月日: 09/09/23 最新の投稿
Examine your log files to
  • make sure you are actually using MySQL. There should be a message in the logs telling you which database you are using. If it says it's HSQL then probably your portal-ext.properties is wrong or placed in wrong location
  • see if there are any error messages regarding tables creation. It should tell you what the problem is (can not connect, the database does not exists, insuficient permissions, ...)
thumbnail
12年前 に Serdar Ayalp によって更新されました。

RE: Liferay and Mysql

Junior Member 投稿: 45 参加年月日: 11/09/02 最新の投稿
hey guys,
thank you for your quick response, here is my log entries from today, after I have started the Tomcat Server again.


01.12.2011 09:13:03 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib/jvm/java-6-sun-1.6.0.22/jre/lib/i386/client:/usr/lib/jvm/java-6-sun-1.6.0.22/jre/lib/i386:/usr/lib/jvm/java-6-sun-1.6.0.22/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
01.12.2011 09:13:03 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
01.12.2011 09:13:03 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 768 ms
01.12.2011 09:13:03 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
01.12.2011 09:13:03 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
01.12.2011 09:13:03 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor ROOT.xml
01.12.2011 09:14:04 org.apache.catalina.core.StandardContext start
SCHWERWIEGEND: Error listenerStart
01.12.2011 09:14:04 org.apache.catalina.core.StandardContext start
SCHWERWIEGEND: Context [] startup failed due to previous errors
01.12.2011 09:14:09 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory google-maps-portlet
01.12.2011 09:14:09 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory kaleo-web
01.12.2011 09:14:10 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory tunnel-web
01.12.2011 09:14:10 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory wsrp-portlet
01.12.2011 09:14:13 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory sevencogs-hook
01.12.2011 09:14:13 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory chat-portlet
01.12.2011 09:14:13 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory mysqlconnector
01.12.2011 09:14:13 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory sevencogs-mobile-theme
01.12.2011 09:14:13 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory social-networking-portlet
01.12.2011 09:14:14 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory web-form-portlet
01.12.2011 09:14:14 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory sevencogs-theme
01.12.2011 09:14:14 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory .svn
01.12.2011 09:14:14 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory mail-portlet
01.12.2011 09:14:14 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory opensocial-portlet
01.12.2011 09:14:20 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory default-site-templates-hook
01.12.2011 09:14:20 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
01.12.2011 09:14:20 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
01.12.2011 09:14:20 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/30 config=null
01.12.2011 09:14:20 org.apache.catalina.startup.Catalina start
INFO: Server startup in 77071 ms
thumbnail
12年前 に Mani kandan によって更新されました。

RE: Liferay and Mysql

Expert 投稿: 492 参加年月日: 10/09/15 最新の投稿
It seems that your whole ROOT webapp is not starting;
Maybe it got corrupted or deleted ?!

Can you elaborate some more on your setup?
Did you build Liferay yourself or is it a downloaded bundle?
What version liferay is it?
Check this thread
thumbnail
12年前 に Serdar Ayalp によって更新されました。

RE: Liferay and Mysql

Junior Member 投稿: 45 参加年月日: 11/09/02 最新の投稿
Hi Mani,

I've downloaded a bundle (Liferay 6.0.6, Tomcat 6.0.29). All files are in my SVN server (A Linux computer, Debian). When I check out everything from this repository on a Windows computer and start Tomcat, everything works fine, the database tables are created and filled. But when I check out everything from the repository on the same Linux machine, then the tables are not created. Of course, I have created the database and assign the rights previously

GRANT ALL PRIVILEGES ON <NEW_DATABASE>.* TO '<NEW_USER>'@'localhost' IDENTIFIED BY '<NEW_PASSWORD>';


I wrote the following lines in the file "portal-ext.properties", to use mysql instead of hsql

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


In the log file above, you can already see that the server was started, but as I said, tables are empty.

In the browser I get the following message

HTTP Status 404
type Status report
message
description The requested resource () is not available.
Apache Tomcat/6.0.29



Greetings