Apache Commons logo Commons DbUtils

Apache Commons DBUtils Release Notes

Release History

Version Date Description
1.8.1 2023-09-09 New features and bug fixes.
1.8.0 2023-08-01 New features and bug fixes.
1.7 2017-07-20 Bug fixes and separate column & property handlers using SPI
1.6 2014-07-20 Bug fixes and addition of insert methods
1.5 2012-07-20 Bug fixes and addition of BeanMapHandler
1.4 2011-10-23 Bug fixes and addition of asynchronous QueryLoader
1.3 2009-11-04 Adds Java5 generics and varargs
1.2 2009-03-06 Another round of fixes; deprecates methods in preparation for varargs in java5
1.1 2006-12-01 Last couple of years of fixes
1.0 2003-11-10 First release of DbUtils

Release 1.8.1 – 2023-09-09

Type Changes By
Fix Module org.apache.commons.dbutils does not declare `uses`. Fixes DBUTILS-151. Thanks to mark, Gary Gregory. ggregory
Update Bump commons-parent from 61 to 62. Thanks to Gary Gregory. ggregory

Release 1.8.0 – 2023-08-01

Type Changes By
Fix Speedup query calls without parameters; Use PreparedStatement only when parameters are present. Fixes DBUTILS-131. Thanks to yairlenga. thecarlhall
Fix Always copy Date, Time, Timestamp on get and set in SqlNullCheckedResultSet. thecarlhall
Update BeanProcessor is not thread safe since [DBUTILS-124]. Fixes DBUTILS-135. Thanks to hdevalke. ggregory
Update Inefficient allocation of Maps in org.apache.commons.dbutils.BasicRowProcessor.toMap(ResultSet). Fixes DBUTILS-137. Thanks to Gary Gregory. ggregory
Fix org.apache.commons.dbutils.QueryRunner.query(Connection, boolean, String, ResultSetHandler, Object...) Exception in closing statement leave connections open. Fixes DBUTILS-138. Thanks to Stefano Lissa, Gary Gregory. ggregory
Fix Update Java requirement from version 6 to 8. Fixes DBUTILS-139. Thanks to Gary Gregory. ggregory
Update clirr, checkstyle, and spotbugs configured as part of default build. Thanks to thecarlhall.
Fix Correction of coverage badge #10. Thanks to Amey Jadiye. ggregory
Fix Manage JDBC objects using try-with-resources. Thanks to Gary Gregory. ggregory
Fix ResultSet not closed in QueryRunner.insert(Connection, String, ResultSetHandler, Object...). Thanks to Gary Gregory. ggregory
Fix ResultSet not closed in QueryRunner.insertBatch(Connection, String, ResultSetHandler, Object[][]). Thanks to Gary Gregory. ggregory
Fix AbstractQueryRunner.fillStatementWithBean(PreparedStatement, Object, String...) now throws IllegalStateException instead of RuntimeException. Thanks to Gary Gregory. ggregory
Add Add @Column annotation to hint the field name instead of dissecting the get method name. Fixes PR/9. Thanks to rewerma. thecarlhall
Add CaseInsensitiveHashMap cannot be accessed by subclasses of BasicRowProcessor; add org.apache.commons.dbutils.BasicRowProcessor.createCaseInsensitiveHashMap(int). Fixes DBUTILS-136. Thanks to Matthew Hall, Gary Gregory. ggregory
Add Add github/codeql-action #115. ggregory
Fix [StepSecurity] ci: Harden GitHub Actions #191. Thanks to step-security-bot, Gary Gregory. ggregory
Add Add StatementConfiguration.StatementConfiguration(Integer, Integer, Integer, Integer, Duration). Thanks to Gary Gregory. ggregory
Add Add StatementConfiguration.getQueryTimeoutDuration(). Thanks to Gary Gregory. ggregory
Add Add StatementConfiguration.Builder.queryTimeout(Duration). Thanks to Gary Gregory. ggregory
Update Bump actions/cache from 2 to 3.0.11 #109, #141, #145. Thanks to Dependabot, Gary Gregory. ggregory
Update Bump actions/checkout from 1 to 3.1.10, #44, #23, #48, #75, #93, #143. Thanks to Dependabot, Gary Gregory. ggregory
Update Bump actions/setup-java from 1.4.0 to 3.5.1 #40. Thanks to Dependabot, Gary Gregory. ggregory
Update Bump actions/upload-artifact from 3.1.0 to 3.1.1 #150. Thanks to Gary Gregory. ggregory
Update Bump commons-parent from 50 to 61 #14, #113, #139, #168, #189. Thanks to Dependabot. ggregory
Update Bump junit from 4.12 to 5.9.1 vintage #16, #42, #58. Thanks to Dependabot, Gary Gregory. ggregory
Update Bump mockito-core from 3.2.4 to 4.8.1 #18, #21, #46, #53, #97, #103, #111, #116, #122, #131. #137, #151. Thanks to Dependabot. ggregory
Update Bump spotbugs-maven-plugin from to 4.4.2, #17, #45, #52. Thanks to Dependabot, Gary Gregory. ggregory
Update Bump spotbugs from to 4.2.3. Thanks to Gary Gregory. ggregory
Update Bump maven-checkstyle-plugin from 3.1.0 to 3.2.0 #56, #132. Thanks to Gary Gregory, Dependabot. ggregory
Update Bump checkstyle from 8.28 to 9.3 #20, #47. Thanks to Gary Gregory, Dependabot. ggregory
Update Bump commons.japicmp.version from 0.14.3 to 0.16.0. Thanks to Gary Gregory. ggregory

