-->
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: Error while execute procedure with SQL server
PostPosted: Mon Jun 02, 2014 11:02 am 
Newbie

Joined: Mon Jun 02, 2014 10:58 am
Posts: 1
Hi All,
I am getting some syntax related issue while executing store procedure with SQL SERVER

i.e (15:33:43,053 INFO [stdout] (http-localhost-127.0.0.1-5050-7) query -- SQLQueryImpl({call SquareSP3(:MyFirstParam)})
15:33:43,894 WARN [org.hibernate.util.JDBCExceptionReporter] (http-localhost-127.0.0.1-5050-7) SQL Error: 0, SQLState: null
15:33:43,895 ERROR [org.hibernate.util.JDBCExceptionReporter] (http-localhost-127.0.0.1-5050-7) A result set was generated for update.
15:33:44,175 WARN [org.hibernate.util.JDBCExceptionReporter] (http-localhost-127.0.0.1-5050-7) SQL Error: 102, SQLState: S0001
15:33:44,177 ERROR [org.hibernate.util.JDBCExceptionReporter] (http-localhost-127.0.0.1-5050-7) Incorrect syntax near '{'.
15:33:44,180 ERROR [stderr] (http-localhost-127.0.0.1-5050-7) org.hibernate.exception.SQLGrammarException: could not execute query
15:33:44,182 ERROR [stderr] (http-localhost-127.0.0.1-5050-7) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
15:33:44,183 ERROR [stderr] (http-localhost-127.0.0.1-5050-7) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
15:33:44,185 ERROR [stderr] (http-localhost-127.0.0.1-5050-7) at org.hibernate.loader.Loader.doList(Loader.java:2223)
15:33:44,186 ERROR [stderr] (http-localhost-127.0.0.1-5050-7) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
15:33:44,188 ERROR [stderr] (http-localhost-127.0.0.1-5050-7) at org.hibernate.loader.Loader.list(Loader.java:2099)
15:33:44,190 ERROR [stderr] (http-localhost-127.0.0.1-5050-7) at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:289))

I am using jboss server 7.1, sql server 2012, jdk 1.6, and hibernate 3.
I created datasource in jboss server for that I used one jar file i.e sqljdbc4-3.0.jar.


The entry for calling SP in .hbm file

<sql-query name="getDistributionListCri[b][/b]teria">
{call SquareSP3(:keyParam)}
</sql-query>

Note:if I am specifying db connection related details in hibernate configuration file then I am not getting any issue related to store procedure, but if I specify db connection details in jboss using datasource then everything is working fine except store procedure.

Can anybody help on it or guide me what is the actual issue?


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.