解决方案 »

  1.   

    clob 转string的方法:
    /**
         * 将Clob转成String ,静态方法
         *
         * @param clob
         *            字段
         * @return 内容字串,如果出现错误,返回 null
         */
        public static String clobToString(Clob clob) {
            if (clob == null)
                return null;
            StringBuffer sb = new StringBuffer();
            Reader clobStream = null;
            try {
                clobStream = clob.getCharacterStream();
                char[] b = new char[60000];// 每次获取60K
                int i = 0;
                while ((i = clobStream.read(b)) != -1) {
                    sb.append(b, 0, i);
                }
            } catch (Exception ex) {
                sb = null;
            } finally {
                try {
                    if (clobStream != null) {
                        clobStream.close();
                    }
                } catch (Exception e) {
                }
            }
            if (sb == null)
                return null;
            else
                return sb.toString();
        }
      

  2.   

    这种问题确实是java冲突,首先找到你部署的oracle驱动包位置,比如是在/home/ap/test/ojdbc6-11.1.0.7.0.jar并把该路径加到到你应用服务器的CLASSPATH最前面比如weblogic加载setDomainEnv.sh里面的CLASSPATH=/home/ap/test/ojdbc6-11.1.0.7.0.jar:。你网上查到是jar冲突但是解决不了,是因为你没有改对地方