Problems with jdeveloper and java stored procedures

From: schrauf <schraufstetter_at_bv.tum.de>
Date: 30 Nov 2006 01:19:51 -0800
Message-ID: <1164878391.788854.267930_at_n67g2000cwd.googlegroups.com>



I use Oracle JDeveloper 10.1.3.1.0 and tried to include a Java stored procedure. Everything works well until I try to run the function in the database. There were no errors during compilation or when I deployed it to the database. When I try the "Run"-Command, then I get the following error message:

Connecting to the database mydatabase.

ORA-29540: Klasse JavaStoredProc ist nicht vorhanden
ORA-06512: in "SCOTT.GETHELLOFROMJAVA", Zeile 1
ORA-06512: in Zeile 5

Process exited.
Disconnecting from the database mydatabase.

English translations:
ist nicht vorhanden = is not available
Zeile = line

The Java code is:



package package1.mypackage;

public class JavaStoredProc {

    public JavaStoredProc2() {
    }

    public static String getHelloFromJava ()     {

        String _string = new String();
        for (int i = 0; i < 3 ; i++)
        {
            _string = _string + "Hello World ";
        }
        return _string;
        }

    }

The (generated) definition of the function looks like this: FUNCTION getHelloFromJava RETURN VARCHAR2 AUTHID CURRENT_USER AS LANGUAGE JAVA NAME 'JavaStoredProc.getHelloFromJava() return java.lang.String';

I thought that there my be problems because the package name is missing in this definition. So I tried to add the package name as prefix. But it didn't help.

I've no ideas how to solve this problems because exactly followed this really detailed instructions:
http://download-west.oracle.com/otndocs/tech/ias/portal/files/RG/OBE/PlSqlOBE/OBEplsql.htm#t4
--> Creating and Deploying a Java Stored Procedure
I even used identical names and functions.

I would be pleased if somebody could help me. Thanks! Received on Thu Nov 30 2006 - 10:19:51 CET

Original text of this message