-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: hibernate error??
PostPosted: Fri Oct 17, 2008 10:25 pm 
Newbie

Joined: Wed Sep 10, 2008 2:04 am
Posts: 10
I get this kind of error message in my log file where saying that model file is not mapped. anyone can tell my what the problem?

thanks.

2008-10-18 10:00:56,463 DEBUG [org.hibernate.hql.ast.ErrorCounter] throwQueryException() : no errors
2008-10-18 10:00:56,463 DEBUG [org.hibernate.hql.antlr.HqlSqlBaseWalker] query() << begin, level = 1
2008-10-18 10:00:56,478 ERROR [org.hibernate.hql.PARSER] *** ERROR: SpInvRec is not mapped.
2008-10-18 10:00:56,478 DEBUG [org.hibernate.hql.ast.ErrorCounter] SpInvRec is not mapped.
SpInvRec is not mapped.
at org.hibernate.hql.ast.SessionFactoryHelper.requireClassPersister(SessionFactoryHelper.java:85)
at org.hibernate.hql.ast.FromElementFactory.addFromElement(FromElementFactory.java:77)
at org.hibernate.hql.ast.FromClause.addFromElement(FromClause.java:67)
at org.hibernate.hql.ast.HqlSqlWalker.createFromElement(HqlSqlWalker.java:217)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElement(HqlSqlBaseWalker.java:2830)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElementList(HqlSqlBaseWalker.java:2719)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromClause(HqlSqlBaseWalker.java:513)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:371)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:201)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:151)
at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:189)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:130)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:83)
at org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:427)
at org.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:884)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:834)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
at my.com.shinyang.ilms.service.UtilitiesBean.updateHubDB(UtilitiesBean.java:913)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:130)
at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:51)
at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:139)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
at org.jboss.ejb.Container.invoke(Container.java:873)
at sun.reflect.GeneratedMethodAccessor79.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:805)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:406)
at sun.reflect.GeneratedMethodAccessor78.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:534)
2008-10-18 10:00:56,493 DEBUG [org.hibernate.hql.antlr.HqlSqlBaseWalker] query() : finishing up , level = 1
2008-10-18 10:00:56,493 DEBUG [org.hibernate.hql.ast.HqlSqlWalker] processQuery() : ( SELECT FromClause{level=1} ( where ( and ( = invoiceNo 'do17' ) ( = point 'ABIT' ) ) ) )
2008-10-18 10:00:56,493 DEBUG [org.hibernate.hql.ast.HqlSqlWalker] Derived SELECT clause created.
2008-10-18 10:00:56,493 DEBUG [org.hibernate.hql.antlr.HqlSqlBaseWalker] query() >> end, level = 1
2008-10-18 10:00:56,493 DEBUG [org.hibernate.hql.ast.AST] --- SQL AST ---
\-[SELECT] QueryNode: 'SELECT'
+-[SELECT_CLAUSE] SelectClause: '{derived select clause}'
+-[FROM] FromClause: 'from' FromClause{level=1, fromElementCounter=0, fromElements=0, fromElementByClassAlias=[], fromElementByTableAlias=[], fromElementsByPath=[], collectionJoinFromElementsByPath=[], impliedElements=[]}
\-[WHERE] SqlNode: 'where'
\-[AND] SqlNode: 'and'
+-[EQ] SqlNode: '='
| +-[IDENT] IdentNode: 'invoiceNo' {originalText=invoiceNo}
| \-[QUOTED_STRING] LiteralNode: ''do17''
\-[EQ] SqlNode: '='
+-[IDENT] IdentNode: 'point' {originalText=point}
\-[QUOTED_STRING] LiteralNode: ''ABIT''

2008-10-18 10:00:56,493 INFO [STDOUT] org.hibernate.hql.ast.QuerySyntaxError: SpInvRec is not mapped. [from SpInvRec where invoiceNo='do17' and point='ABIT']
at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:63)
at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:196)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:130)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:83)
at org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:427)
at org.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:884)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:834)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
at my.com.shinyang.ilms.service.UtilitiesBean.updateHubDB(UtilitiesBean.java:913)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:130)
at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:51)
at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:139)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
at org.jboss.ejb.Container.invoke(Container.java:873)
at sun.reflect.GeneratedMethodAccessor79.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:805)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:406)
at sun.reflect.GeneratedMethodAccessor78.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:534)
Caused by: SpInvRec is not mapped.
at org.hibernate.hql.ast.SessionFactoryHelper.requireClassPersister(SessionFactoryHelper.java:85)
at org.hibernate.hql.ast.FromElementFactory.addFromElement(FromElementFactory.java:77)
at org.hibernate.hql.ast.FromClause.addFromElement(FromClause.java:67)
at org.hibernate.hql.ast.HqlSqlWalker.createFromElement(HqlSqlWalker.java:217)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElement(HqlSqlBaseWalker.java:2830)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElementList(HqlSqlBaseWalker.java:2719)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromClause(HqlSqlBaseWalker.java:513)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:371)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:201)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:151)
at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:189)
... 45 more
2008-10-18 10:00:56,493 DEBUG [org.hibernate.impl.SessionImpl] closing session
2008-10-18 10:00:56,493 INFO [MySQL] Profiler Event: [QUERY] at at org.jboss.resource.adapter.jdbc.local.LocalManagedConnection.rollback(LocalManagedConnection.java:119) duration: 0 ms, connection-id: 0, statement-id: 999, resultset-id: 0, message: rollback
2008-10-18 10:00:56,493 INFO [MySQL] Profiler Event: [FETCH] at at org.jboss.resource.adapter.jdbc.local.LocalManagedConnection.rollback(LocalManagedConnection.java:119) duration: 0 ms, connection-id: 0, statement-id: 999, resultset-id: 0
2008-10-18 10:00:56,493 DEBUG [org.hibernate.transaction.CacheSynchronization] transaction after completion callback, status: 4
2008-10-18 10:00:56,493 DEBUG [org.hibernate.jdbc.JDBCContext] after transaction completion
2008-10-18 10:00:56,493 DEBUG [org.hibernate.impl.SessionImpl] after transaction completion
2008-10-18 10:01:42,165 DEBUG [org.hibernate.jdbc.ConnectionManager] running Session.finalize()
2008-10-18 10:01:42,165 DEBUG [org.hibernate.jdbc.ConnectionManager] running Session.finalize()
2008-10-18 10:06:25,238 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemover notifying pools, interval: 450000
2008-10-18 10:10:44,538 INFO [org.jboss.system.server.Server] JBoss SHUTDOWN: Undeploying all packages


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 18, 2008 8:38 am 
Pro
Pro

