Announcement Announcement Module
Collapse
No announcement yet.
schema "lportal" does not exist Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • schema "lportal" does not exist

    Hi,

    With Spring 3.0 and Postgresql 8.4.3, I got an exception when the project tried to access a database schema "lportal".

    Here is the exceptions:

    Hibernate: select industry0_.entryId as entryId0_, industry0_.name as name0_, (SELECT v.name FROM lportal.TagsVocabulary v WHERE v.vocabularyId = industry0_.vocabularyId) as formula1_ from lportal.TagsEntry industry0_ where (SELECT v.name FROM lportal.TagsVocabulary v WHERE v.vocabularyId = industry0_.vocabularyId)='Industry' order by industry0_.name
    2010-09-20 13:57:42,466 [ERROR] [ContainerBackgroundProcessor[StandardEngine[Catalina]]] com.liferay.portal.deploy.hot.PortletHotDeployList ener - org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'com.ixsystems.msp.domain.loader.VocabularyLoader# 0' defined in PortletContext resource [/WEB-INF/context/data/loader.xml]: Invocation of init method failed; nested exception is org.springframework.orm.jpa.JpaSystemException: org.hibernate.exception.GenericJDBCException: could not execute query; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not execute query
    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'com.ixsystems.msp.domain.loader.VocabularyLoader# 0' defined in PortletContext resource [/WEB-INF/context/data/loader.xml]: Invocation of init method failed; nested exception is org.springframework.orm.jpa.JpaSystemException:
    ....
    org.apache.catalina.startup.HostConfig.checkResour ces(HostConfig.java:1116)
    at org.apache.catalina.startup.HostConfig.check(HostC onfig.java:1214)
    at org.apache.catalina.startup.HostConfig.lifecycleEv ent(HostConfig.java:293)
    at org.apache.catalina.util.LifecycleSupport.fireLife cycleEvent(LifecycleSupport.java:117)
    at org.apache.catalina.core.ContainerBase.backgroundP rocess(ContainerBase.java:1337)
    at org.apache.catalina.core.ContainerBase$ContainerBa ckgroundProcessor.processChildren(ContainerBase.ja va:1601)
    at org.apache.catalina.core.ContainerBase$ContainerBa ckgroundProcessor.processChildren(ContainerBase.ja va:1610)
    at org.apache.catalina.core.ContainerBase$ContainerBa ckgroundProcessor.run(ContainerBase.java:1590)
    at java.lang.Thread.run(Thread.java:619)
    Caused by: org.springframework.orm.jpa.JpaSystemException: org.hibernate.exception.GenericJDBCException: could not execute query; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not execute query
    at org.springframework.orm.jpa.EntityManagerFactoryUt ils.convertJpaAccessExceptionIfPossible(EntityMana gerFactoryUtils.java:312)
    at org.springframework.orm.jpa.aspectj.JpaExceptionTr anslatorAspect.ajc$afterThrowing$org_springframewo rk_orm_jpa_aspectj_JpaExceptionTranslatorAspect$1$ 18a1ac9(JpaExceptionTranslatorAspect.aj:15)
    at com.ixsystems.msp.persistence.jpa.GenericReadOnlyJ paDAO.findByCriteria(GenericReadOnlyJpaDAO.java:90 )
    at com.ixsystems.msp.persistence.jpa.GenericVocabular yJpaDAO.findByCriteria(GenericVocabularyJpaDAO.jav a:31)
    at com.ixsystems.msp.persistence.jpa.GenericVocabular yJpaDAO.findAll(GenericVocabularyJpaDAO.java:12)
    at com.ixsystems.msp.domain.loader.VocabularyLoader.a fterPropertiesSet(VocabularyLoader.java:56)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:1469)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1409)
    ... 38 more
    Caused by: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not execute query
    at org.hibernate.ejb.AbstractEntityManagerImpl.throwP ersistenceException(AbstractEntityManagerImpl.java :614)
    at org.hibernate.ejb.QueryImpl.getResultList(QueryImp l.java:76)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.springframework.orm.jpa.SharedEntityManagerCre ator$DeferredQueryInvocationHandler.invoke(SharedE ntityManagerCreator.java:310)
    at $Proxy336.getResultList(Unknown Source)
    ... 44 more
    Caused by: org.hibernate.exception.GenericJDBCException: could not execute query
    at org.hibernate.exception.SQLStateConverter.handledN onSpecificException(SQLStateConverter.java:103)
    at org.hibernate.exception.SQLStateConverter.convert( SQLStateConverter.java:91)
    at org.hibernate.exception.JDBCExceptionHelper.conver t(JDBCExceptionHelper.java:43)
    at org.hibernate.loader.Loader.doList(Loader.java:221 6)
    at org.hibernate.loader.Loader.listIgnoreQueryCache(L oader.java:2104)
    at org.hibernate.loader.Loader.list(Loader.java:2099)
    at org.hibernate.loader.hql.QueryLoader.list(QueryLoa der.java:378)
    at org.hibernate.hql.ast.QueryTranslatorImpl.list(Que ryTranslatorImpl.java:338)
    at org.hibernate.engine.query.HQLQueryPlan.performLis t(HQLQueryPlan.java:172)
    at org.hibernate.impl.SessionImpl.list(SessionImpl.ja va:1121)
    at org.hibernate.impl.QueryImpl.list(QueryImpl.java:7 9)
    at org.hibernate.ejb.QueryImpl.getResultList(QueryImp l.java:67)
    ... 50 more
    Caused by: org.postgresql.util.PSQLException: ERROR: schema "lportal" does not exist
    Position: 179
    at org.postgresql.core.v3.QueryExecutorImpl.receiveEr rorResponse(QueryExecutorImpl.java:2062)
    at org.postgresql.core.v3.QueryExecutorImpl.processRe sults(QueryExecutorImpl.java:1795)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(Q ueryExecutorImpl.java:257)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execut e(AbstractJdbc2Statement.java:479)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execut eWithFlags(AbstractJdbc2Statement.java:367)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execut eQuery(AbstractJdbc2Statement.java:271)
    at org.apache.commons.dbcp.DelegatingPreparedStatemen t.executeQuery(DelegatingPreparedStatement.java:93 )
    at org.hibernate.jdbc.AbstractBatcher.getResultSet(Ab stractBatcher.java:186)
    at org.hibernate.loader.Loader.getResultSet(Loader.ja va:1787)
    at org.hibernate.loader.Loader.doQuery(Loader.java:67 4)
    at org.hibernate.loader.Loader.doQueryAndInitializeNo nLazyCollections(Loader.java:236)
    at org.hibernate.loader.Loader.doList(Loader.java:221 3)
    ... 58 more
    in database.properties file:
    database.url=jdbc\ostgresql\://localhost:5432/tmpp
    database.username=tmpp
    database.password=password
    database.driverClassName=org.postgresql.Driver
    I also created two users for two databases:
    lportal=# create user bigboss with password 'password';
    CREATE ROLE
    lportal=# grant all privileges on database lportal to bigboss;
    GRANT
    lportal=#
    template1=# create user tmpp with password 'password';
    CREATE ROLE
    template1=# grant all privileges on database lportal to tmpp;
    GRANT
    template1=#
    What is wrong with my database/user setup?

    Very appreciate for any suggestion and help.
    Thanks
    Sam
Working...
X