Solved

ora-29516 dont run main java in pl/sql

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

Join & Write a Comment

Suggested Solutions

Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
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.  …
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…

757 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

19 Experts available now in Live!

Get 1:1 Help Now