commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Shifman <mark.shif...@yale.edu>
Subject [commons-dbutils] Commons DbUtils 1.2 problem with QueryRunner
Date Fri, 01 May 2009 18:23:22 GMT
Hi:
I just downloaded the new release, dropped the jar into an app and I am getting
java.sql.SQLException: Unsupported feature Query:

My database is oracle 10g and I am using the ojdbc14.jar.  Everything worked just fine
with an old commons-dbutils-1.1.jar.

My simple program did this:

	final String sql = "select * from p_user where user_id=?";
		 Map m = null;
		 try {
		        QueryRunner run = new QueryRunner(getDataSource());
		        m =  (Map)run.query(sql,"60", new MapHandler());
			} catch (SQLException ex) {
				ex.printStackTrace();
			}
		System.out.println(m);
and threw this:
java.sql.SQLException: Unsupported feature Query: select * from p_user where user_id=? Parameters:
[60]
	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:486)
	at org.apache.commons.dbutils.QueryRunner.query(QueryRunner.java:443)
	at org.ycmi.ypedBilling.Billing.printtest1(Billing.java:270)
	at org.ycmi.ypedBilling.Billing.test1(Billing.java:96)
	at org.ycmi.ypedBilling.Billing.main(Billing.java:42)

I also tried  public QueryRunner(DataSource ds, boolean pmdKnownBroken) with pmdKnownBroken=true
and false and I
got the same exception.

Has something else changed or is something broken with the new version and oracle?
Thanks in advance:
mas

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

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message