Home » Developer & Programmer » JDeveloper, Java & XML » ORA-30951 Hell
ORA-30951 Hell [message #180018] Thu, 29 June 2006 17:39 Go to next message
CrimsonBane
Messages: 3
Registered: June 2006
Junior Member
I am somewhat new to oracle and I am having a very hard time registering a large XML schema (approx 1MB). I tried the following code but I do not understand where or what the problem is. Is it with the XML schema? If so how do I find the line that it is on.

SQL>
SQL> DECLARE
2
3 -- OS file whose content needs to be read.
4 fileName VARCHAR2(50) := 'test.xsd';
5
6
7 -- Directory Object specifying the file location.
8 directoryName VARCHAR2(50) := 'SOURCE_DIR';
9
10 -- CLOB Object to hold the content of the file from the user specified di
rectory.
11 fileContent CLOB;
12
13
14 BEGIN
15 fileContent := xdb_utilities.getFileContent(fileName, directoryName);
16 dbms_xmlschema.registerSchema('test12', fileContent);
17 END;
18 /
DECLARE
*
ERROR at line 1:
ORA-30951: Element or attribute at Xpath /schema/simpleType[149]/annotation/appi
nfo[2][@] exceeds maximum length
ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 20
ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 31
ORA-06512: at line 16

Thanks,
Crim
Re: ORA-30951 Hell [message #180044 is a reply to message #180018] Thu, 29 June 2006 23:06 Go to previous messageGo to next message
Frank
Messages: 7901
Registered: March 2000
Senior Member
Could you show us the file test.xsd?
Re: ORA-30951 Hell [message #180085 is a reply to message #180044] Fri, 30 June 2006 02:26 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Or at least the part of the XSD specified by that XPATH
Re: ORA-30951 Hell [message #180173 is a reply to message #180018] Fri, 30 June 2006 08:27 Go to previous messageGo to next message
CrimsonBane
Messages: 3
Registered: June 2006
Junior Member
Here you go:

http://70.28.210.150/test.xsd.bz2
Re: ORA-30951 Hell [message #180179 is a reply to message #180173] Fri, 30 June 2006 08:53 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Mate,
Which part of
Quote:

'Or at least the part of the XSD specified by that XPATH '


did you miss!

Anyway; enough with the griping.

I strongly suspect that the problem is this:

Your schema defines a simple type "SecurityType_enum_t"

The second /appinfo element under /annotation for this type has a lot of elements /EnumDoc.

Eg
  <x:EnumDoc value="EUSUPRA" desc="EuroSupranationalCoupons" /> 
  <x:EnumDoc value="FAC" desc="FederalAgencyCoupon" /> 
  <x:EnumDoc value="FADN" desc="FederalAgencyDiscountNote" /> 


Now, everywhere else in this schema, the "value" attribute of the EnumDoc element is a single chr, looking like an index (values 0-9, then A-Z, then a-z) and these are all much longer than that.


Also, This type has an annotation/documentation element which is 4042 chrs long, and the maximum length for a string type is 4000.

2)
Hope this helps.
Re: ORA-30951 Hell [message #180187 is a reply to message #180179] Fri, 30 June 2006 09:35 Go to previous messageGo to next message
CrimsonBane
Messages: 3
Registered: June 2006
Junior Member
Hey thanks big time for the help. It looks like your suggestions were correct. Quick question though how did you so quickly go to the 149th SimpleType or debug it that quickly?

Thanks again,
Crim
Re: ORA-30951 Hell [message #180192 is a reply to message #180187] Fri, 30 June 2006 09:53 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Well, in an ideal world, I'd have loaded the schema into an Oracle XMLtype, and done an Xpath extract on it using the path you gave as an error, but sadly doing that gave me an out of memory error. Mad

So I put the whole XSD into Textpad (probably the best text editor in the world), and counted from 1-149 under my breath while presing the 'Find Next' button looking for "<xs:SimpleType"

Cool

Crude, but effective.

Debugging's just experience of what can go wrong. I've spent a lot of time lately debugging Xml Schemas, and trying to work out why my data and schema don't fit.
Re: ORA-30951 Hell [message #180220 is a reply to message #180192] Fri, 30 June 2006 18:16 Go to previous message
William Robertson
Messages: 1643
Registered: August 2003
Location: London, UK
Senior Member
I think "XML Hell" has a better ring to it Wink
Previous Topic: java.lang.AbstractMethodError: oracle.jdbc.driver.OracleResultSetImpl.getClob
Next Topic: Group Rows up in blocks
Goto Forum:
  


Current Time: Fri Nov 22 05:28:02 CST 2024