Problem creating Stored Procedure

Problem creating Stored Procedure

Post by monk » Fri, 22 Nov 2002 21:23:50



Hi

I am trying to create a simple stored procedure in the Stored Procedure
Builder. I get the following Error Message :

DB2INST1.PROCEDURE1 - Jar file created.

DB2INST1.PROCEDURE1 - [IBM][CLI Driver][DB2/6000] SQL4301N  Java
interpreter startup or communication failed, reason code "2".
SQLSTATE=58004

DB2INST1.PROCEDURE1 - Build failed.

When I try to issue the command form DBAtrisan

CREATE PROCEDURE DB2INST1.Procedure1 (  ) EXTERNAL NAME
'"DB2INST1"."SQL21020025139860":Procedure1.procedure1' RESULT SETS 1
LANGUAGE JAVA PARAMETER STYLE JAVA NOT DETERMINISTIC FENCED NO DBINFO
NULL CALL MODIFIES SQL DATA

I get the following message:

The User defined function or procedure "PROCEDURE1" was unable to map to
a single Java method

UDB 7.1
AIX 4.3 (I Think)

Thanks in advance
Monky

--
Posted via http://dbforums.com

 
 
 

Problem creating Stored Procedure

Post by monk » Sat, 23 Nov 2002 01:24:11


I have sorted this. I needed to set the JAVA_HOME environment varaiable.

Thanks
Monky

--
Posted via http://dbforums.com

 
 
 

1. Problem creating stored procedures using OCI

Hello all, I'm fairly new to Oracle and have been adding support for it to
our application. I'm using Oracle 8i (WinNT) and our client application uses
the C-based Oracle Call Interface to both run the application and
dynamically create new copies of our database on the fly by reading a SQL
script and executing the statements one at a time.

Everything seems to work as far as using PL/SQL and oexec() to dynamically
create tablespaces, new users, and tables, but all the stored procedures are
created just fine -- without any error messages -- yet when I go to run them
they are all in an "Invalid State" (sys.obj$ says the state for these
procedures is 3). I'm trying to create procedures for tables that all belong
to a single user using a dedicated tablespace.

Anyway, the really weird part is if I go into DBA Studio and bring up the
source for the procedures marked as invalid, make a slight change (add a
space for instance), and recompile, then they are marked as valid.  Also, if
I run the same script through SQL*Plus, the procedures are created and
marked
as Valid. (Using SQL*Plus or an external tool to create the databases is not
an option)

However, whenever I create the procedures through OCI in our application,
the same procedures are always marked as Invalid. I'm using the "system"
user to create all the objects and I've checked the objects for dependencies
and all they reference are previously-created tables.

For example:

CREATE TABLESPACE xyz ...
CREATE USER xyz ...
CREATE TABLE xyz.tabname ...
CREATE OR REPLACE PROCEDURE xyz."procname"
-- some comments
(variables ) is
begin
 insert into tabname ...;
end;

Any ideas how to make procedures Valid when creating them in OCI? Changing
the
statements in the procuedures to "insert into xyz.tabname" doesn't help.

Thanks,
Doug

2. OpenIngres and Oracle on the same UNIX box?

3. Creating a Stored Procedure in a Stored Procedure?

4. bad container path

5. Creating stored procedures in a stored procedure?

6. ** -- Problem with NT variables and SQL server -- **

7. Problem with stored procedure that calls other stored procedures

8. Ingres DBA wanted - NYC

9. Problem compiling stored procedure that calls another stored procedure

10. Stored procedures problem using DB2 Stored Procedure Builder

11. Problem Creating Data Windows from Stored Procedure

12. Stored Procedure problem: creating new SQL users

13. Create temp table in stored procedure -- name problem