Solved

ora-29516 dont run main java in pl/sql

Posted on 2007-03-30
4
372 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

Title # Comments Views Activity
Oracle regular expression 6 45
oracle rollup query 3 50
null value 15 93
ORA-00972: identifier is too long from Unix but not from Windows in SQLPLUS 17 46
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows how to recover a database from a user managed backup

911 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now