I have a Java class that will read the files and insert some data in the database. Currently by using loadjava command we loaded the class in the schema. Noe that class is running on the Oracle JVM(on the server). But my requirement is to pass the file from the Local machine(Ex: C:\test.txt). But the java class running on the server is searching the file in the server and throwing file not found exception.
Please assist me to resolve the issue.
am unable to find all the dependent jars.
Java class is running in the unix machine. I have
login pwd of the unix machine.
How to transfer a file from a client(windows machine) to unix server where the java is running.
Am unable to load the commons-net-1.4.1.jar in the schema.
What does "in the schema" mean? You seem to use that term to indicate that the code is running as part of the server; is that correct? If so, that is the wrong place for this code: Commons Net would be used for implementing the FTP client that connects to the FTP server that you said was available on the server already.
This jar depends on lot of jar. am unable to find all the dependent jars.
Try harder. The error messages you'll get for missing classes provide excellent clues.
My java code is not runing on the client Machine. It's running on the ORACLE JVM I load the java class in the schema using loadjava command.
So now the code is running in the Oracle JVM which inside (Unix machine). Now I need to transfer the file from the windows machine to Unix machine.
Also, do you want to transfer the file manually or programmatically?
First the ANT FTP task to upload a file,
then the ANT TELNET task to call the command to process the file on the server.
Meet Gaurav wrote:I want to transfer the file programmatically.
Basically Server denote my Unix box. We can't transfer a file with out authentication(userid, pwd) rite.
As far as I understood you must use your ftp stuff on your client side, so no need to embed ftp client library on oracle using loadjava.
On client machine -either linux or windows- the simpliest way that comes in my mind is to use a some peice of shell script to make ftp to database server. Then you can use utl_file to access it within your database.