Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Spring JDBC error: Can't pass value to NamedParameter  RSS feed

 
Philip Freeman
Ranch Hand
Posts: 31
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


If I replace the with:, no error is thrown and there is no issue.
While if I use the named parameter an error pops up: org.springframework.dao.InvalidDataAccessApiUsageException: No value supplied for the SQL parameter 'value': This SqlParameterSource is empty


What did I miss?
 
Philip Freeman
Ranch Hand
Posts: 31
2
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Found my mistake.

Should be:
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 37382
531
Eclipse IDE Java VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for posting the solution which you found quickly. Sometimes the act of explaining a problem helps one answer it!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!