MissingResourceException with XMLGEN
When creating an XML doc in a stored procedure using the XMLGEN call, I get the
following error message:
ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception:
java.util.MissingResourceException: can't find resource for oracle.xml.sql.mesg.XSUMessages_en_US
ORA-06512: at "DBADUDE.XMLGEN", line 465
ORA-06512: at "DBADUDE.XMLGEN", line 456
ORA-06512: at "USERDUDE.MY_QUERY", line 85
ORA-06512: at line 25
I think there is a lower level problem
that is trying to be reported here, but since
the message class doesn't appear to be
available, I don't know. This error occurs
when I try a query that should return about
180 rows (each row is not very large). It
does not occur what I do "select sysdate from
dual". But, once it does occur, I get it
on my sysdate query too. I have to close
the connection and reopen to clear the
error.
Thanks,
Gary Corsar
[email protected]
null
We're using xsu 1.2. I looked in the xsu12.jar and didn't find the XSUMessages_en_US file anywhere. There is XSUMesages.properties in the oracle.xml.sql.mesg directory, but nothing else. Could this be what it wants or is this a leftover from an earlier release? Is there any way to at least determine at this point what the error code is? There's a very good chance it is trying to tell me there is no more memory.
Similar Messages
-
Please,I Can't deploy Union Comand in SQL Stament With XMLGEN
I Have a Problem in SQL Stament
I Traying execute this SQL Stament With XMLGEN
Select
Number as "@Number",
NumRow as "@NumRow"
from
NewTable1
Union
Number as "@Number",
NumRow as "@NumRow"
from
NewTable2
Result: Show only NewTabla1 Rows.
How I Can Solution This ProblemUnless you're using the max-rows property which might be restricting the total number of rows, there's no way that XSU itself could affect the query outcome.
If you reverse the order of the queries
in the UNION, do you only get the rows from TABLE2 instead? Or regardless of order, you only get them from TABLE1? -
Hi All,
I'm having problems with the XML generation. The problem is that when we try to generate XML using a query, such as:
select xmlgen.getXML('select content_id, locale_id, content from bc_content_local where delete_p = ''0''',1) from dual;
It works fine so long as of the information retrieved by the query is ASCII. But if there are UTF8 characters in there, the
generation of the XML fails.
I wasn't actually getting an error message. It would work and return XML but as soon as the first UTF-8 character was encountered,
the XML just stopped.
Two questions:
1) Does the XML generation support UTF-8? 2)
If it does (I seem to remember hearing that it did) what has to be done so that this
works correctly?
We are using a UTF8 characterset we set during database creation. I have also tried setting up NLS_LANG in the client registrty to american_america.utf8 - but in both client and server I get teh same message.
Database: Oracle 8.1.7 Standard Edition on Sun-Solaris 2.8
Any help greatly appreciated,
Nilendu Misra
[email protected]Ok, I found we have DBMS_XMLQUERY installed on the schema other than SYS too. But when I issue the same statement using this package I get a different error:
SQL> select dbms_xmlquery.getXML('select content_id, locale_id, content
2 from bc_content_local where delete_p = ''0''',1) from dual;
select dbms_xmlquery.getXML('select content_id, locale_id, content
ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception:
java.lang.NullPointerException
ORA-06512: at "SYSTEM.DBMS_XMLQUERY", line 212
ORA-06512: at "SYSTEM.DBMS_XMLQUERY", line 220
ORA-06512: at "SYSTEM.DBMS_XMLQUERY", line 210
ORA-06512: at "SYSTEM.DBMS_XMLQUERY", line 228
ORA-06512: at line 1
I tried searching the XML forum and Metalink but I found most of the reports on this nature of problem are still unanswered.
Thanks in appreciation,
Nilendu
null -
Xmlgen.getxml Nested Cursors with LONG RAW and BLOB Data Types
I am trying to use a nested cursor with xmlgen.getxml that has a long raw or blob column. In either case, it will not return to me any data in the xml document pertaining to that LONG RAW or BLOB column. If I do not use a nested cursor, it works fine.
Example:
SELECT xmlgen.getxml('SELECT x, CURSOR(SELECT y FROM y_tab WHERE y_tab.x_id = x_tab.x_id) y FROM x_tab') FROM dual;
This will not produce the information I am after.
However, simply running:
SELECT xmlgen.getxml('SELECT y FROM y_tab WHERE y_tab.x_id = <somevalue>') FROM dual;
Works???
Any ideas out there? Does anyone know if DBMS_XMLQUERY has this limitation?
Thanks,
BradIt doesn't appear that I am able to attach the PDF files. Can you supply your email (or I can supply mine) so I can send you the three files:
1.) A good PDF (manually extracted from our old application)
2.) Dump of the same PDF file (includes header/footer info)
3.) A partially fixed PDF file (but some of the pictures / pages are cut off - specifically pages 3,5,9,10,12,14)
The way that we have tried to fix the file (in example 3 above) is the following:
a.) Find the First Occurrence of "%PDF-"
b.) Find the Last Occurrence of "%%EOF"
c.) if the first "%PDF-" is found AND the last "%%EOF" is found, then
i.) Remove all data before the first %PDF-
ii.) Remove all data after the last %%EOF
Let me know if you need any other information.
Thanks,
Mike -
Temp Tablespace Goes Berzerk using XMLGEN
The following procedure seems to maxout my temporary tablespace (2G!!!!)
I use this procedure to pump XML to a client given a sql statement and a few parameters.
I am using the plxmlparser_v1_0_2 release and the XSU12_ver1_2_1 release.
There seems to be some discussion concerning this in other threads but no soloution seems to be forth coming. Any advice?
PS I am also having a problem with XMLGEN returning XML datasets >90k. Methinks the two issues are related.
Regards
James Crockart
[email protected]
procedure createDynamicXML(
sql_string varchar2,
result_name varchar2 default 'results',
row_name varchar2 default 'row',
error_name varchar2 default 'error_results',
rowid_name varchar2 default null,
rowid_col varchar2 default null,
useLowerCase boolean default true,
useNullAttrib boolean default false)
is
no_sql exception;
--XML Variables
xmlString CLOB := null;
amount integer:= 255;
position integer := 1;
charString varchar2(255);
begin
if sql_string is null then
raise no_sql;
end if;
--Set XML preferences
xmlgen.resetOptions;
xmlgen.setErrorTag(error_name);
xmlgen.setRowsetTag(result_name);
xmlgen.setRowTag(row_name);
if rowid_name is not null then
xmlgen.setRowIdAttrName(rowid_name);
end if;
if rowid_col is not null then
xmlgen.setRowIdColumn(rowid_col);
end if;
if useLowerCase then
xmlgen.useLowerCaseTagNames();
end if;
xmlgen.useNullAttributeIndicator(useNullAttrib);
--Set mime header
--owa_util.mime_header('text/xml');
--Generate XML
xmlString := xmlgen.getXML(sql_string);
--Output XML
dbms_lob.open(xmlString,DBMS_LOB.LOB_READONLY);
loop
dbms_lob.read(xmlString,amount,position,charString);
htp.prn(charString);
position := position + amount;
end loop;
dbms_lob.close(xmlString);
dbms_lob.freetemporary(xmlString);
exception
when no_data_found then
dbms_lob.close(xmlString);
dbms_lob.freetemporary(xmlString);
end createDynamicXML;
nullThe user the xml sdk was installed in and its privs is:
CREATE USER "XML" PROFILE "DEFAULT"
DEFAULT TABLESPACE "USERS"
TEMPORARY TABLESPACE "TEMP"
ACCOUNT UNLOCK;
grant connect to XML;
grant resource to XML;
grant javauserpriv to XML;
grant javasyspriv to XML;
I suppose I can give the XML user it's own temp tablespace to save the rest of the production environment from going down.
But does not solve the problem :(
-James
null -
Can't find bundle for base....
Help needed....
When making a ResourceBundle.getbundle("texter",getlocale())
from an applet, within Init, I get MissingResourceException with the message Can't find bundle for base name texter....
Also, to mention is that within Init I set SystemSecuity.addProvider("IAIK")This is removed in destroy SystemSecurity.removeProvider ("IAIK").
The name on the properties file is texter.properties.
The above problem only occur the second time the applet initializes.
The applet is located in a servlets application.
Operating system is Windows NT, using IE and Netscape.
Last but not least, this is only a problem when using JRE 1.4 not when using JRE 1.3.Hello!
I am using IBM WebSphere Test Environment as a servletEngine, i put the propertiesfile in a jarfile together with
the appletpackage. So the servletpage loads everithing in the jarfile to the client. The strange thing is that this works the first time but not the second time.
Thanksfull for any suggestions!
/Elena -
XML,CLOB AND MEMORY : CONSUMED BUT NOT RELEASED !!!
Hi,
I'm working with XMLGEN Package and XSLT Processor to produce XML Document on Oracle 8.1.7.3 server, I use 9i XML and Java packages.
I'm facing the following BIG MEMORY problem :
Environment : I must generate an XML parsed with an XSL document of 80Mo (nearly 22 000 rows),
as XMLGEN is on DOM parsing method, I extract my XML by 500 Rows and I loop until 22 000 rows. I use DBMS_JOB with jobs who read and execute export each minute.
The algorithme is :
keeprow=22000
while keeprow>0
Create 3 clob (DBMS_LOB Package) : one for XSL Sheet, one for XML and one for result
GetXML (XMLGEN Package)
Transform in XSL (XSL Processor)
Write to disk (UTL_FILE Package)
Free the 3 Clob ((DBMS_LOB Package))
keeprow =keeprow-500
loop
The problem : The process start at 250Mo ot total memory and END at 1000 Mo of used memory and NEVER RELEASE 1 ko of memory.
So often I get a JavaOutOfMemoryError (I've allocated 1Go Ram to my JAVA process).
Any help will be very very appreciated !
My derived problem is 22 000 rows is not enough I've some export of 200 000 rows to do (And I cannot allocate 10 Go of RAM !!!)
Following My PL/SQL Code.
Regards
Fred
PROCEDURE DO_EXPORT_XML(
P_JOB_ID JOB_PARAMETRE.JOB_ID%TYPE,
P_JOB_ID_ORDRE JOB_PARAMETRE.JOB_ID_ORDRE%TYPE,
P_CLE_UP UPLOADREQ_TEMP.ID%TYPE,
P_LOAD_OR_DELOAD VARCHAR2)
IS
L_FILE_NAME JOB_PARAMETRE.JOB_FILE_NAME_DEST%TYPE;
L_REP_NAME JOB_PARAMETRE.JOB_REP_NAME_DEST%TYPE;
L_FILE_STYLESHEET JOB_PARAMETRE.JOB_STYLESHEET%TYPE;
L_VERSION_PDM JOB_PARAMETRE.JOB_VPDM%TYPE;
P_SELECT varchar2(4000):='';
P_CURSOR varchar2(4000):='';
l_filehandler_out UTL_FILE.FILE_TYPE;
--Variable pour le traitement par lot de 500
L_NBROW_TODO_ATONCE number := 500;
L_NBROW_MIN number := 1;
L_NBROW_MAX number := -1;
L_NBROWKEEPTODO number := -1;
xslString CLOB := null;
res number default -1;
xmlString CLOB := null;
li_ret number := 0;
li_faitle number := 0;
amount integer:= 255;
li_loop integer := 0;
charString varchar2(255);
ls_deload varchar2(255) default '';
ls_SQL varchar2(4000) default '';
ls_temp_file varchar2(255) default '';
text_file_dir varchar2(32) := 'e:\temporarydir';
l_par xmlparser.parser;
l_xml xmldom.domdocument;
l_pro xslprocessor.processor;
l_xsl xslprocessor.stylesheet;
docfragnode xmldom.DOMNode;
docfrag xmldom.DOMDocumentFragment;
l_parsedclob clob := null;
l_amount binary_integer := 32767;
l_ligne varchar2(32767);
l_offset number default 1;
l_pos number default null;
l_pos2 number default null;
l_lobsize number default null;
l_memsize number default 1073741824; --1024 Mo
l_mempipo number default 0;
type rc is ref cursor;
l_cursor rc;
cursor TEMPLATE is select UNSPSC,1 as NB from UPLOADREQ_TEMP where 1=2;
c1rec TEMPLATE%rowtype;
BEGIN
l_mempipo:=setmaxmemorysize(l_memsize);
dbms_lob.createtemporary(l_parsedclob, true, dbms_lob.session);
dbms_lob.createtemporary(xmlstring, true, dbms_lob.session);
--return the good select
GET_SELECT_TO_EXPORT_XML(P_JOB_ID , P_JOB_ID_ORDRE , P_CLE_UP , P_SELECT,P_CURSOR, P_LOAD_OR_DELOAD);
SELECT JOB_FILE_NAME_DEST,JOB_REP_NAME_DEST,JOB_STYLESHEET
INTO L_FILE_NAME,L_REP_NAME,L_FILE_STYLESHEET
FROM JOB_PARAMETRE
WHERE JOB_ID =P_JOB_ID AND JOB_ID_ORDRE=P_JOB_ID_ORDRE;
l_filehandler_out := UTL_FILE.FOPEN(text_file_dir, L_FILE_NAME, 'w',l_amount);
--Return XSL Sheet in a clob : cause of memory consumed but not released
xslString := METACAT.load_a_file( 1,L_FILE_STYLESHEET);
open l_cursor for P_CURSOR;
LOOP
fetch l_cursor into c1rec;
exit when l_cursor%notfound;
L_NBROW_MIN := 1;
L_NBROW_MAX := 0;
L_NBROWKEEPTODO:=c1rec.NB;
LOOP
begin
if(L_NBROWKEEPTODO > L_NBROW_TODO_ATONCE) THEN
begin
L_NBROW_MAX:= L_NBROW_TODO_ATONCE + L_NBROW_MAX;
L_NBROWKEEPTODO:= L_NBROWKEEPTODO - L_NBROW_TODO_ATONCE;
end;
else
begin
L_NBROW_MAX:= L_NBROW_MAX + L_NBROWKEEPTODO;
L_NBROWKEEPTODO:=0;
end;
end if;
--on ouvre le fichier de risultats
ls_SQL:= P_SELECT || ' AND ( ROWNUM BETWEEN ' || L_NBROW_MIN || ' AND ' || L_NBROW_MAX || ' ) and UNSPSC=''' || c1rec.UNSPSC || '''';
ls_temp_file := c1rec.UNSPSC || '_' || L_FILE_NAME;
L_NBROW_MIN:=L_NBROW_TODO_ATONCE + L_NBROW_MIN;
--CAT_AUTOLOAD.JOB_ADD_TRACE (P_JOB_ID,'UPLOAD REQUISITE : Export donnies REQUETE ' || to_char(li_loop), ls_SQL,'',0,0);
xmlgen.resetOptions;
xmlgen.setErrorTag('ERROR_RESULT');
xmlgen.setRowIdAttrName('NAH');
xmlgen.setRowIdColumn('NAH');
xmlgen.setEncodingTag('ISO-8859-1');
xmlgen.useNullAttributeIndicator(false);
if(xmlString is not null) then
dbms_lob.open(xmlString,dbms_lob.lob_readwrite);
l_lobsize:= dbms_lob.Getlength(xmlString);
if(l_lobsize>0) then
dbms_lob.erase(xmlString,l_lobsize,1);
end if;
dbms_lob.close(xmlString);
dbms_lob.freetemporary(xmlString);
dbms_lob.createtemporary(xmlstring, true, dbms_lob.session);
end if;
--Return XML in a clob : cause of memory consumed but not released
xmlString := xmlgen.getXML(ls_SQL,0);
l_par := xmlparser.newparser;
xmlparser.parseclob(l_par, xslString);
l_xsl := xslprocessor.newstylesheet(xmlparser.getdocument(l_par),null);
xmlparser.parseclob(l_par, xmlString);
l_xml := xmlparser.getdocument(l_par);
l_pro := xslprocessor.newprocessor;
xslprocessor.showWarnings(l_pro, true);
xslprocessor.setErrorLog(l_pro, text_file_dir || substr(ls_temp_file,0,length(ls_temp_file)-4) || '_logerreur.XML');
if(l_parsedclob is not null) then
dbms_lob.open(l_parsedclob,dbms_lob.lob_readwrite);
l_lobsize:= dbms_lob.Getlength(l_parsedclob);
if(l_lobsize>0) then
dbms_lob.erase(l_parsedclob,l_lobsize,1);
end if;
dbms_lob.close(l_parsedclob);
dbms_lob.freetemporary(l_parsedclob);
dbms_lob.createtemporary(l_parsedclob, true, dbms_lob.session);
end if;
--Return XML Processed with XSL in a clob : cause of memory consumed but not released
xslprocessor.processxsl(l_pro,l_xsl,l_xml,l_parsedclob);
--release NOTHING
xmlparser.freeparser(l_par);
xslprocessor.freeprocessor(l_pro);
l_ligne:='';
l_offset :=1;
l_pos := null;
l_pos2 := null;
if(li_loop=0) then
begin
--on ouvre le fichier et on sauve l'entete + les donnies dedans.
l_pos:=dbms_lob.instr(l_parsedclob,'</DATA>');
if ( nvl(l_pos,0) > 0 ) then
loop
if(l_pos-1>l_amount + l_offset ) then
l_ligne:=dbms_lob.SUBSTR(l_parsedclob,l_amount,l_offset);
UTL_FILE.PUT(l_filehandler_out,l_ligne);
UTL_FILE.fflush(l_filehandler_out);
l_offset:=l_offset+l_amount;
else
l_ligne:=dbms_lob.SUBSTR(l_parsedclob,l_pos-1 -l_offset ,l_offset);
UTL_FILE.PUT(l_filehandler_out,l_ligne);
UTL_FILE.fflush(l_filehandler_out);
exit;
end if;
end loop;
else
EXIT;
end if;
end;
else
--on met les donnies donc on ne repete pas le debut
begin
l_pos:=dbms_lob.instr(l_parsedclob,'<ITEM');
if ( nvl(l_pos,0) > 0 ) then
l_pos2:=dbms_lob.instr(l_parsedclob,'</DATA>');
if ( nvl(l_pos2,0) > 0 ) then
loop
if(l_pos + l_amount <= l_pos2 -1 ) then
l_ligne:=dbms_lob.SUBSTR(l_parsedclob,l_amount,l_pos);
UTL_FILE.PUT(l_filehandler_out,l_ligne);
UTL_FILE.fflush(l_filehandler_out);
l_pos:=l_pos +l_amount;
else
l_ligne:=dbms_lob.SUBSTR(l_parsedclob,l_pos2 -1 -l_pos,l_pos);
UTL_FILE.PUT(l_filehandler_out,l_ligne);
UTL_FILE.fflush(l_filehandler_out);
exit;
end if;
end loop;
else
exit;
end if;
end if;
end;
end if;
li_loop:=li_loop + 1 ;
--UTL_FILE.FCLOSE(l_filehandler_in);
JAVA_GC();
EXIT WHEN L_NBROWKEEPTODO=0;
Exception
when others then
begin
-- IF(utl_file.is_open(l_filehandler_in)) THEN
-- utl_file.fclose( l_filehandler_in);
-- END IF;
IF(utl_file.is_open(l_filehandler_out)) THEN
utl_file.fclose( l_filehandler_out);
END IF;
RAISE_APPLICATION_ERROR(-20001,'File with errors');
end;
END;
END LOOP;
END LOOP;
CLOSE l_cursor;
if ( xmlString is not null ) then
dbms_lob.open(xmlString,dbms_lob.lob_readwrite);
l_lobsize:= dbms_lob.Getlength(xmlString);
if(l_lobsize>0) then
dbms_lob.erase(xmlString,l_lobsize,1);
end if;
dbms_lob.close(xmlString);
dbms_lob.freeTemporary( xmlString);
end if;
if(l_parsedclob is not null) then
dbms_lob.open(l_parsedclob,dbms_lob.lob_readwrite);
l_lobsize:= dbms_lob.Getlength(l_parsedclob);
if(l_lobsize>0) then
dbms_lob.erase(l_parsedclob,l_lobsize,1);
end if;
dbms_lob.close(l_parsedclob);
dbms_lob.freetemporary(l_parsedclob);
end if;
UTL_FILE.NEW_LINE(l_filehandler_out);
l_ligne:='</DATA></CATALOG>';
UTL_FILE.PUT(l_filehandler_out,l_ligne);
UTL_FILE.FCLOSE(l_filehandler_out);
EXCEPTION
when others then
begin
IF(utl_file.is_open(l_filehandler_out)) THEN
utl_file.fclose( l_filehandler_out);
END IF;
end;
END;
******************************Thank you for the info - I had no idea I was puing myself in danger by cutting it so close. Since your post I have moved my iphoto library to an external drive and now have 165 GB of space on my HD. Following this I have 2 questions.
1. Since my available HD space was reduced by the size of the photo download it seems logical that the download is somewhere on my HD still. Is there a place where these photos might be hiding on my HD even though they are not available on the iphoto library?
2. I was able to recover the .jpg files which are fine. I also recovered the .mov files but they have been compromised. I am hoping I can find the originals still on the HD somewhere. If not, do you have any suggestions for recovery methods or programs? I have not used the SD card since the incident so I should be able to attempt another recovery to salvage the .mov files if there is an alternative method/program available.
Thanks again! -
Hi,
I have a little problem that I am really not sure what to do with. I wanted to put it out there to see if anyone has ever seen anything like this before!
I use XMLGen as pretty much the only way to query my database and pass the results to my .Net data tier. I have records that store both data and time however if I query the records with XMLGen, the date gets truncated !
For example, although the table may well have 11-DEC-1979 11:32:00AM in the field, when XML Gen has finished it is presented as 11-DEC-1979. In effect it is truncating the date. The most furstrating part is that I have some fields where the date is not truncated and it is presented in my xml.
Has anyone ever seen this before?Does this help...
SQL> connect scott/tiger
Connected.
SQL> --
SQL> set long 10000
SQL> --
SQL> select dbms_xmlgen.getXMLType('select systimestamp from dual') from dual
2 /
DBMS_XMLGEN.GETXMLTYPE('SELECTSYSTIMESTAMPFROMDUAL')
<ROWSET>
<ROW>
<SYSTIMESTAMP>27-JUL-06 12.33.28.421000 PM -07:00</SYSTIMESTAMP>
</ROW>
</ROWSET>
SQL> alter session set NLS_TIMESTAMP_TZ_FORMAT = 'YYYY-MM-DD"T"HH24:MI:SSTZH:TZM'
2 /
Session altered.
SQL> select dbms_xmlgen.getXMLType('select systimestamp from dual') from dual
2 /
DBMS_XMLGEN.GETXMLTYPE('SELECTSYSTIMESTAMPFROMDUAL')
<ROWSET>
<ROW>
<SYSTIMESTAMP>2006-07-27T12:33:28-07:00</SYSTIMESTAMP>
</ROW>
</ROWSET> -
Error with PL/SQL xmlGen if unlimited rows
If I run xmlgen server side from pl/sql and I dont specify a limit on the rows I get the following error
xml version=1.0
ERROR
oracle.xml.sql.OracleXMLSQLEception
ORA-00600: internal error code, arguments: [kdlseek-kgbtnscb]
ERROR
If limit the rows it works ok, the generated xml is not that big only about 600 rows
Any ideas on whast the problem
RobI too get the same problem. Has anyone come up with a solution, not a workaround?
SQL> select xmlgen.getXML('select * from dict where table_name like ''%ROLE%''') from dual;
XMLGEN.GETXML('SELECT*FROMDICTWHERETABLE_NAMELIKE''%ROLE%''')
<?xml version = '1.0'?>
<ROWSET>
<ROW num="1">
<TABLE_NAME>DBA_ROLES</T
SQL> select xmlgen.getXML('select * from dict') from dual;
select xmlgen.getXML('select * from dict') from dual
ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception:
oracle.xml.sql.OracleXMLSQLException: ORA-00600: internal error code,
arguments: [kdlseek-kgbtnscb], [], [], [], [], [], [], []
ORA-06512: at "SCOTT.XMLGEN", line 465
ORA-06512: at "SCOTT.XMLGEN", line 456
ORA-06512: at line 1
SQL> select count(*) from dict;
COUNT(*)
851
SQL> describe dict;
Name Null? Type
TABLE_NAME VARCHAR2(30)
COMMENTS VARCHAR2(4000)
SQL>
shared_pool_size = 52428800 # 50MB
large_pool_size = 614400
java_pool_size = 41943040 # 40MB
W2K V5 SP1, 8.1.6 RLSE2 & XSU1.2
Steve.
null -
XMLGEN: Produce XML dump of a table WITH tags for null column values
I am new to generating XML so bear with me....
We have a customer who needs an XML extract of data, including tags for any column that is null.
I created a simple test case below using DBMS_XMLGEN.getXML. The first row (A1) has no null values and thus tags for columns A, BEE and CEE are produced. The second row (A2) has null in column BEE and thus tags for only columns A and CEE are produced.
Is there a way to force a tag for null column BEE in the second row?
create table foo (A varchar2(10), BEE number, CEE date);
insert into foo values ('A1',1,sysdate);
insert into foo values ('A2',null,sysdate);
SELECT DBMS_XMLGEN.getXML('SELECT * FROM foo') FROM dual;
<ROWSET>
<ROW>
<A>A1</A>
<BEE>1</BEE>
<CEE>27-SEP-12</CEE>
</ROW>
<ROW>
<A>A2</A>
<CEE>27-SEP-12</CEE>
</ROW>
</ROWSET>What's the database version? (SELECT * FROM v$version)
Could you use this instead :
SQL> select xmlserialize(document
2 xmlelement("ROWSET",
3 xmlagg(
4 xmlelement("ROW",
5 xmlelement("A", a)
6 , xmlelement("BEE", bee)
7 , xmlelement("CEE", cee)
8 )
9 )
10 )
11 -- for display purpose only :
12 as clob indent
13 )
14 from foo
15 ;
XMLSERIALIZE(DOCUMENTXMLELEMEN
<ROWSET>
<ROW>
<A>A1</A>
<BEE>1</BEE>
<CEE>2012-09-27</CEE>
</ROW>
<ROW>
<A>A2</A>
<BEE/>
<CEE>2012-09-27</CEE>
</ROW>
</ROWSET>
Or,
SQL> select xmlserialize(document
2 xmlquery(
3 '(#ora:view_on_null empty #)
4 {
5 <ROWSET>{fn:collection("oradb:/DEV/FOO")}</ROWSET>
6 }'
7 returning content
8 )
9 as clob indent
10 )
11 from dual;
XMLSERIALIZE(DOCUMENTXMLQUERY(
<ROWSET>
<ROW>
<A>A1</A>
<BEE>1</BEE>
<CEE>2012-09-27</CEE>
</ROW>
<ROW>
<A>A2</A>
<BEE/>
<CEE>2012-09-27</CEE>
</ROW>
</ROWSET>
(where "DEV" is my test schema)
If you want to stick with DBMS_XMLGEN, you're gonna have to use PL/SQL and setNullHandling procedure.
Edited by: odie_63 on 27 sept. 2012 17:14 -
ORA-31186 Document contains too many nodes - Using XMLGen with XSLT
When processing a query that returns a large number of rows I'm getting this error. It doesn't appear that processing results with a style sheet works for larger result sets, in this case 64k rows.
Hi,
you may want to check
ORA-24817 and ORA-31186 (undocumented errors)
Regards,
Jaromir -
Reports hung on 9ias Rel2 with MissingResourceException
We are getting reports hung on the reports server. In the trace file of the server we get this error. The report does not hang when run in report builder. It also only hangs every now and then not all the time.
[2002/8/5 0:16:26] Warning 50103 (ResourceManager:getString): java.util.MissingResourceException: Can't find resource for bundle oracle.reports.utility.resource.RWGenericBundle, key 7
Does anyone know what is causing this. In the report trace we get this error as well:
[2002/8/5 8:33:50] Error 50103 (C Engine): 08:33:50 ERR REP-0002: Unable to retrieve a string from the Report Builder message file.
[2002/8/5 8:33:50] Error 50103 (C Engine): 08:33:50 APP ... ( Name unknownWe have identified several different hangs in the reports server since going production. You can try our latest patch 9.0.2.0.5 to see if you can still reproduce the hang.
Thanks,
-Shaun -
Problem with generating xml and nested cursor (ora-600)
I have a problem with generating xml (with dbms_xmlquery or xmlgen) and nested cursors.
When I execute the following command, I get a ORA-600 error:
select dbms_xmlquery.getxml('select mst_id
, mst_source
, cursor(select per.*
, cursor(select ftm_fdf_number
, ftm_value
from t_feature_master
where ftm_mstr_id = pers_master_id ) as features
from t_person per
where pers_master_id = mst_id ) as persons
from f_master
where mst_id = 3059435')
from dual;
<?xml version = '1.0'?>
<ERROR>oracle.xml.sql.OracleXMLSQLException: ORA-00600: internal error code, arguments: [kokbnp2], [1731], [], [], [], [], [], []
</ERROR>
The problem is the second cursor (t_feature_master).
I want to generate this:
<master>
<..>
<persons>
<..>
<features>
<..>
</features>
</persons>
<persons>
<..>
<features>
<..>
</features>
</persons>
</master>
If i execute the select-statement in sql-plus, then I get the next result.
MST_ID MST_SOURCE PERSONS
3059435 GG CURSOR STATEMENT : 3
CURSOR STATEMENT : 3
PERS_MASTER_ID PERS_TITLE PERS_INITI PERS_FIRSTNAME PERS_MIDDL PERS_LASTNAME
3059435 W. Name
CURSOR STATEMENT : 15
FTM_FDF_NUMBER FTM_VALUE
1 [email protected]
10 ....
I use Oracle 8.1.7.4 with Oracle XDK v9.2.0.5.0.
Is this a bug and do somebody know a workaround?Very simple...Drop all type objects and nested tables and create them again. You will get no error. I'll explain the reason later.
-
Why are results from xmlgen.getxml truncated?
I have a table with 25 rows in it that displays all contents with a SELECT * statement. However, if I wrap this statement in an xmlgen.getxml the result is truncated. I'm sure this is a novice issue, and this novice would appreciate any insight.
Thanks in advance,
Rich
query:
SELECT xmlgen.getxml('SELECT * FROM dbotemp.portfolio') xml from dual
result:
XML
<?xml version = '1.0'?>
<ROWSET>
<ROW num="1">
<PORTFOLIO_ID>187</PORTF
1 row selected.you get a clob and clobs are normely truncated
when you use the statement ins SQL*PLus try: "set long 10000"
and you will see the whole result -
ADF Groovy Expression with bind variable and ResourceBundle
Now I have ViewObject which have WHERE clause with bind variable.
This bind variable is for language. Within bind variable I can change Value Type to Expression and into Value: I put +(ResourceBundle.getBundle("model.ModelBundle")).getString("language")+.
Now if I run Oracle Business Component Browser (on AppModule) this works. In my ModelBundle.properties there is language=1 name-value pair. And with different locale I have different language number.
Now if I put that ViewObject on one JSF, this bind variable expression does not work any more. Error:
*oracle.jbo.JboException: JBO-29000: Unexpected exception caught: java.util.MissingResourceException, msg=Can't find bundle for base name model.ModelBundle, locale my_locale*
Any ideas?
10x
ZmedaThe most wierd thing is that, if I make ViewObjectImpl and insert this method
public String getLanguage() {
return (ResourceBundle.getBundle("model.ModelBundle")).getString("language");
and call it in Bind Variable Expression Value: viewObject.getLanguage()
IT WORKS!
But why with groovy expression it does not work?
Zmeda
Maybe you are looking for
-
All info cubes are not listed in SAP_INFOCUBE_DESIGNS
Hello experts, I want to list out all the info cubes & their Layout using report SAP_INFOCUBE_DESIGNS as this report shows only a few of the info provider details not all. how can i display all the infocube details in the same. is there any SAP NOTE
-
ACK/NACK Handling In Biztalk 2010 Orchestration - SFTP send port
Hi, I am using SFTP adapter and wants to get ACK/NACK in orchestration. I have implemented all the required steps mentioned in the below blog: http://blogs.msdn.com/b/kevinsmi/archive/2004/07/03/172574.aspx I am getting the ACKs, but in case of failu
-
Won't open from desktop, start menu or anywhere else since I got the newest version.
For the last few weeks, since I got the newest version of Firefox, I've been experiencing more an more problems with it. Now, I can't even get to open from the desktop or the start menu. I never had problems with it before the new version, now I've h
-
FlexConnect & ISE ACLs - AAA Overide/RADIUS NAC
Hi Chaps, I have 3 ACLs configured on a WLC for CWA, Corp and Guest users. On local mode APs, theses are called up using the Airespace fields in the ISE policies dependant on what rule is hit. ACL-WEBAUTH-REDIRECT ACL-PERMIT-CORP-TRAFFIC ACL-PERMIT-G
-
Yahoo mail finally working!!
before i upgraded to 1.1.3 my iphone wouldnt send an email through yahoo, even if i threatened to flush it down the toilet (which i never would but it would irritate the crap out of me!!)!! now, my yahoo mail is working fine. has anyone else experien