"No such file or directory" using java.io [message #91557] |
Thu, 07 November 2002 14:06 |
Chris Wood
Messages: 2 Registered: November 2002
|
Junior Member |
|
|
I have the following code:
public class CWoodTest {
public static String go(){
file = new File( "/data/oracle/testfile.dat" );
String result = null;
File file = null;
try{
FileWriter fileWriter = new FileWriter( file );
fileWriter.write("Working");
fileWriter.close();
} catch( Exception e ){
if( file != null)
result = e.getMessage() + " " + file.toString();
else
result = e.getMessage() + " file null";
}
if( result != null ) return result;
else return "Working";
}
}
and publish it as
CREATE OR REPLACE PACKAGE CWoodTest AS
FUNCTION go
RETURN VARCHAR2
AS LANGUAGE JAVA
NAME 'CWoodTest.go() return java.lang.String';
END CWoodTest;
/
show errors
that returns "No such file or directory", though my user has JAVAUSERPRIV and JAVASYSPRIV and /data/oracle is owned by the user oracle. UTL_FILE is able to write to /data/oracle, i.e. UTL_FILE_DIR is correct in init.ora. Similar Java code works on my local machine. Ideas anyone?
|
|
|
|