Release 1.7 – 2017-07-20

Type Changes By
Update Error handling possible getParameterMetaData() results - allow for null return - handle SQLFeatureNotSupportedException. Fixes DBUTILS-117. Thanks to Vadim Smirnov. sebb
Update Correct errors in BeanMapHandler Javadoc. Fixes DBUTILS-119. Thanks to Michael Akerman. britter
Add Add getWriteMethod to BeanProcessor to allow subclasses to influence which write method is used. Fixes DBUTILS-121. thecarlhall
Fix Change method contracts to allow extended class types when returning a bean populated from a query. Fixes DBUTILS-82. Thanks to Kenshi Toriumi. thecarlhall
Fix Add method in BeanProcessor to populate an existing bean. Fixes DBUTILS-89. Thanks to Adam Dyga. thecarlhall
Fix Add ability to configure statements used in QueryRunner. Fixes DBUTILS-70. Thanks to Michael Akerman. thecarlhall
Add Support CallableStatement "out" parameters. Fixes DBUTILS-50. Thanks to Dan Fabulich. thecarlhall
Add Implement column and property handlers using Java's service interfaces. Fixes DBUTILS-124. thecarlhall
Update Created some Unit Tests to increase code coverage. Fixes PR/1. Thanks to Michael Hausegger. thecarlhall

Release 1.6 – 2014-07-20

Type Changes By
Fix ArrayHandler should return an empty array when handle has no rows. Fixes DBUTILS-110. britter
Fix Order of columns not retained in BasicRowProcessor with HashMap. Fixes DBUTILS-114. Thanks to Michael Osipov. britter
Fix BeanProcessor not returning nanoseconds. Fixes DBUTILS-118. Thanks to Feysal Rujbally, Daniele Cremonini. britter
Add Add support for conversion of ResultSet strings to enums in the BeanProcessor. Fixes DBUTILS-113. Thanks to Graylin Kim, Michael Osipov. britter
Update In BeanProcessor#isCompatibleType, can Integer.class.isInstance(value) be replaced by value instanceof Integer (etc)? Simplified code by using instanceof. Fixes DBUTILS-85. sebb
Fix DBUtils can't build using JDK 1.7 - DriverProxy needs to implement getParentLogger() Add dynamic invocation. Fixes DBUTILS-106. Thanks to Niall Pemberton. sebb
Add Create functionality to return auto-generated keys in batches of SQL inserts. Fixes DBUTILS-108. Thanks to Micah Huff. wspeirs
Add Patch QueryLoader to also load from XML properties files. Fixes DBUTILS-107. Thanks to PB. wspeirs
Fix Updated the use of getColumnName to try getColumnLabel first. Fixes DBUTILS-100. Thanks to xiaofei.xu. wspeirs
Add Add missing Javadoc to QueryRunner#insert. Fixes DBUTILS-98. Thanks to Moandji Ezana. simonetripodi
Add Add an Abstract ResultSetHandler implementation in order to reduce redundant 'resultSet' variable invocation. Fixes DBUTILS-97. simonetripodi
Fix DbUtils#loadDriver(ClassLoader,String) makes DriverManager throwing "No suitable driver found for jdbc" if ClassLoader is not the System's one. Fixes DBUTILS-96. Thanks to yuyf. simonetripodi
Add Added insert methods to QueryRunner and AsyncQueryRunner that return the generated key. Fixes DBUTILS-87. Thanks to Moandji Ezana. wspeirs

