Home » Developer & Programmer » JDeveloper, Java & XML » Why I got " java.text.ParseException: Unparseable date: - [setDateFormat] (Dbms_Xmlsave.setDateFormat, Dbms_Xmlsave.newContext)
Why I got " java.text.ParseException: Unparseable date: - [setDateFormat] [message #295745] Wed, 23 January 2008 04:41
sammeras
Messages: 28
Registered: September 2007
Location: Israel
Junior Member

Hi Experts,

While using the testxmlproc procedure I am having problems parsing a date which is the format dd.MM.yy
I have tried to use the following procedure to set the date format :

CREATE OR REPLACE PROCEDURE testxmlproc(p_table_name IN VARCHAR2, p_XMLClob IN CLOB) IS
	v_insCtx 	Dbms_Xmlsave.ctxType;
	v_rows		NUMBER;
BEGIN
	v_insCtx := Dbms_Xmlsave.newContext(p_table_name);
	Dbms_Xmlsave.setDateFormat(v_insCtx, 'dd.MM.yy');
	v_rows := Dbms_Xmlsave.insertXML(v_insCtx,p_XMLClob);
	--dbms_output.put_line('THEEEE : '||v_rows);
	Dbms_Xmlsave.closeContext(v_insCtx);
END;
/
show err


Unfortunately it is not working, as the parser still does not recognise the date format, it seems to want the time element.
I got error:

ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception: oracle.xml.sql.OracleXMLSQLException: המ
ORA-06512: at "SYS.DBMS_XMLSAVE", line 115
ORA-06512: at "SYS.TESTXMLPROC", line 7
ORA-06512: at line 1


I exec the procedure:
exec testxmlproc('gogtest','<?xml version="1.0"?><ROWSET><ROW><ID>1</ID><NAME>Sam</NAME><S_DATE>23/01/2008 11:10:09</S_DATE></ROW></ROWSET>');

-- gogtest => table that procedure insert data into.



please may somebody advise on some possible solutions?

Regards,
SAM.


Previous Topic: password for pdf outputs from xml reports
Next Topic: Oracle PL/SQL trying to use XSL and XMLSAVE
Goto Forum:
  


Current Time: Sat Dec 10 10:48:31 CST 2016

Total time taken to generate the page: 0.08391 seconds