• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Mike London

Spring ORM HibernateTemplate Mapping Exception

Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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" />
exec MY_STORED_PROC1 ( :dSId,:createdUserId )

I am getting the bellow 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.

    Bookmark Topic Watch Topic
  • New Topic