Release 1.5 – 2012-07-20

Type Changes By
Update Provide test coverage for org.apache.commons.dbutils.DbUtils. Fixes DBUTILS-94. Thanks to Benedikt Ritter. simonetripodi
Fix Source assembly artifact fails to build a site because of missing pmd-ruleset.xml. Fixes DBUTILS-93. Thanks to Stevo Slavic. simonetripodi
Update Enhance BasicRowProcessor to have row mapping easier to configure. Fixes DBUTILS-91. Thanks to Stevo Slavic. simonetripodi
Update Updated pom.xml: Java 1.6 now required, clirr and compiler plugin removed Thanks to wspeirs.
Fix BeanProcessor method processColumn should take SQLXML in consideration. Fixes DBUTILS-84. Thanks to Tiago Cavaleiro. wspeirs
Update Updated documentation to better reflect the use of pmdKnownBroken. Fixes DBUTILS-77. wspeirs
Fix Added a fixed Locale (Locale.ENGLISH) to all toLowerCase calls in BasicRowProcessor. Fixes DBUTILS-73. Thanks to Sebb.
Add Added BeanMapHandler. Fixes DBUTILS-67. Thanks to Michael Osipov.
Update Added generics to ScalarHandler, ColumnHandler, and KeyedHandler. Fixes DBUTILS-66. Thanks to Michael Osipov.

Release 1.4 – 2011-10-23

Type Changes By
Fix DbUtils.loadDriver() uses Class.forName(). Fixes DBUTILS-81.
Fix DbUtils.loadDriver catches Throwable. Fixes DBUTILS-80.
Fix Duplicate code introduced during Java 1.5 branch merge. Fixes DBUTILS-65.
Fix fillStatement doesn't complain when there are too few parameters. Fixes DBUTILS-79.
Update efficient usage from findbugs. Fixes DBUTILS-75.
Add Add asynchronous batch, query, and update calls. Fixes DBUTILS-78. wspeirs

Release 1.3 – 2009-11-04

Type Changes By
Add Java 1.5 generics and varargs. Fixes DBUTILS-48. dfabulich
Update BeanProcessor#mapColumnsToProperties now prefers to use column labels over column names (where aliases are not set, these should be identical). Fixes DBUTILS-57. dfabulich
Update Setting pmdKnownBroken in QueryRunner constructor now completely ignores ParameterMetaData. Fixes DBUTILS-58. dfabulich
Fix Fixed error message in QueryRunner#rethrow. Fixes DBUTILS-60. dfabulich

Release 1.2 – 2009-03-06

Type Changes By
Update Removed setDataSource method to guarantee thread safety. Fixes DBUTILS-52. dfabulich
Update Made numerous private instance members final to guarantee thread safety; changed protected member of KeyedHandler to final. Fixes DBUTILS-51. sebb
Remove Remove old Maven1/Ant build scripts bayard
Update Support bean property to SQL IN parameter mapping. Fixes DBUTILS-29. dfabulich
Fix fillStatement setNull bug with the Postgres/Derby JDBC driver (and others). Fixes DBUTILS-31. dfabulich
Update Make GenericListHandler (now AbstractListHandler) public. Fixes DBUTILS-33. dfabulich
Update BasicRowProcessor loses any information on database field case. Fixes DBUTILS-34. dfabulich
Update BeanListHandler#handle(ResultSet) is not optimal. Fixes DBUTILS-37. dfabulich
Fix NullPointerException occurred at rethrow method. Fixes DBUTILS-40. dfabulich
Update Object with Long or Decimal got initial zero value while database field is null. Fixes DBUTILS-42. dfabulich
Update example documentation page, update query. Fixes DBUTILS-38. dennisl
Fix Add serialVersionUID to BasicRowProcessor.CaseInsensitiveHashMap. Fixes DBUTILS-36. bayard

