问题所在的地方:
Connection newconn = (Connection)Proxy.newProxyInstance(conn.getClass().getClassLoader(), conn.getClass().getInterfaces(),this);

解决方案 »

  1.   

    Connection newconn = (Connection)Proxy.newProxyInstance(conn.getClass().getClassLoader(), conn.getClass().getInterfaces(),this);
    -----------------------------------------------------------------------------------
     当前线程的classLoader可能与conn.getClass().getClassLoader()返回的classLoader不一样,你可以把两个classLoader打印出来看看.
      

  2.   

    Connection newconn = (Connection)Proxy.newProxyInstance(conn.getClass().getClassLoader(), new Class[]{Connection.class},this);