Solved

ora-29516 dont run main java in pl/sql

Posted on 2007-03-30
4
373 Views
Last Modified: 2013-12-07
Hello,

i try to execute a java classes from pl/sql, how examples in manual, the VM is running in database is 10gr2 in windows xp and loadjava into database but and try to run present this error ora-29516 how the versions is not compatible the java code is:

public class EchoInput
{
 public static void main (String args[])
 {
    System.out.println("hola");
  }
}

and the procedure code is

CREATE OR REPLACE PROCEDURE echo_input AS
LANGUAGE JAVA NAME 'EchoInput.main (java.lang.String [])';

regards

0
Comment
Question by:yerai
  • 3
4 Comments
 
LVL 3

Expert Comment

by:popa_duhu
ID: 18828343
well...
the oracle 10.2 (assuming you have 10.2) has jdk 1.4.2

try to compile that class using jdk 1.4.2
0
 
LVL 3

Accepted Solution

by:
popa_duhu earned 250 total points
ID: 18828349
or...
easier

loadjava -user scott/tiger -verbose -resolve Test.java

the -resolve flag will compile the java source using "oracle jdk" and you won't have to change your default jdk
0
 
LVL 3

Expert Comment

by:popa_duhu
ID: 18828355
SELECT object_name, object_type, status
FROM user_objects WHERE object_type LIKE 'JAVA%';

what this query says (you run it in the schema where you created the java object)
0
 
LVL 27

Expert Comment

by:sujith80
ID: 18834338
I believe that you cannot call a main method java from oracle.
>>public static void main (String args[])
It doesnt make sense.

Try to convert it to a method and load again.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Subquery in Oracle: Sub queries are one of advance queries in oracle. Types of advance queries: •      Sub Queries •      Hierarchical Queries •      Set Operators Sub queries are know as the query called from another query or another subquery. It can …
Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows how to recover a database from a user managed backup

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question