-->
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.  [ 2 posts ] 
Author Message
 Post subject: Hibernate With Stored Procedure with caching query Broken
PostPosted: Wed Jun 01, 2005 8:41 pm 
Newbie

Joined: Sun Apr 03, 2005 6:47 pm
Posts: 6
Hi,

I am trying to use MS SQL Stored Procedures (SQL 2K) )from Hibernate.(Hibernate 3.0.3)


My named query is cached.
(With a Default Region + Default Settings)

My First time load is working without error.
When I try to access it second time I get a the following error.
From Log I can see that the the "UpdateTimestampsCache" is getting missed. After that It tried to load the object from the database.

The initial loading was done using Stroed Procedure and the second time Hiberante tries to load it using normal "SQL" which it is not supposed to do.
It is suppoed to use the StoredProcedure to load the objects.

Is any one else is having similar issues? Is there any fix for this

Thanks,
patkeep.


FYI:-------



org.hibernate.exception.SQLGrammarException: could not load an entity: [PCode#1]
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:59)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.Loader.loadEntity(Loader.java:1285)
at org.hibernate.loader.entity.EntityLoader.load(EntityLoader.java:141)
at org.hibernate.loader.entity.EntityLoader.load(EntityLoader.java:126)
at org.hibernate.persister.entity.BasicEntityPersister.load(BasicEntityPersister.java:2496)
at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:387)
at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:368)
at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:166)
at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:140)
at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:119)
at org.hibernate.impl.SessionImpl.immediateLoad(SessionImpl.java:577)
at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:59)
at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:80)
at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:134)
at PCode$$EnhancerByCGLIB$$d1a01281.getProcedureCode(<generated>)
at MCode.load(LoadNomenclatures.java:89)




Caused by: com.inet.tds.SQLException: Msg 208, Level 16, State 1, Line 1, Sqlstate S0002
[SQLBOX]Invalid object name 'AutoId'.
at com.inet.tds.a.a(Unknown Source)
at com.inet.tds.g.if(Unknown Source)
at com.inet.tds.g.a(Unknown Source)
at com.inet.tds.g.for(Unknown Source)
at com.inet.tds.c.int(Unknown Source)
at com.inet.tds.c.executeQuery(Unknown Source)
at sun.reflect.GeneratedMethodAccessor63.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.logicalcobwebs.proxool.ProxyStatement.invoke(ProxyStatement.java:68)
at org.logicalcobwebs.cglib.proxy.Proxy$ProxyImpl$$EnhancerByCGLIB$$971ccf12.executeQuery(<generated>)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:118)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1197)
at org.hibernate.loader.Loader.doQuery(Loader.java:366)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:206)
at org.hibernate.loader.Loader.loadEntity(Loader.java:1271)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 03, 2005 9:13 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
please report to JIRA, thanks

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.