Joined: Tue Jun 12, 2007 4:13 am
Posts: 209
Location: Berlin, Germany
Sorry klhuang, we just can take it as what it logs:
Quote:
2008-10-18 10:00:56,493 INFO [STDOUT] org.hibernate.hql.ast.QuerySyntaxError: SpInvRec is not mapped. [from SpInvRec where invoiceNo='do17' and point='ABIT']


You should provide us with more information:

- How did you map SpInvRec?

- Do you have a persistence.xml and did you enlisten SpInvRec there?

_________________
Carlo
-----------------------------------------------------------
please don't forget to rate if this post helped you


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 19, 2008 11:01 pm 
Newbie

Joined: Wed Sep 10, 2008 2:04 am
Posts: 10
ya, this is the mapping file.

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!-- Generated Jun 9, 2006 3:52:41 PM by Hibernate Tools 3.1.0 beta3 -->
<hibernate-mapping>
<class name="my.com.shinyang.ilms.model.SpInvRec" table="sp_inv_rec">
<id name="id" type="long">
<column name="ID" />
<generator class="native" />
</id>
<property name="point" type="string">
<column name="POINT" length="20" not-null="true" />
</property>
<property name="vendorType" type="string">
<column name="VENDOR_TYPE" length="20" />
</property>
<property name="vendorId" type="string">
<column name="VENDOR_ID" length="20" not-null="true" />
</property>
<property name="invoiceNo" type="string">
<column name="INVOICE_NO" length="100" not-null="true" />
</property>
<property name="createDate" type="date">
<column name="CREATE_DATE" length="10" />
</property>
<property name="dueDate" type="date">
<column name="DUE_DATE" length="10" />
</property>
<property name="termCode" type="string">
<column name="TERM_CODE" length="20" not-null="true" />
</property>
<property name="currencyId" type="string">
<column name="CURRENCY_ID" length="20" not-null="true" />
</property>
<property name="receivedBy" type="string">
<column name="RECEIVED_BY" length="20" not-null="true" />
</property>
<property name="charges1" type="big_decimal">
<column name="CHARGES1" sql-type="decimal(10,2)" />
</property>
<property name="charges2" type="big_decimal">
<column name="CHARGES2" sql-type="decimal(10,2)" />
</property>
<property name="charges3" type="big_decimal">
<column name="CHARGES3" sql-type="decimal(10,2)" />
</property>
<property name="charges4" type="big_decimal">
<column name="CHARGES4" sql-type="decimal(10,2)" />
</property>
<property name="charges5" type="big_decimal">
<column name="CHARGES5" sql-type="decimal(10,2)" />
</property>
<property name="charges6" type="big_decimal">
<column name="CHARGES6" sql-type="decimal(10,2)" />
</property>
<property name="charges7" type="big_decimal">
<column name="CHARGES7" sql-type="decimal(10,2)" />
</property>
<property name="charges8" type="big_decimal">
<column name="CHARGES8" sql-type="decimal(10,2)" />
</property>
<property name="remark" type="string">
<column name="REMARK" length="200" />
</property>
<property name="regNo" type="string">
<column name="REG_NO" length="20" />
</property>
<property name="post" type="boolean">
<column name="POST" not-null="true" />
</property>
<property name="updateBy" type="string">
<column name="UPDATE_BY" length="100" />
</property>
<property name="updateOn" type="timestamp">
<column name="UPDATE_ON" length="19" />
</property>
<property name="readyBackup" type="boolean">
<column name="READY_BACKUP" />
</property>
<property name="backupOn" type="timestamp">
<column name="BACKUP_ON" length="19" />
</property>
<list name="spInvRecItems" inverse="true" lazy="false" cascade="none">
<key>
<column name="INV_REC_ID" not-null="true" />
</key>
<index column="ITEM_INDEX" type="integer"/>
<one-to-many class="my.com.shinyang.ilms.model.SpInvRecItem" />
</list>
</class>
</hibernate-mapping>


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.