Solved

ora-29516 dont run main java in pl/sql

Posted on 2007-03-30
4
378 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
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 syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

705 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