Foren
could not execute query
Sam Wan, geändert vor 13 Jahren.
could not execute query
Liferay Master Beiträge: 660 Beitrittsdatum: 03.03.09 Neueste Beiträge
Hi,
With liferay EE SP4, Spring 3.0 and JPA, I encountered the following error when I tried to add this portlet onto the page.
Here is a fragment of the JPA code that dealing with the database table,
Can anyone tell me a way how to debug this error?
Your help and suggestion is greatly appreciated.
Thanks
Sam
With liferay EE SP4, Spring 3.0 and JPA, I encountered the following error when I tried to add this portlet onto the page.
Caused by: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not execute query
at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:637)
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:74)
... 198 more
Caused by: org.hibernate.exception.GenericJDBCException: could not execute query
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.Loader.doList(Loader.java:2216)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
at org.hibernate.loader.Loader.list(Loader.java:2099)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:65)
... 198 more
Caused by: java.sql.SQLException: invalid schema name: LIFERAY in statement [select user0_.user_id as user1_8_, user0_.first_name as first2_8_, user0_.last_name as last3_8_, user0_.middle_name as middle4_8_, user0_.screen_name as screen5_8_ from liferay.user_ user0_]
at org.hsqldb.jdbc.Util.throwError(Unknown Source)
at org.hsqldb.jdbc.jdbcPreparedStatement.<init>(Unknown Source)
at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source)
at org.apache.commons.dbcp.DelegatingConnection.prepareStatement(DelegatingConnection.java:248)
at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.prepareStatement(PoolingDataSource.java:302)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:505)
</init>
Here is a fragment of the JPA code that dealing with the database table,
@SuppressWarnings("unchecked")
public List<partnerassociate> findAllPartnerAssociates() {
return (List<partnerassociate>) entityManager().createQuery("select o from User o")
.getResultList();
}
</partnerassociate></partnerassociate>
Can anyone tell me a way how to debug this error?
Your help and suggestion is greatly appreciated.
Thanks
Sam