-->
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.  [ 1 post ] 
Author Message
 Post subject: how to call derby stored procedure in hibernate
PostPosted: Thu Apr 17, 2008 3:44 am 
Newbie

Joined: Thu Apr 17, 2008 3:29 am
Posts: 1
i have used the following things in toplink for calling derby stored procedure , it works fine

@SqlResultSetMapping(name = "LedgerGroupMapping",
entities = {@EntityResult(entityClass = LedgerGroup.class)})

@NamedNativeQueries( {
@NamedNativeQuery(name = "LedgerGroup.getLedgerGroupsBasedonParentLedgerGroupTODepthN", query = "call app.getLedgerGroupsBasedonParentLedgerGroupTODepthN(?)", resultSetMapping = "LedgerGroupMapping")})


now i am trying this in hibernate it cause following exception


javax.persistence.PersistenceException: [PersistenceUnit: AddressPU] Unable to configure EntityManagerFactory
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:265)
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:125)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:52)
at com.cyberbeoz.databasehandler.DatabaseHandler.openDatabase(DatabaseHandler.java:797)
... 5 more
Caused by: org.hibernate.cfg.NotYetImplementedException: Pure native scalar queries are not yet supported
at org.hibernate.cfg.annotations.QueryBinder.bindNativeQuery(QueryBinder.java:118)
at org.hibernate.cfg.annotations.QueryBinder.bindNativeQueries(QueryBinder.java:197)
at org.hibernate.cfg.AnnotationBinder.bindQueries(AnnotationBinder.java:307)
at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:437)
at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:534)
at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:286)
at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1121)
at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1225)
at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:159)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:854)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:191)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:253)
... 8 more


how to run the procedure call in named nativequery in hibernate ?


ashok
[/b]


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

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.