db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dyre.Tjeldv...@Sun.COM
Subject Re: derby databse connection in Hibernate
Date Tue, 12 Feb 2008 09:02:32 GMT
cnapagoda <cnapagoda@gmail.com> writes:

> I try to connect derby database using Hibernate. But I got error like this.
>
> Exception in thread "main" org.hibernate.hql.ast.QuerySyntaxException:
> USERINFO is not mapped [FROM USERINFO]
> 	at
> org.hibernate.hql.ast.util.SessionFactoryHelper.requireClassPersister(SessionFactoryHelper.java:158)
> 	at
> org.hibernate.hql.ast.tree.FromElementFactory.addFromElement(FromElementFactory.java:87)
> 	at org.hibernate.hql.ast.tree.FromClause.addFromElement(FromClause.java:70)
> 	at
> org.hibernate.hql.ast.HqlSqlWalker.createFromElement(HqlSqlWalker.java:255)
> 	at
> org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElement(HqlSqlBaseWalker.java:3056)
> 	at
> org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElementList(HqlSqlBaseWalker.java:2945)
> 	at
> org.hibernate.hql.antlr.HqlSqlBaseWalker.fromClause(HqlSqlBaseWalker.java:688)
> 	at
> org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:544)
> 	at
> org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:281)
> 	at
> org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:229)
> 	at
> org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:228)
> 	at
> org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:160)
> 	at
> org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:111)
> 	at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:77)
> 	at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:56)
> 	at
> org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72)
> 	at
> org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133)
> 	at
> org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112)
> 	at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1623)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> 	at java.lang.reflect.Method.invoke(Unknown Source)
> 	at
> org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:301)
> 	at $Proxy0.createQuery(Unknown Source)
> 	at com.test.Htest.listEvents(Htest.java:44)
> 	at com.test.Htest.main(Htest.java:25)
>
>
> My datadase name is power_moniter, table name is userinfo.
>
> why i'm I got error like that?

AFAICT no part of your stack trace is from Derby. So my guess would be
that you have encountered a Hibernate bug...

Dyre

Mime
View raw message