Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004
    Location
    Sweden
    Posts
    8

    Unhappy Unanswered: Problems with OracleXML putXML

    Hi.

    I don't know if this question belongs in this forum. I didn't find any threads on OracleXML.

    Anyway, here we go.

    I have a bunch of XML files which I want to load into the database using commands similar to this one:
    java OracleXML putXML -user "username/password" -conn "jdbc: oracle:thin:@host: port:sid" -fileName xml_file.xml table_name

    This works great for 7 out of 8 files. The files are all similar, no unusual datatypes. Just strings and numbers.

    When I try the 8th file I get the following error message:
    oracle.xml.sql.OracleXMLSQLException: 'java.sql.SQLException: ORA-01400: cannot insert NULL into ("some collumn")' encountered during processing ROW element 3386. All prior XML row changes were rolled back. in the XML document.
    at oracle.xml.sql.dml.OracleXMLSave.saveXML(OracleXML Save.java:2385)
    at oracle.xml.sql.dml.OracleXMLSave.saveXML(OracleXML Save.java:2257)
    at oracle.xml.sql.dml.OracleXMLSave.insertXML(OracleX MLSave.java:1345)
    at OracleXML.Put_XML(OracleXML.java:480)
    at OracleXML.ExecutePutXML(OracleXML.java:398)
    at OracleXML.main(OracleXML.java:182)

    The problem is that the value isn't null. Not even close.
    The XML file seems to be ok.

    I would appreciate any hints on how to get this working.

    Regards
    Magnus

  2. #2
    Join Date
    Feb 2004
    Location
    Sweden
    Posts
    8

    Smile Solved!

    Hi again.

    The problem is solved. The XML was correct allright. Unfortunatly one tag had a value of " " which putXML interpreted as NULL.

    Changing the value in the XML file to something else and then changing it back once imported into database did the trick.

    Regards
    Magnus

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •