留言板

mysql: table not found error on ubuntu

Shaun Enslin,修改在16 年前。

mysql: table not found error on ubuntu

New Member 帖子: 14 加入日期: 06-12-2 最近的帖子
Hi

I have unzipped the liferay portal and if I run under default database then all ok. I want to run under have mysql and have created the lportal database in mysql using the mysql-minimal sql file.

I have changed config in ROOT.xml to point to mysql as below (the username and password are correct)

<Resource name="jdbc/LiferayPool"

auth="Container"

type="javax.sql.DataSource"

driverClassName="com.mysql.jdbc.Driver"

url="jdbc:mysql://localhost:3306/lportal?useUnicode=true&amp;characterEncoding=UTF-8"

username="root"

password="sydney"

maxActive="20" />

Liferay can see the mysql jdbc driver, but I get the errors below that the tables cant be found in lportal. However if I look at the database in mysql administrator I can see the tables on the database.

------> logs
11:32:56,033 ERROR [HibernateUtil:174] Caught HibernateException. could not load an entity: [com.liferay.portal.model.impl.ReleaseImpl#1]
11:32:56,045 ERROR [MainServlet:145] com.liferay.portal.struts.ActionException: com.liferay.portal.struts.ActionException: com.liferay.portal.SystemException: org.hibernate.exception.SQLGrammarException: could not load an entity: [com.liferay.portal.model.impl.ReleaseImpl#1]
at com.liferay.portal.events.EventsProcessor._process(EventsProcessor.java:155)
at com.liferay.portal.events.EventsProcessor.process(EventsProcessor.java:76)
at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:138)
at javax.servlet.GenericServlet.init(GenericServlet.java:211)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)

at org.hibernate.impl.SessionImpl.get(SessionImpl.java:808)
at com.liferay.portal.service.persistence.ReleasePersistence.fetchByPrimaryKey(ReleasePersistence.java:168)
... 46 more
Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'lportal.Release_' doesn't exist
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2941)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1623)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1715)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3249)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1268)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1403)
at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery
Jeff .,修改在16 年前。

RE: mysql: table not found error on ubuntu

New Member 帖子: 6 加入日期: 07-8-6 最近的帖子
I have seen a very similar problem installing on RedHat ES 4. I'm curious if there is a case sensitivity issue since we have not seen this problem on Windows. In my case the problem table was 'company', but the root error message referred to the 'Company' table, e.g.

Caused by: java.sql.SQLException: Table 'astg_portal.Company' doesn't exist


Any ideas?

Thanks,
Jeff