将xml推入db的麻烦

时间:2018-04-18 12:21:13

标签: xml database oracle

我正在尝试将xml文件推送到数据库中,但它会不断返回错误。我正在尝试以下命令:

java OracleXML putXML -conn "jdbc:oracle:thin:@<ip>:<dbname>" -user "<user>/<password>" -rowTag "fcst" -ignoreCase -setXSLT "surface_db.xsl" -fileName "surface.xml" " SURFACE"` 

它返回了以下错误:

oracle.xml.sql.OracleXMLSQLException: 'java.sql.SQLException: ORA-01438: value larger than specified precision allowed for this column
 encountered during processing ROW element 4.  All prior XML row changes were rolled back. in the XML document.
    at oracle.xml.sql.dml.OracleXMLSave.saveXML(OracleXMLSave.java:2543)
    at oracle.xml.sql.dml.OracleXMLSave.saveXML(OracleXMLSave.java:2413)
    at oracle.xml.sql.dml.OracleXMLSave.insertXML(OracleXMLSave.java:1376)
    at OracleXML.Put_XML(OracleXML.java:483)
    at OracleXML.ExecutePutXML(OracleXML.java:398)
    at OracleXML.main(OracleXML.java:185)

我也改变了行规格,但它不起作用......

1 个答案:

答案 0 :(得分:1)

这就是说你试图在列中加入不连贯的东西。也许您将VARCHAR限制为db中的任意数量的字符,并尝试使用xml插入更大的字符。