java.io.InvalidClassException: org.omg.CORBA.CompletionStatus; Local class [message #118362] |
Wed, 04 May 2005 12:50 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
dnguyen
Messages: 34 Registered: April 2005
|
Member |
|
|
Hi,
I recently loaded a user-defined function into Oracle 10g Discoverer and although the function works (in SQL plus), when it is ran on Discoverer, I keep on getting this error message:
Error unmarshaling return; nested exception is:
java.io.InvalidClassException: org.omg.CORBA.CompletionStatus; Local class
not compatible: stream classdesc serialVersionUID=-9047319660881406859 local
class serialVersionUID=-645279251430243097
Although the function seems to work with very few rows and ends, when I use the function in a query that returns slightly larger data set I get the above error.
Below, is a copy of the function pl/sql code.
Basically, it takes the variable in a particular field that the user designates and matches it to the staff id in the staff table. If it matches, it'll return the entire staff name. If not, it should just return a NULL value.
CREATE OR REPLACE FUNCTION staff_full_name
(p_staff_id IN VARCHAR2)
RETURN VARCHAR2
AS
v_full_name VARCHAR2(100);
BEGIN
SELECT DISTINCT first_name || ' ' || LTRIM(mid_name || ' ') || last_name
INTO v_full_name
FROM staff st
WHERE st.id = p_staff_id
RETURN v_full_name;
EXCEPTION
WHEN no_data_found THEN
RETURN NULL;
WHEN too_many_rows THEN
RETURN NULL;
WHEN OTHERS THEN
RETURN NULL;
END staff_full_name;
/
Furthermore, I tried looking for solutions for this problem on google. However, all of them were java-based... a language I don;t know to use and also, don;t have the priviledges if I had the knowledge.
If someone knows how to change this function so that it'll work in discoverer then that'd be great.
Also, I tried uploading this simple function (taking advice from a helpful person on the SQL newbie forum):
CREATE FUNCTION test_function
RETURN VARCHAR2
AS
BEGIN
RETURN 'OK';
END;
and it still returned the same error message (although again it worked well in sql plus).
So, I figure it's something I don;t know about how you're supposed to create functions for discoverer. I tried looking on the web but found no clearly stated requirements for Oracle 10g Discoverer.
Okay, this is long but hopefully, I provided enough information.
|
|
|
|
|