RandomAccessFile on Server..  Where is File Located???

Hello Professionals:
I have created an oracle trigger on a table on insert that passes the column contents to a java procedure that is intended to write this data to a RandomAccessFile. I am not sure where the file will be created on the Server. I created my java classes on an Oracle 8.1.6 database. My java class (and procedure) that writes the data to the file is indicated below. Your guidance is needed. Thanks. I am logged into the database as teh schema owner of the table and java classes.
Chris
package mypackage1;
import java.io.*;
public class AddData
public static void TriggerData(int v_id, String v_name)
Record blank;
String fileName = "TriggerData20.dat";
blank = new Record(v_id,v_name);
try {
RandomAccessFile file = new RandomAccessFile(fileName, "rw");
file.seek(file.length());
System.out.println("Just getting ready to write to file");
blank.write(file);
System.out.println("Just written data to file");
System.exit(0);
catch (IOException e){
System.out.println("This is not a valid file");
System.exit(1);
public static void main(String[] args)
AddRecord addRecord = new AddRecord();
// A class that represents one record of information.
package mypackage1;
import java.io.Serializable;
public class AccountRecord implements Serializable
private int account;
private String firstName;
public AccountRecord()
this(0,"");
public AccountRecord(int acct, String first)
setAccount(acct);
setFirstName(first);
public void setAccount(int acct)
account = acct;
public int getAccount(){return account;}
public void setFirstName(String first)
firstName = first;
public String getFirstName(){return firstName;}
//Record class for RandomAccessFile programs;
//This class will be wrapped as a procedure to call in the Oracle Trigger;
//Two or more values will be passed into the method call Record(xx,xx,etc) from the Oracle table;
package mypackage1;
import java.io.*;
//import AccountRecord class from package!!!!!!!!!!!!!!!!!
public class Record extends AccountRecord
//String file = "TriggerData5.dat";
public Record()
this(25,"farting");
public Record(int acct, String first)
super(acct,first);
//Read a record from the specified RandomAccessFile
setAccount(file.readInt() );
setFirstName(padName(file) );
private String padName(RandomAccessFile f) throws IOExeption
char name[] = new char [15], temp;
for (int i = 0; i < name.length; i++) {
temp = f.readChar();
name[i] = temp;
return new String(name).replace('\0',' ' );
//Write a record to the specified RandomAccessFile
public void write(RandomAccessFile file) throws IOException
//file.seek(size());
file.writeInt(getAccount() );
writeName(file, getFirstName() );
private void writeName(RandomAccessFile f, String name) throws IOException
StringBuffer buf = null;
if (name != null )
buf = new StringBuffer(name);
else
buf = new StringBuffer(15);
buf.setLength(15);
f.writeChars(buf.toString() );
/*//Not too sure if I need to have the main method here!!!!!!!!!!!!!!
public static void main(String[] args)
Record record = new Record();
}

Chris,
i have posted a response on the JDeveloper forum which says:
The file will be created with a root of $ORACLE_HOME ifthe filename is not
an absolute path. The writer must have the proper permissions to write the
file. All subdirectories, if any in the path name, must exist or an
exception will be thrown.
Kuassi
Hello Professionals:
I have created an oracle trigger on a table on insert that passes the column contents to a java procedure that is intended to write this data to a RandomAccessFile. I am not sure where the file will be created on the Server. I created my java classes on an Oracle 8.1.6 database. My java class (and procedure) that writes the data to the file is indicated below. Your guidance is needed. Thanks. I am logged into the database as teh schema owner of the table and java classes.
Chris
package mypackage1;
import java.io.*;
public class AddData
public static void TriggerData(int v_id, String v_name)
Record blank;
String fileName = "TriggerData20.dat";
blank = new Record(v_id,v_name);
try {
RandomAccessFile file = new RandomAccessFile(fileName, "rw");
file.seek(file.length());
System.out.println("Just getting ready to write to file");
blank.write(file);
System.out.println("Just written data to file");
System.exit(0);
catch (IOException e){
System.out.println("This is not a valid file");
System.exit(1);
public static void main(String[] args)
AddRecord addRecord = new AddRecord();
// A class that represents one record of information.
package mypackage1;
import java.io.Serializable;
public class AccountRecord implements Serializable
private int account;
private String firstName;
public AccountRecord()
this(0,"");
public AccountRecord(int acct, String first)
setAccount(acct);
setFirstName(first);
public void setAccount(int acct)
account = acct;
public int getAccount(){return account;}
public void setFirstName(String first)
firstName = first;
public String getFirstName(){return firstName;}
//Record class for RandomAccessFile programs;
//This class will be wrapped as a procedure to call in the Oracle Trigger;
//Two or more values will be passed into the method call Record(xx,xx,etc) from the Oracle table;
package mypackage1;
import java.io.*;
//import AccountRecord class from package!!!!!!!!!!!!!!!!!
public class Record extends AccountRecord
//String file = "TriggerData5.dat";
public Record()
this(25,"farting");
public Record(int acct, String first)
super(acct,first);
//Read a record from the specified RandomAccessFile
setAccount(file.readInt() );
setFirstName(padName(file) );
private String padName(RandomAccessFile f) throws IOExeption
char name[] = new char [15], temp;
for (int i = 0; i < name.length; i++) {
temp = f.readChar();
name[i] = temp;
return new String(name).replace('\0',' ' );
//Write a record to the specified RandomAccessFile
public void write(RandomAccessFile file) throws IOException
//file.seek(size());
file.writeInt(getAccount() );
writeName(file, getFirstName() );
private void writeName(RandomAccessFile f, String name) throws IOException
StringBuffer buf = null;
if (name != null )
buf = new StringBuffer(name);
else
buf = new StringBuffer(15);
buf.setLength(15);
f.writeChars(buf.toString() );
/*//Not too sure if I need to have the main method here!!!!!!!!!!!!!!
public static void main(String[] args)
Record record = new Record();

Similar Messages

  • Where are files located

    I recently had to wipe my hard drive and now I'm in the process of reinstalling all my software and what not. Before doing this I backed up my whole drive using Norton Ghost and saved it to a second hard drive along with all of my music files. However I would like to know what files in itunes contain my library and playslists, and where they are located. Can anybody help me?

    hiya!
    this resource might be helpful:
    What are the iTunes Library files?
    love, b

  • Telling ML Server where service data location is (again).

    Hello,
    I've seen this a couple of times and think it's a bug. Maybe somebody knows how to resolve this properly. Mini Server with 10.8.2 and OS X Server v2.2 running, all services configured. Service data is moved via Server->Settings->Service Data to another volume.
    The customer moves the physical location of the server, probably forgets to attach the external drive containing the service data on boot. Server starts with other (local) settings rather than what was configured and run already successfully with service data located on external drive.
    After stopping all services, setting the service data location to the external drive fails with "Existing Service Data - The volume “Data” already contains service data in /Library/Server. Please delete or move the data and try again, or choose a different volume.".
    Yes, we want to use the service data of the external volume. This is desired. How to resolve this?
    Alex

    Hi,
    ran several times into the same problem. Our service data was moved to an external RAID 1 volume and there it should be. For whatsoever reason the volume containing /Library/server was disconnected and upon automatic reconnection (or restart) the server could not find the service data again and therefore the osx server set the default location of service data to boot volume/Library/Server... I thought I was about to go mad... How to point the server to correct service data manually. It seemed there was no option to do this in ML OS X server. So being almost hopeless, I renamed the original service data folder on RAID 1 volume to /Library/Server_old. In the menawhile i noticed that although Finder showed correctly mounted RAID 1 volume with the initial name ("Pool") in fact in /Volumes there were /Volumes/Pool and /Volumes/Pool1 which pointed to the RAID server. Ridiculous. The OSX mounted the RAID 1 volume incorrectly or the server tried to save some sort of service data BEFORE the server data RAID 1 volume was at least mounted correctly and thus created a directory named /Volmes/Pool that fooled the server completely and corrupted it as it could not found any correct service data on /Volumes/Pool... Googling around showed that the problematic service might be Messages "_jabber". So In Server.app turn off every service available and quit. In disc tool eject the external volume containing real service data. Then in terminal delete recursively the undesired "ghost" folder ( /Volumes/Pool in my case). Pay attention not to delete the real volume containing the service data! Then again mount the external volume with the service data. Check in terminal that it was mounted correctly in /Volumes. In the meanitme act quickly. I needed to delete the gost folder several times until there was not any ghost folder anymore before mounting the true service data external volume. It is difficult to completely shut down all the server services that access service data although the Server.app shows everything offline. Then launch server.app again move the almost empty default service location to the real external Volume already mounted correctly. Now comes the brute part. On the external volume delete in terminal recursively the /Library/Server and rename the backup /Library/Sever_old to back to /Library/Server. I prayed it would work at that point. And upon restart it did work. Good luck!

  • Where is XI server old log file location

    Hello,
          Our XI server is got down suddenly ,we restart the sever,But we are not able to found any error  because each trace file and developer tace file contains logs after server is getting started.This happens four times in A month
    Any one have idea where I will get this old logs or log files.
    Thanks and Regards,
    Sarika.

    hi,
    please refer bellow link,
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/64/0b59010a65de44be4f26cb57b9580d/content.htm
    thanks,

  • Tell LR where new file location is?

    I moved all my photo files and know how to manually locate each file, but is there a way of telling LR the new location of all the files in one go? It keeps on automatically looking for the old location.

    Do the relinking at the folder level, not on individual files. If you moved all your photo files, then ALL the folders in the Folders Panel should have the "?" mark....so right-click (ctrl-click on Mac) on the highest level folder in the Folders Panel, select "Find Missing Folder", point to the same folder in its new location. If you have a single parent folder, you're done. If you have more, rinse and repeat.

  • TS3430 OIn article TS3430; I have iTunes 10.6.1.7 on Win 7 Hm Prem x64. I looked where the file locations of Plug-ins are provided, issues were: 1)In the fldr on the \Users... Path, the Plug-ins fldr was empty, 2)No Plug-ins fldr in Prog Files or Prog Fil

    Does this mean that I do not have ANY plug-ins or is there likely to be another cause.

    I wish Apple paid attention...
    On this Forum, Apple does not pay attention.  This is a user to user forum.
    For that exact reason, we have no ability to fix bugs in iTunes.  You can however, report them directly to Apple:
    http://www.apple.com/feedback/itunesapp.html
    I see that you do not care for the workaround that I proposed, which is of course entirely up to you. 

  • Retrieve server msg from procedures located on other servers

    all works fine executing this:
    set serveroutput on;
    execute dbms_java.set_output(20000);
    execute JProg_Caller;
    Output Created By JProg_Caller:
    JProg_Caller's Message
    but when I am NOT Connected to the server where JProg_Caller is located on:
    executing this on another server:
    set serveroutput on;
    execute dbms_java.set_output(20000);
    execute JProg_Caller@ServerWhereJProg_CallerIsStored;
    I am not receiving any line, the Database link works fine and the JProg_Caller seem to do its job.
    How do I get the Lines provided by DBMS_OUTUT.put_line() ?

    Hello
    unfortunately the remote db is called like this:
    MY.OTHER.SERVER
    [email protected];
    and
    [email protected];
    function well,
    but
    [email protected] (ch_array,n );
    is causing:
    12/7 PL/SQL: Statement ignored
    12/7 PLS-00306: wrong number or types of arguments in call to
    'GET_LINES'
    DBMS_Output.get_lines@remote (ch_array,n );
    LINE/COL ERROR
    11/7 PL/SQL: Statement ignored
    11/7 PLS-00201: identifier 'DBMS_OUTPUT@REMOTE' must be declared
    11/7 PLS-00352: Unable to access another database 'REMOTE'
    o.k. because the Database remote does'nt exist.
    also
    DBMS_Output.get_lines@"MY.OTHER.SERVER" (ch_array,n );
    will cause
    12/7 PL/SQL: Statement ignored
    12/7 PLS-00306: wrong number or types of arguments in call to
    'GET_LINES'

  • Where are the jar files located in the server in which the MS SQL Server is installed?

    Hello All,
    Please tell me the place where jar files are located in the system in which the MS SQL Server is installed.
    Please help me as early as possible.
    Thanks in advance.
    Thanks and Regards, Readers please vote for my posts if the questions i asked are helpful.

    Check BOL page: Using the JDBC Driver
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • RandomAccessFile on Server..Where is File Created?

    Hello Professionals:
    I have created an oracle trigger on a table during insert that passes the column contents to a java procedure that is intended to write this data to a RandomAccessFile. I am not sure where the file will be created on the Server. I created my java classes on an Oracle 8.1.6 database. My java class (and procedure) that writes the data to the file is indicated below. Your guidance is needed. Thanks.
    Chris
    package mypackage1;
    import java.io.*;
    public class AddData
    public static void TriggerData(int v_id, String v_name)
    Record blank;
    String fileName = "TriggerData20.dat";
    blank = new Record(v_id,v_name);
    try {
    RandomAccessFile file = new RandomAccessFile(fileName, "rw");
    file.seek(file.length());
    System.out.println("Just getting ready to write to file");
    blank.write(file);
    System.out.println("Just written data to file");
    System.exit(0);
    catch (IOException e){
    System.out.println("This is not a valid file");
    System.exit(1);
    public static void main(String[] args)
    AddRecord addRecord = new AddRecord();
    // A class that represents one record of information.
    package mypackage1;
    import java.io.Serializable;
    public class AccountRecord implements Serializable
    private int account;
    private String firstName;
    public AccountRecord()
    this(0,"");
    public AccountRecord(int acct, String first)
    setAccount(acct);
    setFirstName(first);
    public void setAccount(int acct)
    account = acct;
    public int getAccount(){return account;}
    public void setFirstName(String first)
    firstName = first;
    public String getFirstName(){return firstName;}
    //Record class for RandomAccessFile programs;
    //This class will be wrapped as a procedure to call in the Oracle Trigger;
    //Two or more values will be passed into the method call Record(xx,xx,etc) from the Oracle table;
    package mypackage1;
    import java.io.*;
    //import AccountRecord class from package!!!!!!!!!!!!!!!!!
    public class Record extends AccountRecord
    //String file = "TriggerData5.dat";
    public Record()
    this(25,"farting");
    public Record(int acct, String first)
    super(acct,first);
    //Read a record from the specified RandomAccessFile
    setAccount(file.readInt() );
    setFirstName(padName(file) );
    private String padName(RandomAccessFile f) throws IOExeption
    char name[] = new char [15], temp;
    for (int i = 0; i < name.length; i++) {
    temp = f.readChar();
    name[i] = temp;
    return new String(name).replace('\0',' ' );
    //Write a record to the specified RandomAccessFile
    public void write(RandomAccessFile file) throws IOException
    //file.seek(size());
    file.writeInt(getAccount() );
    writeName(file, getFirstName() );
    private void writeName(RandomAccessFile f, String name) throws IOException
    StringBuffer buf = null;
    if (name != null )
    buf = new StringBuffer(name);
    else
    buf = new StringBuffer(15);
    buf.setLength(15);
    f.writeChars(buf.toString() );
    /*//Not too sure if I need to have the main method here!!!!!!!!!!!!!!
    public static void main(String[] args)
    Record record = new Record();
    }

    per OracleJVM development: the file will be created with a root of $ORACLE_HOME if the filename is not an absolute
    path. The writer must have the proper permissions to write the file. All subdirectories, if any in the path name, must exist or an
    exception will be thrown.
    My guess is that they would get written into the user_dump_dest directory.
    Probably a question that will be answered most quickly by the RDBMS forum,
    or by a quick test on your database with a file with a well-known name.

  • Where upload file is store through FileUpload UI at server ?

    Hi,
    Where upload file is store through FileUpload UI ? And How i access that server location ?
    Regards,
    Gurprit Bhatia
    Edited by: GURPRIT BHATIA on Jun 5, 2008 2:49 PM

    Hello Gurprit,
    the files are actually loaded into the server's memory. Please refer to the following document:
    [Uploading and Downloading Files in Web Dynpro Java|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b0e10426-77ca-2910-7eb5-d7d8982cb83f]
    If you want to store the contents to a file you would have to write custom java code for that. For a clustered environment I would suggest to store the data in a database instead.
    Kind regards
    Matthias

  • How to refer to the xml file located on unix server

    I have a xml file which is located on unix server and have a hard time, reverse engg. it .
    if anyone has any knowledge on this , that will be helpful.

    I have application server where my xml is located.e..g /tmp/xyz.xml
    I have designer on my laptop from where i have created a agent which points to my application server.
    I am able to create a data server which does say test successful.
    In model i tried to create new model and trying to reverse engg. the xml now i get following error .
    java.sql.SQLException: Could not generate the DTD because the file could not be created. Verify that you have write permission in the directory.
    if you can point me to documentation which has some information on this will be helpful or any hint..

  • URL iview with HTML file located in Portal server.

    I created URL iview pointing to HTML file located in the Portal server. When I try preview it is not working. We wanted to use this iview to create space between two iviews.
    This is going to be blank iview.
    I saved the HTML file same as where index.html file of webas is located.
    Please let me know what is missing here. What kind of path I need to give in the URL of the iview.

    Hi Nagesh,
    Are you saying that you created a HTML file on the file system of the portal server or did you create the HTML file within a KM repository on the portal?
    If it is the 1st option you should have the HTML file hosted under a webserver such as IIS or Apache and then use the URL that the website is created under.
    If it is a file within KM then open the properties of the HTML document that you have created and use the Access Link value as the URL for the iView.
    Please let me know if you need further clarification.
    Regards
    Daniel

  • Where is the Application Sharing defaulttrace.trc file located?

    Hi,
    In a help document it says this:
    a.      Set the Application Sharing Server trace file (defaultTrace.trc) to severity info and try to start a new session.
    but where is the Application Sharing file located? or it means the J2EE defaultTrace file?
    Thanx in Advanced!
    Kind Regards,
    Gerardo J

    Hi Gerardo,
    Collaboration uses the logging mechanisms of the J2EE Engine. Therefore it is the defaultTrace.trc  under .../usr/sap/<SID>/Jxx/j2ee/cluster/serverX/log/ .
    Kind regards
    Klaus

  • Want to change the SQL Server Agent Job History Text Files Location

    We have SQL Server 2014 installed on a couple servers, but they were not consistent on directory paths during the installs. I am trying to get the servers to all match.
    On one server, SQL Server the Agent Log and Job History files were being written to [H:\Data Root Directory\MSSQL12.MSSQLSERVER\MSSQL\Log].
    I want to change that to [H:\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Log] to match the other server.
    I have ALREADY gone into SSMS - [SQL Server Agent] - [Properties] and changed the "Error Log " "Fle Name" to [H:\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Log\SQLAGENT.OUT].  And that is working great.
    In [SQL Server Configuration Manager] - [SQL Server (MSSQLSERVER)] - [Properties] - Startup Parameters entries have been changed to the new path (-d, -e, and -l), and under [Advanced] both Data Path and Dump Directory are pointing to the new path. 
    In [SQL Server Configuration Manager] - [SQL Server Agent (MSSQLSERVER)] - [Properties] - [Advanced] Dump Directory is pointing to the new path. 
    However, the job's History text files are still being written to the old path.
    There is no setting in the Jobs or the Maintenance Plans that controls the history file location.
    I have searched the registry and changed three settings from the old path to the new path.  The registry does NOT contain any more references to the old path.
    I rebooted the server, but when the jobs run their history text files are still be written to the old path.
    Does anybody have any ideas??   Thanks

    I checked the [Job] - [Step] - [Advanced ] - "Output File", and the field is blank.
    I then reviewed all the tabs and left menu items in the Job...I cannot find any where the references the old path.
    I then went to the Maintenance Plan and checked every thing there.  Still cannot find what is referencing this old path.
    SQL Server is also still writing xel files to this old path...if that offers any clues.
    The text file being generated is the recap of the Job run.  Starts with this:
    Microsoft(R) Server Maintenance Utility (Unicode) Version 12.0.2430
    Report was generated on "xxxxxxxxxxxxxxx".
    Maintenance Plan: SQL_Backups_Log
    Duration: 00:00:03
    Status: Succeeded.
    Details:
    Thanks for the ideas....

  • Can't open office files located on a windows server fileshare

    Hi TechNet / Office for Mac Community,
    re: can't open MS Office files located on a windows server file share
    Is anyone else experiencing this issue and/or have a fix?
    Details:
    Clients: Mac OS X 10.6 / 10.7 / 10.8 / 10.9
    File share: Windows Server 2008 R2
    Connecting via SMB or CIFS
    Problem:
    When mounting the Windows Server file share, Mac clients are unable to open MS Office 2011 files (not just powerpoint) from that location.
    Error message: "there was an error accessing /Volumes/data/folder/presentation.pptx"
    There is no issue creating or deleting MS Office files from that location. 
    The Mac 'Preview' application is able to open the same MS Office file without issues.
    The file is not corrupted and can be opened when copied to the desktop.
    Windows clients have no problem opening the file.
    Only this particular file share is having an issue.
    Are there any known issues or requirements for Windows Server file shares and MS Office 2011 that would apply to this problem?
    Your assistance is greatly appreciated.

    WebPhoenix, recommend you post this question here instead:
    http://answers.microsoft.com/en-us/mac
    Thanks,
    Mike
    Unfortunately your post is off topic here, in the TechNet Site Feedback forum, because it is not Feedback about the TechNet Website or Subscription.  This is a standard response I’ve written up in advance to help many people (thousands, really.)
    who post their question in this forum in error, but please don’t ignore it.  The links I share below I’ve collected to help you get right where you need to go with your issue.
    For technical issues with Microsoft products that you would run into as an
    end user of those products, one great source of info and help is
    http://answers.microsoft.com, which has sections for Windows, Hotmail, Office, IE, and other products. Office related forums are also here:
    http://office.microsoft.com/en-us/support/contact-us-FX103894077.aspx
    For Technical issues with Microsoft products that you might have as an
    IT professional (like technical installation issues, or other IT issues), you should head to the TechNet Discussion forums at
    http://social.technet.microsoft.com/forums/en-us, and search for your product name.
    For issues with products you might have as a Developer (like how to talk to APIs, what version of software do what, or other developer issues), you should head to the MSDN discussion forums at
    http://social.msdn.microsoft.com/forums/en-us, and search for your product or issue.
    If you’re asking a question particularly about one of the Microsoft Dynamics products, a great place to start is here:
    http://community.dynamics.com/
    If you really think your issue is related to the subscription or the TechNet Website, and I screwed up, I apologize!  Please repost your question to the discussion forum and include much more detail about your problem, that could include screenshots
    of the issue (do not include subscription information or product keys in your screenshots!), and/or links to the problem you’re seeing. 
    If you really had no idea where to post this question but you still posted it here, you still shouldn’t have because we have a forum just for you!  It’s called the Where is the forum for…? forum and it’s here:
    http://social.msdn.microsoft.com/forums/en-us/whatforum/
    Moving to off topic. 
    Thanks, Mike
    MSDN and TechNet Subscriptions Support

Maybe you are looking for

  • How do I stop a sync mucking about with my contacts list?

    I have repeatedly set up the same contacts list in my computer and phone. All are in the form: Marybeth @ M in the first name field - a habit from long ago! Either the computer or the phone keeps trying to create surnames or dredge them out of some o

  • Intel iMac keeps freezing, lagging and shutting down.

    My iMac has for the past week or so repeatedly frozen, sometimes leading to it showing a blue screen forcing me to shut it down. When I then try to turn it back on, it doesn't load. However, a Safe Boot and HD restore fixes the problem temporarily. T

  • Adobe Acrobat Distiller 9 Problems

    Hi, New to the forum - hopefully someone can help me out. I have also tried the Adobe Forums, Quark Forums etc. etc. with no result - all are blaming Apple - so here I am. (Mod's please move this thread if it isn't in the right place). Specs first -

  • Arial Font problem

    Hi, I'm having a problem with arial.....it displays as a comic style font. Why is this? I really need to get this sorted ASAP as we have a lot of trade work coming in from other printers, and if they use arial in their artwork it can create some seri

  • Can't import pictures into iPhoto!

    I have a problem: Pictures taken with my iPhone don't show up in iPhoto when connected. I can "see" the pictures (gray, no pics actually) but i can't import them. iPhoto gives me the error that the images aren't readable! Sam I have 1.1.3 installed!