Tuesday
Aug142012

ORA-30625: method dispatch on NULL SELF argument is disallowed

With BPEL comes XML and with XML comes XPaths... This particular error plagues anyone whom uses xpath in the database with any XML doc. It usually happens when you xpath to a node and its null or does not exist. With that "discovery" of a lost or missing node the code bails and pops up that nice error. 

With this challenge, I needed to parse some error messages I received from a web service. Getting to the XML block embedded in a CDATA section is a whole other topic, but when I did get to the error block, I had to XPath into it to get my errors. One of my nodes was not consistently there, so the ORA-30625 kept popping up. A solution is as follows.

Use .existsnode in a if condition:

if
l_error_block.existsnode('/get:getDocumentFault/get:summary/text()', c_req_namespaces) = 1 then
p_error_message := l_error_block.extract('/get:getDocumentFault/get:summary/text()', c_req_namespaces).getClobVal(); 
end if; 

This will check to see if the node exists, and if it does grabs the value, if not it continues on errorless. It works but seems to be a bit much so i'd love to hear any other solutions that might be out there. 

 

XMLTable also works to prevent this, but isnt always needed and might be overkill.

Tuesday
Aug142012

SOA What?

Yes...I have not kept up with this in the past few months...blame work and my XBox...but none the less, among my daily APEX duties, I've been thrown back into the world of the Oracle 11g SOA Suite. mainly with the BPEL side of the house. The challenge we are presented with was getting a PDF from system X to system Z, with a few stops along the way. I'll be writing about the challenges I faced as well as some hints and tricks.

Its amazing how much more of the tool/software you use when you have to do it in a real world situation then in a sheltered internal Oracle proof of concept....

Monday
Apr022012

Worldwide Browser Stats for March

From here , it seems Chrome is the #1 browser these days...important to APEX user/devs because sometime chrome will render apex button placement in strange and weird ways. Also shows that IE6 is finally dying off, but not fast enough and not in all corporate environments....

Thursday
Mar292012

Quick XMLTable Tip

Quick tip...when using XMLTables, I discovered that in the passing clause, when passing a variable as an XMLElement into the XMLTable clause, you can use NVL/NVL2 for conditional variables. 

Example:

select getNet."networkid" networkid, getNet."networktier" networktier
from
   XMLTABLE(XMLNAMESPACES('http://namespace.com/v4' as "v4",'http://namespace.com/v1' as "v11" ),
   'for $i in v41:thisBlock
    where $i//v4:id = $v
    return $i//v4:networks/v41:networkTier'
    passing tt.thatXML, xmlelement("value", nvl2(p_variable, p_variable,tt.affid)) as "v"
COLUMNS
    "networkid" varchar2(40) PATH '/v41:networkTier/v41:networkId',
    "networktier" varchar2(40) PATH '/v41:networkTier/v41:providerTierLevel' 

Here with xmlelement("value", nvl2(p_variable, p_variable,tt.affid)) as "v" we can conditionally pass in a variable or a value from previous XML blocks to get what we want.

Monday
Nov282011

APEX flashback tip #1 : Saving your Bacon

In continuing my tips for Monday...here is one that just saved me a bit of time...

You can export an apex page as of X minutes ago. I know this is a well known feature but its a good one to remember. I made a page change this morning, actually imported the page from a mirror app. Overwrote some SQL and was able to export that page as of 200 minutes ago, thus getting my changed back. Awesome feature that we might forget about...