• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hibernate & statement parameter 1 not set error

 
Dave Brown
Ranch Hand
Posts: 301
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all, just wondering if anyone can shed some light on this problem...

Trying to create a persistant object (a User) but when I execute the session .get() method the exception that comes back is a java.sql.exception of "Statement parameter 1 not set"). From looking at the output it looks like the value I'm passing in the .get() is not being set in a preparedstatement but i'm stumped as where to go from here.

Any thoughts/advice appreciated... Thanks, I'll paste my code and mapping after this line...

My call is being made with this code...


and my hbm mapping is ..
 
Dave Brown
Ranch Hand
Posts: 301
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Found the problem !!

The ID I was mapping to in the bean was an int and not a long.

as soon as it was changed, hey presto... would have been nice to see more of a clue as to the source of the problem though.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic