Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem Creating Java Source Through ODBC - ORA-29542
Message
From
05/07/2003 06:26:37
 
 
To
All
General information
Forum:
Oracle
Category:
Triggers, Sequences and Stored Procedures
Title:
Problem Creating Java Source Through ODBC - ORA-29542
Miscellaneous
Thread ID:
00807149
Message ID:
00807149
Views:
55
Hi,

I need to create a program that sets up the necessary server code
in the database by running various scripts. It now works for all objects
except JAVA SOURCE objects.


The following sample code in VFP
lcsql='create or replace and compile java source named DeleteFile'+chr(10)
lcsql=lcsql+'as'+chr(10)
lcsql=lcsql+'import java.io.*;'+chr(10)
lcsql=lcsql+'public class DeleteFile'+chr(10)
lcsql=lcsql+' {'+chr(10)
lcsql=lcsql+' public static void DoDelete(String FilePath) throws Exception'+chr(10)
lcsql=lcsql+' {'+chr(10)
lcsql=lcsql+' File NewFile = new File(FilePath);'+chr(10)
lcsql=lcsql+' NewFile.delete();'+chr(10)
lcsql=lcsql+' }'+chr(10)
lcsql=lcsql+' }'+chr(10)
**lcsql=lcsql+'/'+chr(10)

lnerror=SQLEXEC(h,lcsql)
IF lnerror=-1
?MESSAGE()
ENDIF

Give the error:
Connectivity error: [Oracle][ODBC][Ora]ORA-29542: class DeleteFile already defined by source DeleteFile


However, Running the same code in sqlplus:
SQL> create or replace and compile java source named "DeleteFile"
2 as
3 import java.io.*;
4
5 public class DeleteFile
6 {
7 public static void DoDelete(String FilePath) throws Exception
8 {
9 //Delete FilePath
10 File NewFile = new File(FilePath);
11 NewFile.delete();
12 }
13 }
14 /

Java created.

Works fine...


I'm a little confused about the error message and confess I cant seem to figure out how to find this "already defined source"?

Does anyone have any ideas here?
Reply
Map
View

Click here to load this message in the networking platform