Uploaded image for project: 'Commons BeanUtils'
  1. Commons BeanUtils
  2. BEANUTILS-327

JDBCDynaClass throws class not found exception under java6

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.0
    • 1.8.1
    • DynaBean
    • None
    • Windows XP
      Suse Linux
      Java6

    Description

      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); }

      }

      Attachments

        Activity

          People

            niallp Niall Pemberton
            slriemann Sascha Riemann
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: