在执行PreparedStatement的void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException 方法时,如果是用x与targetSqlType的类型不一致时,weblogic下会抛出ClassCastException异常,这个原因是因为在MyEclipse中配置web server 时,把class12.jar添加到了weblogic的path中,这样就导致了无法自动转化类型,具体原因不清楚,解决方式就是把这个path去掉就可以了!