• Post Reply Bookmark Topic Watch Topic
  • New Topic

Spring ORM HibernateTemplate Mapping Exception  RSS feed

 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using msSqlServer Database. StoredProcedure takes two parameters, and returns one parameter.

Spring HibernateTemplate Code

Here is my Java code:

List l=ht.findByNamedQuery("MY_REF_STORED_PROC1");

Mapping file:

mapping file:
<sql-query name="MY_REF_STORED_PROC1" callable="true">
<return alias="usr" class="SomePOJO">
<return-property name="dSId" column="DSET_ID" />
</return>
exec MY_STORED_PROC1 ( :dSId,:createdUserId )
</sql-query>

I am getting the bellow Exception:

Exception:
org.hibernate.QueryException: Not all named parameters have been set: [dSId, createdUserId] [exec MY_STORED_PROC1 ( :dSId,:createdUserId )]

Please give me a solution for this issue.

Thanks,
Praneeth
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!