-->
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.  [ 2 posts ] 
Author Message
 Post subject: Simple query problem. No value specified for parameter 2
PostPosted: Sat Feb 02, 2008 11:17 am 
Newbie

Joined: Fri Oct 27, 2006 2:28 pm
Posts: 14
I got this very strange error message. This application works fine in another box. I copy and paste the query and run against the database, and it works just fine.

select user0_.USER_ID as USER1_3_, user0_.USERNAME as USERNAME3_, user0_.PASSWORD as PASSWORD3_ from SOMEDB.USERS user0_ where upper(user0_.USERNAME)='SOMEUSER'

What could be the problem here?

The hibernate query is:

hibernateTemplate.find(
" from User u where upper(u.username)=?",
username.toUpperCase());

Hibernate version:
3.1.3

Full stack trace of any exception that occurs:
2008-02-02 10:05:11,239 WARN [httpSSLWorkerThread-8080-0] (JDBCExceptionReporter.java:71) - SQL Error: 0, SQLState: 07001
2008-02-02 10:05:11,240 ERROR [httpSSLWorkerThread-8080-0] (JDBCExceptionReporter.java:72) - No value specified for parameter 2

Name and version of the database you are using:
mysql Ver 14.12 Distrib 5.0.45, for suse-linux-gnu (i686) using readline 5.2

The generated SQL (show_sql=true):
select user0_.USER_ID as USER1_3_, user0_.USERNAME as USERNAME3_, user0_.PASSWORD as PASSWORD3_ from SOMEDB.USERS user0_ where upper(user0_.USERNAME)=?


Top
 Profile  
 
 Post subject: Problem solved by upgrade to the latest mysql jdbc driver
PostPosted: Wed Feb 06, 2008 11:15 pm 
Newbie

Joined: Fri Oct 27, 2006 2:28 pm
Posts: 14
As the title said.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

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.