Click to See Complete Forum and Search --> : Oracle Error: LPX-00216: invalid character 0 (0x0)


doctorofstyle
December 1st, 2004, 08:42 AM
I get this error when I try to import an XML Schema into Oracle's XML DB. The schema is valid when I use XML Spy, so I am not sure what Oracle could be considering an invalid character. Here is the whole error message:

ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00216: invalid character 0 (0x0)
Error at line 10682
ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 0
ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 26
ORA-06512: at line 9

Not very helpful. My script is 15 lines long as it is selecting the schema from a table, so I am not sure where the line numbers refer to. The schema itself is over 550,000 characters, so its not something I can post or skim for invalid characters.

Has anyone seen this error before? If so, what did you do to fix it? Alternately, if someone knows what parser Oracle uses to parse the XML Schema, that might help me find what character(s) it is complaining about.

Thanks,
Tim

Krzemo
December 1st, 2004, 10:39 PM
Isn't it an UNICODE problem?

that might help me find what character(s) it is complaining about.
IMHO Oracle already has found it:LPX-00216: invalid character 0 (0x0)
Error at line 10682
ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 0


Best regards,
Krzemo.

gepascual
May 16th, 2006, 11:02 AM
I have the same problem, if you found an answer please contact me,
Thank you,

Gustavo

tcacutt
May 9th, 2007, 02:35 AM
All,

Encountered a similar problem when creating an XMLtype by using select XMLELEMENT etc..... INTO variable from Database.Table It seems to be to do with the length of the XML floating around in memory but is easily resolved.

SELECT XMLTYPE(XMLELEMENT("A", XMLELEMENT ("B",'b')).getclobval()) FROM sys.dual

Basically creating as a clob and converting to XMLType, hope this helps.

rpraetorius
May 6th, 2010, 03:10 PM
OK. Eons have passed. But this is still one of the top hits for LPX-00216: invalid character 0.

The answer for us was XMLType(RTRIM(clobvar, CHR(0)))

We saw this (using two different drivers) trying to pass a string from SSIS to a PL/SQL proc. It always stuck a NUL on the end.

For some reason this didn't happen calling the same interface from PowerShell. Yet when I asked SSIS how long the string was, just before I passed it to OLE DB or ODP.NET, it didn't include the NUL. Go figure