opensubscriber
   Find in this group all groups
 
Unknown more information…

u : user@commons.apache.org 27 August 2009 • 9:31AM -0400

RE: What's required to convert from DBUtils 1.1 to DBUtils 1.2?
by Watkin, James

REPLY TO AUTHOR
 
REPLY TO GROUP




Mark,

Thank you for your reply. My app breaks with the following exception:

java.sql.SQLException: com.microsoft.sqlserver.jdbc.SQLServerException:
Incorrect syntax near the keyword 'FROM'. Query: SELECT program FROM
programs WHERE (code = ?) Parameters: [MFE]
at
org.apache.commons.dbutils.QueryRunner.rethrow(QueryRunner.java:540)
at
org.apache.commons.dbutils.QueryRunner.query(QueryRunner.java:397)
at
org.apache.commons.dbutils.QueryRunner.query(QueryRunner.java:352)

I've tried replacing my MS SQL Driver with the latest download, but that
doesn't help. When I comment out the code throwing the error, I get an
error on the next query:

Caused by: java.sql.SQLException:
com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near
','. Query: SELECT a.serial FROM applicants_ext ae JOIN applicants a ON
ae.applicant_serial = a.serial WHERE (ae.applicant_ext_serial = ?) AND
(ae.app_type = ?) AND (a.year = ?) Parameters: [XXXXXXX, A, 2010]
at
org.apache.commons.dbutils.QueryRunner.rethrow(QueryRunner.java:540)
at
org.apache.commons.dbutils.QueryRunner.query(QueryRunner.java:397)
at
org.apache.commons.dbutils.QueryRunner.query(QueryRunner.java:369)

Jim

-----Original Message-----
From: Mark Shifman [mailto:mark.shifman@yale...]
Sent: Wednesday, August 26, 2009 4:40 AM
To: Commons Users List
Subject: Re: What's required to convert from DBUtils 1.1 to DBUtils 1.2?

Almost nothing is required to convert to 1.2.  Read the release notes
and see if any of the changes affect you.
http://commons.apache.org/dbutils/changes-report.html

I was burned by the way they changed CaseInsensitiveHashMap so I just
overrode it with the old one.  I also had a problem because of
oracle (so what else is new) but when I upgraded to the newest driver
things worked fine.

How does 1.2 break your app?
mas


Watkin, James wrote:
> I'm experiencing a well-known problem with DBUtils 1.1 where sometimes
> NULLs are converted to 0 when read from the database --
> http://issues.apache.org/jira/browse/DBUTILS-42
>
>  
>
> I see that DBUtils 1.2 fixes this problem. However, DBUtils 1.2 breaks
> my app. Before I commit to "fixing" my app, can anyone outline the
> amount of work required to upgrade one's app for use with DBUtils 1.2?
> I'm using the MS SQL Server JDBC driver.
>
>  
>
> Thank you.
>
>  
>
> Jim
>
>  
>
>  
>
>

--
Mark Shifman MD. Ph.D.
Yale Center for Medical Informatics
Phone (203)737-5219
mark.shifman@yale...

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@comm...
For additional commands, e-mail: user-help@comm...


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@comm...
For additional commands, e-mail: user-help@comm...


Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.