JDBCDynaClass throws class not found exception under java6
----------------------------------------------------------
Key: BEANUTILS-327
URL: https://issues.apache.org/jira/browse/BEANUTILS-327
Project: Commons BeanUtils
Issue Type: Bug
Components: DynaBean
Affects Versions: 1.8.0
Environment: Windows XP
Suse Linux
Java6
Reporter: Sascha Riemann
Using ResulsetDynaClass with a byte array (e.g. varbinary) throws a class not
found exception.
Doing some research on the web, i found the following entry
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6516909,
Patching the JDBCDynaClass was quiet easy.
protected Class loadClass(String className) throws SQLException {
try {
ClassLoader cl = Thread.currentThread().getContextClassLoader();
if (cl == null) {
cl = this.getClass().getClassLoader();
}
// return (cl.loadClass(className));
// FIX: for
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6516909
return (Class.forName(className, false, cl));
} catch (Exception e) {
throw new SQLException(
"Cannot load column class '" + className + "': " + e);
}
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.