FileOutputStream FileNotFound exception creating files on mounted disk

I am quite new to java, I cannot figure out why I get a File Not Found exception when opening file for output on a remote disk mounted locally as Z:
java.io.FileNotFoundException: z:\tmp\newfile.tmp (Cannot find the specified path)
     at java.io.FileOutputStream.open(Native Method)
     at java.io.FileOutputStream.<init>(Unknown Source)
     at java.io.FileOutputStream.<init>(Unknown Source)
No problem when using local disk (ex. D:)
Java version: 1.6.0.11, application server: Tomcat 6.0.14 running on Windows XP Pro SP2
Can anyone help ?
Thanks in advance

ma.poggi wrote:
Yes.
Apache Tomcat is installed as a Windows Service, and I tried running it with "local system" account and administrator account, but no luck.The network drive isn't mapped when it's running. You need to enable "interact with desktop", and have the drive mapped for the user.
Kaj

Similar Messages

  • Creating File System in SOLARIS

    Hi Everyone,
    We installed SOLARIS in SunFire server. There are 3 hard disks, namely, 0, 1 and 2. Default is zero. We formatted the disk 1 and 2 and now we're having problem creating a file system. Every time we log in to the server we automatically go to disk zero (0), which is the default. How can we create file system in disk 1 and 2?
    We'll appreciate your answers. thank you.
    Regards,
    Eco

    > We installed SOLARIS in SunFire server. There are 3 hard disks, namely, 0, 1 and 2. Default is zero. We formatted the disk 1 and 2 and now we're having problem creating a file system. Every time we log in to the server we automatically go to disk zero (0), which is the default. How can we create file system in disk 1 and 2?
    newfs?
    I'm not sure what you mean with "we automatically go to disk zero..".
    > We'll appreciate your answers. thank you.
    I suggest you take a Solaris class; no offense but if you have no clue how to administer your operating system running a SAP installation on top can be very tedious.
    Markus
    Edited by: Markus Doehr on Sep 16, 2009 11:16 AM

  • Problem writing external file to externally mounted disk in Windows

    Folks,
    I've got a puzzling problem with a simple OWB mapping where I'm dumping the contents of a table to an external file.
    Versions are OWB v 11.2.0.2 64-bits on Oracle RDBMS 11.2.0.2 Windows 2007 64-bits Enterprise Server.
    When the external files module is hooked up to a location that points to a local disk and directory on the OWB-server, everything works fine - files are created and written.
    When the external files module is hooked up to a location that points to a mounted disk on another Windows 2007 64-bits Enterprise Server, I get +"Invalid Path for target file, check if connector is deployed correctly".+
    The "File System Location Path" in OWB is set to "N:" (no slashes either way). "Test Connection" reports OK.
    I've given both the Oracle os-user and "Everyone" (for good measure) all rights on the mounted disk, and I can see that the generated package code is using the correct Directory, and the Directory Path is the correct one on the server. The mounted disk (N:) should appear as a local disk to Oracle as far as I can see. I'm able to create and delete files on the disk using command line on the OWB/DB-server.
    I'm scratching my head on this one....

    then mapped that share as a network drive (N:) on server A (the OWB/DB-server)I think that problem was with different accounts used for run Oracle database (usually database instance run under SYSTEM account) and which you used to map share (it was interactive session). Even when you made this map persistent (enable "Reconnect at logon" option during mapping) you don't grant access to this drive to other accounts (including SYSTEM ) - this drive will not be visible to other users.
    I think it is possible to create "persistent" network drive mapping for Oracle database context with specification non-SYSTEM account (domain or server local) for running Oracle database instance (and Oracle Listener service).
    Also it seems there is a workaround to access mapped network drive under SYSTEM account:
    http://stackoverflow.com/questions/182750/how-to-map-a-network-drive-to-be-used-by-a-service
    Regards,
    Oleg

  • Missing menu "File|NFS Mounts" in Disk utility

    I had many NFS mounts using Disk utility and I used "File|NFS Mounts" but now that option is missing and I can't see my mounts neither those mounts are working, so I have two questions
    1. Where I can see my old mounts listed?
    2. How can I make nfs mount work?

    The problem is Boot Camp:  It uses a hybrid GPT/MBR partitioning scheme - which ends up hiding the Recovery HD partition - which is an EFI physical partition (neither GPT nor MBR).
    I would expect a new version of Boot Camp to release - like real soon - because of the Recovery HD partition invisibility issue.
    In this article - it is suggested that rEFIt should be used to partition a hard drive that is going to support multiple boots including Mac OS X, LINUX, and Windows. 
    (http://wiki.onmac.net/index.php/Triple_Boot_via_BootCamp)
    The key in the article to using Boot Camp with rEFIt is this:
    "Run the Boot Camp Assistant and create the Windows XP driver cd. Then exit Boot Camp.  DO NOT PARTITION USING BOOT CAMP: you are only using Boot Camp for the drivers, not the partitioning."
    All partitioning is done in terminal mode using the "diskutil" command.
    rEFIt is used to update both the GPT and MBR records so that all partitions will be visible using its "gptsync" command.
    Then - you replace the standard Mac boot menu with the rEFIt boot menu.  THAT will show the Mac OS X partition, Recovery HD (an EFI partition), and the Windows partition.
    My caveat is that rEFIt - which is open sourced and available here:  http://refit.sourceforge.net
    has not been recently updated and tested with respect to Mac OS X Lion.
    Hope this helps!

  • How do I access my encrypted User Account files from my Back Up hard drive?  Time Machine  was used to create the back up disk; File Vault was used to encrypt the files.

    How do I access my encrypted User Account files from my Back Up hard drive?  Time Machine  was used to create the back up disk; File Vault was used to encrypt the files.

    Thanks.  I will try going through TM.  Since my Simpletech is on the way out, I'll be plugging in a new external hard drive (other than the back-up drive) and trying to restore the library to the new drive.  Any advice or warning if this is NOT the right thing to do?
    Meanwhile, that is a great tip to do an alternate back-up using a different means.  It's been tough to figure out how to "preserve access" to digital images and files for posterity, knowing the hardware will always fail/obsolesce sooner or later, and that "clouds" are only as good as their consistent and reliable accessibility.  Upping the odds with redundancy will help dull the edge of my "access anxiety", though logically, it can never relieve it.  Will look into
    Carbon Copy Cloner.

  • File LookUp in the MM : FileNotFound Exception

    Hello Friends,
    I am trying to fetch a file during the message mapping. The code I have written in the UDF is as follows :
    <u>
    String company = "";
    HashMap fileMap = new HashMap();
    BufferedReader reader = new BufferedReader(new FileReader("C:
    testfolder
    Mydata.txt"));
    String line = "";
    while((line = reader.readLine())!=null)
    String[] lineArray = line.split(",");
    fileMap.put(lineArray[1], lineArray[0]);
    company = (String) fileMap.get(a);
    return company; </u>
    <b>
    But I am getting the FileNotFound Exception when I tried to run the interface mapping.
    I have confirmed that file is there in the respective folder.
    1. Can we use the above code to fetch the file ?
    2. Do we need to put the file in the XI server ?
    </b>
    Thanks for your time.
    ~PRANAV

    and what exactly you are trying to do with this code ?
    to access files,you need to use Java io api's,and you can access file from any server,not just XI server
    but there are few drawbacks with this,first of all the file name and path will be hardcoded so u need to change it every time you move your file from Dev to QA to Prd.
    secondly this approach is good to read the file,but not a very good idea to write something in the file
    Thanx
    Aamir

  • START UP DISK AND CANNOT CREATE FILE

    hi!
    I've read about 10 posts and a million suggestions about cleaning up my start up disk cause it's full but nothing has worked yet... Many also recommened some apps to download to help erase things but, my computer isn't letting me download anything.. the downloads box thing says, "cannot create file" and I'm pretty sure it's saying that because of my start up disk being full.. I don't know much about computers but--- I mean, that makes sense, right? HELP HELP HELP. I've made sure my downloads are set to download to my desktop and yes it has the read/write option thing selected..etc etc.
    HELP!!!!

    Hello KaylaJ,
    You'll need to boot from another hard drive or system disk.
    If you have the original disks that came with the machine, stick it in the cd tray, close it and reboot holding c.
    Next you'll have to delete or move files to another hard drive, once it's copied over by drag and drop methods, delete the original on your boot drive to free up space.
    In fact I would take the precaution of backing up all your user data, iTunes folder, "User"/Library/Mail and "User"/Library/Safari folders. Leaving apps that you have the original install disks/sources and associated passwords.
    If you want to take a step further, you might as well erase the boot drive by selecting Disk Utility from the menu (c booted from the System Disk) and chose the option to Erase with Zero. (warning all data will be totally deleted). Come back after lunch and reinstall Tiger fresh, immediatly Software Update until clear and reinstall your apps from original sources (if all possible) and update.
    Then hook up the second hard drive and copy only security sensitive files into your User/Home. Leaving the bulk of files on the second drive. This leaves the boot drive rather light (keep under 50% filled) and Mac OS X will perform snappy.
    Also because you reinstalled totally, you optimized your boot drive and got rid of old garbage.
    Investigate how to clone your now perfect boot drive by visiting Carbon Copy Cloner forums, just in case something happens you can hold option and boot from a external drive.
    If this is too much for you, search Apple main page for "Macintosh User Groups" and find a person near you to help you set up a optimized and backup solution.

  • Problem with reading from DAT file. FileNotFound exception

    Can't seem to find the issue here. Two files, one (listOfHockeyPlayers) reads from a DAT file a list of players. The other (HockeyPlayer) has just the constructor to make a new hockey player from the read data.
    import javax.swing.*;
    import javax.swing.event.*;
    import java.util.*;
    import java.awt.*;
    import java.io.*;
    public class ImportHockeyPlayers
    private ArrayList<HockeyPlayer> listOfHockeyPlayers = new ArrayList<HockeyPlayer>();
    public ImportHockeyPlayers(String fileName)
      throws FileNotFoundException
      try
       Scanner scan = new Scanner(new File(fileName));
       while (scan.hasNext())
        //Uses all the parameters from the HockeyPlayer constructor
        String firstName = scan.next();
        String lastName = scan.next();
        int num = scan.nextInt();
        String country = scan.next();
        int dob = scan.nextInt();
        String hand = scan.next();
        int playerGoals = scan.nextInt();
        int playerAssists = scan.nextInt();
        int playerPoints = playerGoals + playerAssists;
        //listOfHockeyPlayers.add(new HockeyPlayer(scan.next(),scan.next(),scan.nextInt(),scan.next(),scan.nextInt(),scan.next(),
         //scan.nextInt(),scan.nextInt(),scan.nextInt()));
      catch(FileNotFoundException e)
       throw new FileNotFoundException("File Not Found!");
    public String toString()
      String s = "";
      for(int i = 0; i < listOfHockeyPlayers.size(); i++)
       s += listOfHockeyPlayers.get(i);
      return s;
    public class HockeyPlayer
    private String playerFirstName;
    private String playerLastName;
    private int playerNum;
    private String playerCountry;
    private int playerDOB;
    private String playerHanded;
    private int playerGoals;
    private int playerAssists;
    private int playerPoints;
    public HockeyPlayer(String firstName, String lastName, int num, String country, int DOB,
      String hand, int goals, int assists, int points)
      this.playerFirstName = firstName;
      this.playerLastName = lastName;
      this.playerNum = num;
      this.playerCountry = country;
      this.playerDOB = DOB;
      this.playerHanded = hand;
      this.playerGoals = goals;
      this.playerAssists = assists;
      this.playerPoints = goals + assists;
    DAT File
    Wayne Gretzky 99 CAN 8/13/87 R 120 222
    Joe Sakic 19 CAN 9/30/77 L 123 210These are all in early development, we seem to have the idea down but keep getting the odd FileNotFound exception when making an object of the ImportHockeyPlayers class with the parameter of the DAT file.
    We might even be on the wrong track with an easier way to do this. To give you an idea of what we want to do...read from the file and be able to pretty much plug in al lthe players into a GUI with a list of the all the players.
    Thanks for your time.

    Thanks for the tip on the date format...good to
    know.
    public static void main(String[] args)
    GUI gui = new GUI();
    ImportHockeyPlayers ihp = new
    ImportHockeyPlayers("HockeyPlayers.dat");
    }It's just being called in the main.
    Throws this error:
    GUI.java:39: unreported exception
    java.io.FileNotFoundException; must be caught or
    declared to be thrown
    ImportHockeyPlayers ihp = new
    ImportHockeyPlayers("HockeyPlayers.dat");
    ^This error is simply telling you that an exception may occur so you must enclose it in a try catch block or change the main method to throw the exception as follows
    public static void main(String[] args) throws  
                          java.io.FileNotFoundException {
         GUI gui = new GUI();
         ImportHockeyPlayers ihp = new
         ImportHockeyPlayers("HockeyPlayers.dat");
    }or
    public static void main(String[] args) {
         GUI gui = new GUI();
         try {
              ImportHockeyPlayers ihp = new
              ImportHockeyPlayers("HockeyPlayers.dat");
         catch (FileNotFoundException e) {
              System.out.println("error, file not found");
    }I would reccomend the second approch, it will be more helpful in debugging, also make sure that the capitalization of "HockeyPlayers.dat" is correct
    hope that helps

  • Sharing Air Disk with XP and OS X: XP Doesn't Create Files?

    Hello,
    I'm trying to share a USB hard disk with both my Macbook Pro and an XP machine. Both computers can see the drive and access files on it. However, only the Macbook Pro is able to create files. When I drag a directory (folder) to the drive in Windows, it creates all of the (sub)folders but the files do not seem to get copied.
    Any idea what I'm doing wrong? I'm usually pretty good with this sort of thing, but I'm baffled!
    Thanks,
    Aidan

    The only problem is that I tried to do that but when you log into the PC's you have limited access, theres no way i can have admin privileges. is there some way i can get a folder showing up on all those computers? maybe make an smb sharing service on the mac and setting up a shortcut on the windows boxes to the iMacs address?

  • Cannot create file with Non-latin characters- I/O

    I'm trying to create a file w/ Greek (or any other non-latin) characters ... for use in a RegEx demo.
    I can't seem to create the characters. I'm thinking I'm doing something wrong w/ IO.
    The code follows. Any insight would be appreciated. - Thanks
    import java.util.regex.*;
    import java.io.*;
    public class GreekChars{
         public static void main(String [ ] args ) throws Exception{
              int c;
              createInputFile();
    //          String input = new BufferedReader(new FileReader("GreekChars.txt")).readLine();
    //          System.out.println(input);
              FileReader fr = new FileReader("GreekChars.txt");
              while( (c = fr.read()) != -1)
                   System.out.println( (char)c  );
         public static void createInputFile() throws Exception {
              PrintStream ps = new PrintStream(new FileOutputStream("GreekChars.txt"));
              ps.println("\u03A9\u0398\u03A0\u03A3"); // omega,theta,pi,sigma
              System.out.println("\u03A9\u0398\u03A0\u03A3"); // omega,theta,pi,sigma
              ps.flush();
              ps.close();
              FileWriter fw = new FileWriter("GreekChars.txt");
              fw.write("\u03A9\u0398\u03A0\u03A3",0,4);
              fw.flush();
              fw.close();
    // using a printstream to create file ... and BufferedReader to read
    C:> java GreekChars
    // using a Filewriter to create files  .. and FileReader to read
    C:> java GreekChars
    */

    Construct your file writer using a unicode format. If
    you don't then the file is written using the platform
    "default" format -probably ascii.
    example:
    FileWriter fw = new FileWriter("GreekChars.txt",
    "UTF-8");I don't know what version of FileWriter you are using, but not that I know of take two string parameters. You should try checking the API before trying to help someone, instead of just making things up.
    To the OP:
    The proper way to produce a file in UTF-8 format would be this:
    OutputStreamWriter writer = new OutputStreamWriter(new FileOutputStream("filename"), "UTF-8");Then to read the file, you would use:
    InputStreamReader reader = new InputStreamReader(new FileInputStream("filename"), "UTF-8");

  • How to make iMovie 09 recognize a mounted disk image?

    I'm trying to store video clips in a disk image (Mac OS Extended - Journaled, single Apple Partition Map). Previously in iMovie 08 all I had to do was mount the image, start iMovie and it would recognize it as an additional drive. Then I could drag events to it and store them there. In 09 this does not work. It sees the image but has the yellow triangle/exclamation point in it. I cannot for the life of me figure out how to make it recognize the image! I've tried all variations in disk utility to create the image to no avail. Is iMovie 09 looking for a certain file on the disk image to recognize it? Maybe something in the DS_Store file or the .localized? Very frustrating.
    Hoping someone can help. Thanks.

    jsd2 wrote:
    Try the following:
    Mount the disk image so that there is a disk icon on the Desktop, and then launch Terminal (in /Applications/Utilities).  Copy-paste the following line into the Terminal window, and then type a single space. Do not type <Return> yet:
    sudo mdutil -i on
    After typing the single space, drag the mounted disk image icon from the Desktop into the Terminal window, click inside the Terminal window, and then type <Return>.  Enter your admin password at the prompt (it will not echo on the screen),  and again type <Return>.
    Hopefully that will enable Spotlght indexing on the mounted image. It might take some time to complete depending on the contents.
    The result for this for me, three times, was "Indexing disabled."

  • Time Machine Backup of mounted disk

    Hi,
    For sharing my iPhoto Library among multiple users on a MacBook Pro running, currently 10.6.8, I have by a Apple Support guide created a disk image file, and mounted it for storing my pictures without permission issues.
    However, to account for future expansion, the disk image is made to be 100 GB, while current photo library size is approx 50 GB. Is there any way of getting Time Machine to backup the files within the mounted disk, rather than backing up the disk image file itself? So that the size of the backup at present would be the actual size of contents of the disk, rather than the whole disk image file itself? And furthermore, by copying a disk image file, will the actual files within also be backuped?
    Hoping this makes sense to some you you, thanks!

    Create a sparse bundle disk image and copy your library there. A sparse bundle disk image consists of strips, rather than one single file. The bundle will expand to fit your needs by adding strips. If things change in the bundle, TimeMachine should be smart enough to only backup the changed strips, not the entire image. So if you tell Disk Utility to create an empty sparse bundle disk image of  1000GB and you put in only 50 GB, the bundle will only occupy 50 GB.
    When you delete loads of data, you can even shrink back the disk image (through a terminal command) to free up real disk space.
    Message was edited by: eljonco, added shrinking info

  • Creating DAS or SAN Disk Partitions for ASM

    Oracle® Database Installation Guide 11g Release 2 (11.2) for Linux (http://docs.oracle.com/cd/E11882_01/install.112/e24321/oraclerestart.htm#CHDBJGEB)
    *3.6.3 Step 2:* Creating DAS or SAN Disk Partitions for Oracle Automatic Storage Management
    In order to use a DAS or SAN disk in Oracle ASM, the disk must have a partition table. Oracle recommends creating exactly one partition for each disk.
    My question: why does Oracle recommend creating exactly one partition for each disk? For a disk to be used on Suse Linux, I normally need to at the least 3 partitions, i.e., boot, swap, and root.
    Scott

    Please read the entire manual - before starting setup and configuration.
    From the very same manual:
    Do not specify multiple partitions on a single physical disk as a disk group device.
    Oracle ASM expects each disk group device to be on a separate physical disk.So why use partitioning? If you need to subdivide a LUN into smaller LUNs and use these instead of the larger LUN. Reasons could range from LUNs bigger than 2TB in size (ASM only support up to 2TB size LUNs), to wanting partition 1's of x size for ASM diskgroup 1 and partition 2's of y size for ASM diskgroup 2.
    If you do partition, take the extra precaution of marking the partition as a non-file system (partition type <i>da</i>) to safeguard against someone (like a sysadmin looking for space) from mounting it as a file system.
    Generally though - I would not partition LUNs for ASM use.

  • Create files from jnlp

    Hello guys, i'm novice in java, thanks for readme.
    I want to create, from a java web start application, a code for create a PDF File, and i want show this pdf file automatically with the client program (ie acrobat reader).
    I've thought in Runtime.getRuntime().exec('acrord32 destfile') for open the pdf file.
    But i have a problem, when i create a pdf file with "itext" i need to save it in disk with "FileOutputStream" (local pc client file), that, i suposse this is impossible en JNLP for security restrictions.
    The question is... it's possible to create a pdf file (or txt) file, from jnlp , and show it in the client's machine automatically, without security problems??
    Thanks a lot!!!
    Edited by: JosepBravo on Jan 8, 2008 7:25 AM

    Do you run Ant? *
    JosepBravo wrote: I want to create, from a java web start application, a code for create a PDF File, ..
    For printing? That seems about all that PDFs are good for. Printing can be done from an entirely sandboxed JWS application. Here is an example..
    <http://www.physci.org/jws/#ps>
    (Or at least, I think it is an example - I have no printer that I can use to test it!)
    JosepBravo wrote: ..and i want show this pdf file automatically with the client program (ie acrobat reader).
    Saving a file can be done even from a completely sandboxed application*, but if that is what you need to do for this task, that will not help much, since we can only deal with a javax.jnlp.FileContents while sandboxed, and to invoke the PDF in the default program, you need a java.io.File (or at least the entire path/name).
    * Here is an example of two things..
    <http://www.physci.org/jws/#fs>
    1) Sandboxed file access.
    2) Using Ant to digitally sign an application, ready for all-permissions access (see the filetest.zip over on the right).
    JosepBravo wrote: I've thought in Runtime.getRuntime().exec('acrord32 destfile') for open the pdf file.
    What minimum Java version are you targeting?
    If it is 1.6+, it would be better to look to the Desktop.open() or Desktop.print() methods.
    JosepBravo wrote: But i have a problem, when i create a pdf file with "itext" i need to save it in disk with "FileOutputStream" (local pc client file), that, i suposse this is impossible en JNLP for security restrictions.
    *The question is...
    My biggest question for you is "what do you want to offer the end user?". Say it like a feature "The ability to print documents displayed in the app", for example.

  • Need to create a Lion install disk

    I am on the side of those who think this is recovery method is absolutely stupid.  I want a USB drive (and I'm not paying $68 for it, since I could buy 10 8GB USB flash drives for that amount of cash, and Lion is supposed to be included for us) with the whole installation disk.  I travel a lot, and although I've only had to use recovery disks once, it was in a place without internet, so I would be up the creek under this new Apple "innovation."
    So, I have a new MBP.  Of course, it came with Lion.  I cannot figure out a way to download Lion to create a Lion installer.  If I go to the App store, it says "installed".  I can't do anything there.  I don't think Apple saved more than $1 in production costs for a Lion DVD installer, so this is truly annoying.
    How can I get the Lion disk image to get the installer onto a flash drive, so that I can save my Mac, just in case?  I know how to creat the installer, but I need Lion.
    And I'm going to head over to the complaint department to register my annoyance at this.  I mean why couldn't they have included a USB flash drive in the brand new box?  I actually looked, believe it or not.

    keg55 wrote:
    Here you go.
    Follow the instructions in this link to download the InstallESD.dmg file for your new MBP so you can create a USB thumb drive installer. I have a Mac Mini mid-2011 and the instructions worked great. The only thing that might not work right is restoring the InstallESD.dmg to your bootable thumb drive. It might get to the end then fail. If this happens, just dblclick the .dmg file to mount it and restore the 'Mac OS X Install ESD' to the thumb drive. I have used mine to reinstall Lion with and without an internet connecton. It works great.
    I think there might be a slightly easier way to do this.  I could start up in the Recovery function, but tell it to install to another drive (not my MBP).  When the Mac reboots, just hold down the option key, and then restart back into my MBP.  Dig through the file on the other drive for the Mac OSX InstallESD.dmg, and move it over to the USB or anything.  Then I can restore Mac Lion without the internet, then use Time Machine to rebuild everything.  Easy.

Maybe you are looking for