Release 1.1 – 2006-12-01

Type Changes By
Fix Tests fail to build under 1.6, and warning while compiling source. Fixes DBUTILS-32. bayard
Fix BeanListHandler and BeanHandler fail to support java.sql.Date(). Fixes DBUTILS-1. bayard
Update ResultSetRowProcessor abstract handler and some classes rework. Fixes DBUTILS-16. bayard
Fix Setting bean properties fails silently. Fixes DBUTILS-3. bayard
Fix MockResultSet needs to handle equals and hashCode. Fixes DBUTILS-9. dgraham
Fix MockResultSet: Throw UnsupportedOperationException for not implemented methods. Fixes DBUTILS-7. bayard
Add Implement Pluggable Adaptors to Make BeanHandler Smarter. Fixes DBUTILS-20. dgraham
Update Patch for extending BasicRowProcessor. Fixes DBUTILS-15. dgraham
Add Protected QueryRunner.close() methods. Fixes DBUTILS-12. dgraham
Update Updated docs for example.html page (select AS). Fixes DBUTILS-23. dgraham
Add Added protected ResultSetIterator.rethrow() method to wrap SQLExceptions in RuntimeExceptions. Fixes DBUTILS-4. dgraham
Update Added SQLState and error code to rethrown SQLExceptions. Fixes DBUTILS-5. dgraham
Add Added KeyedHandler to create a Map of Maps from a ResultSet. Fixes DBUTILS-25. dgraham
Update Use current class' ClassLoader instead of QueryLoader's ClassLoader in loadQueries(). Fixes DBUTILS-2. dgraham
Update Made QueryLoader.loadQueries() protected so subclasses can use query repositories other than properties files. Fixes DBUTILS-22. dgraham
Update QueryRunner now calls getDataSource() internally any time it needs access to its DataSource object to allow subclasses to provide different behavior. dgraham
Add Added DbUtils.rollbackAndClose() and DbUtils.rollbackAndCloseQuietly(). dgraham
Update Call ResultSet.getTimestamp() in BeanProcessor.processColumn() if the bean property is a java.sql.Timestamp. Oracle's getObject() implementation returns its own incompatible Timestamp class. Fixes DBUTILS-26. dgraham
Update Changed QueryRunner.fillStatement() null handling to use Types.VARCHAR instead of Types.OTHER. This works for the following tested drivers: Firebird 1.5/firebirdsql 1.5RC3, Oracle 9/ Thin driver, MySQL 4.0/Msql Connecttor 3.0 and mm.mysql 2.0.4 MaxDB 7.5, HSQLDB 1.7.1, and MS Access/ODBC Bridge. Fixes DBUTILS-18. dgraham
Add Added a protected QueryRunner.prepareConnection() method to allow subclasses to customize the Connections retrieved from the DataSource before they're used. Fixes DBUTILS-21. dgraham
Add Refactored bean handling from BasicRowProcessor into new BeanProcessor class. This also fixes the common problem with Oracle NUMERIC fields not being set into bean properties. dgraham
Add Added QueryRunner.batch() methods for batch updates. Fixes DBUTILS-13. dgraham
Add Added new ResultSetHandler implementation, ColumnListHandler, that converts one ResultSet column into a List of Objects. Fixes DBUTILS-11. dgraham

Release 1.0 – 2003-11-10

Type Changes By
Add This is the first release of the Commons DbUtils package. DbUtils is a small set of classes designed to make working with JDBC easier.
Add QueryRunner class with ResultSetHandler interface allow you to easily query or update a database and handle the ResultSet. Several useful implementations of the ResultSetHandler interface are located in the org.apache.commons.dbutils.handlers.* package.
Add ResultSet wrappers that decorate ResultSets with specialized behavior. See the classes in the org.apache.commons.dbutils.wrappers.* package for details.
Add Dynamic JDBC API interface implementations via the standard java.lang.reflect.Proxy class. This allows you to implement JDBC interfaces such as ResultSet at runtime to avoid API version incompatibilities. See org.apache.commons.dbutils.ProxyFactory for details.