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
Solved

ora-29516 dont run main java in pl/sql

Posted on 2007-03-30
4
374 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
exp/imp 25 84
SQL Workhours Count beetween Workhours 3 25
format dd/mm/yyyy parameter 16 28
PL/SQL: ORA-00979: not a GROUP BY expression 3 26
Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
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 configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

792 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