AbstractMethodError:DocumentImpl.getXmlStandalone()Z

 

具体代码为:

 

一段简单的写xml文件代码

 

DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();

DocumentBuilder builder = factory.newDocumentBuilder();

doc = builder.newDocument();

 

 

深入发掘错误原因,网上搜索得知

 

原帖地址:http://blog.csdn.net/lcj8/archive/2008/06/07/2519881.aspx

 

删除xerces.jar包的路径配置后正常

读取blob时,报AbstractMethodError

12-22

[code=Java]package myJava;rnrnimport java.io.BufferedInputStream;rnimport java.io.BufferedOutputStream;rnimport java.io.File;rnimport java.io.FileInputStream;rnimport java.io.FileNotFoundException;rnimport java.io.IOException;rnimport java.sql.Blob;rnimport java.sql.Connection;rnimport java.sql.DriverManager;rnimport java.sql.PreparedStatement;rnimport java.sql.ResultSet;rnimport java.sql.SQLException;rnimport java.sql.Statement;rnrnpublic class TT rn static Connection con = null;rn static Statement stat = null;rn static PreparedStatement pstat = null;rn static ResultSet res = null;rnrn public static void main(String[] args) rnrn try rn Class.forName("oracle.jdbc.driver.OracleDriver");rn catch (ClassNotFoundException e) rn e.printStackTrace();rn rn try rn con = DriverManager.getConnection(rn "jdbc:oracle:thin:@192.168.5.160:1521:my0id", "xuxiao",rn "0000");rn stat = con.createStatement();rn tt();rn catch (SQLException e) rn e.printStackTrace();rn rn rn rn public static void tt()rn rn Blob bl=null;rn rn try rn con.setAutoCommit(false);rn res=stat.executeQuery("select bb from test");rn res.next();rn bl=res.getBlob(1);rn rn File f=new File("f:/1920SSJJ_1002.jpg");rn FileInputStream fis=new FileInputStream(f);rn System.out.println(f.length());rn rn BufferedOutputStream bos=new BufferedOutputStream(bl.setBinaryStream(1));rn rn int n=0;rn n=fis.read();rn while(n != -1)rn bos.write(n);rn n=fis.read();rn rn rn con.commit();rn catch (SQLException e) rn e.printStackTrace();rn catch (FileNotFoundException e) rn e.printStackTrace();rn catch (IOException e) rn e.printStackTrace();rn rn rn[/code]rnrnrn控制台输出以下内容:rn285229rnException in thread "main" java.lang.AbstractMethodError: oracle.sql.BLOB.setBinaryStream(J)Ljava/io/OutputStream;rn at myJava.TT.tt(TT.java:59)rn at myJava.TT.main(TT.java:37)rnrnrnrn进行其他数据类型的读写时没这问题。rn如果是jdbc驱动的问题,rn能帮忙提供一个可用的oracle驱动地址吗?(oracle 9i)rn

没有更多推荐了,返回首页

私密
私密原因:
请选择设置私密原因
  • 广告
  • 抄袭
  • 版权
  • 政治
  • 色情
  • 无意义
  • 其他
其他原因:
120
出错啦
系统繁忙,请稍后再试