# DBMS_XMLSCHEMA.GENERATESCHEMA and ORA-21500

You may run into this error. You want to generate an xsd based on on object type. You create the object:  
  
CREATE OR REPLACE TYPE my\_test\_type  
AS OBJECT (  
EMPLOYEE\_ID NUMBER(6),  
FIRST\_NAME VARCHAR2(20)  
);  
  
Then you want to get the associated xsd:  
  
SQL> Set pagesize 9999  
SQL> Set linesize 132  
SQL> Set long 9999  
SQL>  
SQL> select DBMS\_XMLSCHEMA.GENERATESCHEMA( 'APPS', 'MY\_TEST\_TYPE')  
2 from dual  
3 /  
  
Instead of getting the xsd, you get the following:  
  
ERROR:  
ORA-21500: internal error code, arguments: \[%s\], \[%s\], \[%s\], \[%s\], \[%s\], \[%s\], \[%s\], \[%s\]  
  
The problem is not at the database, but with sql\*plus. You are probably using a 9i sqlplus client. Try a 10g sqlplus and it should work fine.  
  
As always, if this helps, drop me a comment. It would be great to know that this actually helped someone.
