Question: I
have a piece of code I am trying to run, but I keep getting an
ORA-30625 error as follows: method dispatch on NULL SELF argument is
disallowed.
ORA-30625: method dispatch on null self argument is disallowed
How can I get past this ORA-30625 error?
Answer:
Without seeing your full code listing or the contents of your whole
error stack that includes the ORA-30625, it will be difficult to
determine the specific problem with your code.
The
oerr utility
should first be used to find the full content of the ORA-30625 error
description from Oracle:
ORA-30625: method dispatch on NULL SELF argument is disallowed
Cause: A member method of a type is being
invoked with a NULL SELF argument.
Action: Change the method
invocation to pass in a valid self argument.
In general terms, this is the PL/SQL equivalent of the Java
Null Pointer Exception (NPE). The implication is that you are
invoking a method on a NULL object.
This commonly happens when attempting to extract XML data from a
database that's of one type, perhaps CLOB, and converting it to
another. Check your XMLtype object to make sure it's not NULL
before you attempt to invoke a method on it.
Also, it's possible that the NULL value is due to the specific
tablespace not being identified in the extract statment. A
simple example would be:
...
SALES :=
x.extract('/Author/Last/text()');
price := SALES.getStringVal();
dbms_output.put_line('Done');
dbms_output.put_line(price);
Even if the tablespace has been defined elsewhere in the code,
the extract is not pointed at it. The following snip does not
return the ORA-30625 because it knows exactly where to look:
...
SALES :=
x.extract('//Author/Last/text()','xmlns="http://www.webserviceX.NET/"');
price := SALES.getStringVal();
dbms_output.put_line(price);
|
|
Get the Complete
Oracle SQL Tuning Information
The landmark book
"Advanced Oracle
SQL Tuning The Definitive Reference" is
filled with valuable information on Oracle SQL Tuning.
This book includes scripts and tools to hypercharge Oracle 11g
performance and you can
buy it
for 30% off directly from the publisher.
|