File not found exception with Xalan and JRE 1.4.x

Hi everybody.
I'm trying to apply an XSL transformation to a XML file within a Java application.
No problem if I use JRE 1.3, but if I use JRE 1.4.x I've the following exception:
javax.xml.transform.TransformerException: File "C:\testweb.xml" not found.
I can ensure to you guys that the file exists.
Any Idea????? Thanx
Here attached is the code I use:
8<----------------------------------------
TransformerFactory tFactory = TransformerFactory.newInstance();
Transformer transformer = tFactory.newTransformer(new StreamSource(xslFile));
transformer.transform(
new StreamSource(Constants.getMenuPath()),
new StreamResult(
new FileOutputStream(
Settings.getMenusRelativeDirectory() + outputFile)
---------------------------------------->8

OK I got it.
It is necessary to use prefix "file:///" before file name.
Thanx everyway.

Similar Messages

  • File not found exception with SES crawler

    Hi,
    I have integrated oracle SES with UCM 11g.
    when i shedule the crawler i am getting this exception.
    ***Crawler raised the following error for data source "VzUCM" at time Mar 14, 2012 12:35:28***
    EQG-30236: Crawler plug-in fatal error: java.io.FileNotFoundException: /poc11g/idcplg%3FIdcService=SES_CRAWLER_DOWNLOAD_CONTROL&source=SESVzCrawler (No such file or directory)
    I am very sure the issue is with feed location.I am not sure how to append complete URL
    like this:
    http://viesacovn13.ebiz.verizon.com:16202//poc11g/idcplg?IdcService=SES_CRAWLER_DOWNLOAD_CONTROL&source=SESVzCrawler
    Config XML
    <?xml version="1.0" encoding="UTF-8" ?>
    - <rsscrawler xmlns="http://xmlns.oracle.com/search/rsscrawlerconfig">
    - <feedLocation>
    - <![CDATA[ /poc11g/idcplg?IdcService=SES_CRAWLER_DOWNLOAD_CONTROL&source=SESVzCrawler
      ]]>
    </feedLocation>
    - <errorFileLocation>
    - <![CDATA[ /poc11g/idcplg?IdcService=SES_CRAWLER_STATUS&IsJava=1&source=SESVzCrawler&StatusFeed=
      ]]>
    </errorFileLocation>
    <feedType>controlFeed</feedType>
    <sourceName>SESVzCrawler</sourceName>
    <securityType>attributeBased</securityType>
    <securityAttribute name="Account" grant="true" />
    <securityAttribute name="DocSecurityGroup" grant="true" />
    <securityAttribute name="Collab" grant="true" />
    </rsscrawler>
    Thanks,
    Vijay Vadlamudi

    Hi ,
    http://viesacovn13.ebiz.verizon.com:16202//poc11g/idcplg?IdcService=SES_CRAWLER_DOWNLOAD_CONTROL&source=SESVzCrawler
    Here after 16202 there is an extra forward slash ? Is that a typo ?
    Is the Source name SESVzCrawler ?
    Thanks
    Srinath

  • File not found exception....in jboss

    how to access a .properties file in jboss web application....as when running the jsp code from jboss which in turn invokes the java class file which is using the .properties file we get the file not found exception with respect to the properties file though it is not posing any exceptions while executing the java code from the command line..please feel free to provide any useful answers.

    the jsp file has been used to create an object of the
    java file that contains the processing logic...Yes, and given all I know about good application design, this doesn't sound like something a JSP should be doing.
    absolutely fine on command line no hassels....An application server is not a command-line environment. It imposes a huge bunch of restrictions and implications.
    Did you try what I told you?

  • Java File not Found Exceptions and other errors?

    Hello experts, an issue on our Portal has caught my attention. Every time the J2EE Engine is restarted, a large amount of errors are written on our Trace files. When looking at the trace files, I see that most errors are Java IO File not Found Exceptions. For example:
    [EXCEPTION]
    #1#java.io.FileNotFoundException: ./log/system/database.1.log (No such file or directory (errno:2))
         at java.io.FileInputStream.open(Native Method)
         at java.io.FileInputStream.<init>(FileInputStream.java:106)
         at java.io.FileInputStream.<init>(FileInputStream.java:66)
         at com.sap.engine.services.log_configurator.archive.ArchivingThread.archiveTask(ArchivingThread.java:77)
         at com.sap.engine.services.log_configurator.archive.ArchivingThread.run(ArchivingThread.java:40)
         at com.sap.engine.frame.core.thread.Task.run(Task.java:64)
         at com.sap.engine.core.thread.impl5.SingleThread.execute(SingleThread.java:79)
         at com.sap.engine.core.thread.impl5.SingleThread.run(SingleThread.java:150)
    #1.5 #0012799E98F6000F0000001800003A9E00044A5F2B9CCDEC#1207672520886#com.sap.engine.services.log_configurator.archive.ArchivingThread##com.sap.engine.services.log_configurator.archive.ArchivingThread######c3cfd920058911dd8ace0012799e98f6#SAPEngine_System_Thread[impl:5]_24##0#0#Error##Java###./log/system/server.1.log (No such file or directory (errno:2))
    [EXCEPTION]
    #1#java.io.FileNotFoundException: ./log/system/server.1.log (No such file or directory (errno:2))
         at java.io.FileInputStream.open(Native Method)
         at java.io.FileInputStream.<init>(FileInputStream.java:106)
         at java.io.FileInputStream.<init>(FileInputStream.java:66)
         at com.sap.engine.services.log_configurator.archive.ArchivingThread.archiveTask(ArchivingThread.java:77)
         at com.sap.engine.services.log_configurator.archive.ArchivingThread.run(ArchivingThread.java:40)
         at com.sap.engine.frame.core.thread.Task.run(Task.java:64)
         at com.sap.engine.core.thread.impl5.SingleThread.execute(SingleThread.java:79)
         at com.sap.engine.core.thread.impl5.SingleThread.run(SingleThread.java:150)
    #1.5 #0012799E98F6000F0000001900003A9E00044A5F2B9CE7BC#1207672520893#com.sap.engine.services.log_configurator.archive.ArchivingThread##com.sap.engine.services.log_configurator.archive.ArchivingThread######c3cfd920058911dd8ace0012799e98f6#SAPEngine_System_Thread[impl:5]_24##0#0#Error##Java###./log/system/security.1.log (No such file or directory (errno:2))
    [EXCEPTION]
    #1#java.io.FileNotFoundException: ./log/system/security.1.log (No such file or directory (errno:2))
         at java.io.FileInputStream.open(Native Method)
         at java.io.FileInputStream.<init>(FileInputStream.java:106)
         at java.io.FileInputStream.<init>(FileInputStream.java:66)
         at com.sap.engine.services.log_configurator.archive.ArchivingThread.archiveTask(ArchivingThread.java:77)
         at com.sap.engine.services.log_configurator.archive.ArchivingThread.run(ArchivingThread.java:40)
         at com.sap.engine.frame.core.thread.Task.run(Task.java:64)
         at com.sap.engine.core.thread.impl5.SingleThread.execute(SingleThread.java:79)
         at com.sap.engine.core.thread.impl5.SingleThread.run(SingleThread.java:150)
    #1.5 #0012799E98F6000F0000001D00003A9E00044A5F2BE5C172#1207672525667#com.sap.engine.services.log_configurator.archive.ArchivingThread##com.sap.engine.services.log_configurator.archive.ArchivingThread######c3cfd920058911dd8ace0012799e98f6#SAPEngine_System_Thread[impl:5]_24##0#0#Error##Java###./log/applications.1.log (No such file or directory (errno:2))
    [EXCEPTION]
    #1#java.io.FileNotFoundException: ./log/applications.1.log (No such file or directory (errno:2))
         at java.io.FileInputStream.open(Native Method)
         at java.io.FileInputStream.<init>(FileInputStream.java:106)
         at java.io.FileInputStream.<init>(FileInputStream.java:66)
         at com.sap.engine.services.log_configurator.archive.ArchivingThread.archiveTask(ArchivingThread.java:77)
         at com.sap.engine.services.log_configurator.archive.ArchivingThread.run(ArchivingThread.java:40)
         at com.sap.engine.frame.core.thread.Task.run(Task.java:64)
         at com.sap.engine.core.thread.impl5.SingleThread.execute(SingleThread.java:79)
         at com.sap.engine.core.thread.impl5.SingleThread.run(SingleThread.java:150)
    In summary, the system cannot find the files server.1.log, security.1.log, database.1.log and applications.1.log. I tried manually adding these files (I created them on my computer and left them empty) on the path written, but it did not work, for some reason they are deleted.
    Another error that is happening during restart of the engine is the following:
    #1.5 #0012799E98F6001B0000002000003A9E00044A5F2BCC28D7#1207672523990#com.sap.tc.logging##com.sap.tc.logging.APILogger.FileLog[setFormatter()]######c3c3f240058911dd9ed80012799e98f6#SAPEngine_System_Thread[impl:5]_10##0#0#Warning##Java###Attempting to change a formatter on active log ./log/system/httpaccess/responses.trc. reset() method must be called first.#1#java.lang.Exception: Attempting to change a formatter on active log ./log/system/httpaccess/responses.trc. reset() method must be called first.
         at com.sap.tc.logging.FileLog.setFormatter(FileLog.java:448)
         at com.sap.engine.services.log_configurator.admin.LogConfigurator.adjustConfiguration(LogConfigurator.java:795)
         at com.sap.engine.services.log_configurator.admin.LogConfigurator.applyConfiguration(LogConfigurator.java:1535)
         at com.sap.engine.services.log_configurator.LogConfiguratorContainer.prepareStart(LogConfiguratorContainer.java:545)
         at com.sap.engine.services.deploy.server.application.StartTransaction.prepareCommon(StartTransaction.java:223)
         at com.sap.engine.services.deploy.server.application.StartTransaction.prepareLocal(StartTransaction.java:176)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesLocal(ApplicationTransaction.java:365)
         at com.sap.engine.services.deploy.server.application.ParallelAdapter.runInTheSameThread(ParallelAdapter.java:132)
         at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesLocalAndWait(ParallelAdapter.java:250)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationLocalAndWait(DeployServiceImpl.java:4450)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationsInitially(DeployServiceImpl.java:2610)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.clusterElementReady(DeployServiceImpl.java:2464)
         at com.sap.engine.services.deploy.server.ClusterServicesAdapter.containerStarted(ClusterServicesAdapter.java:42)
         at com.sap.engine.core.service630.container.ContainerEventListenerWrapper.processEvent(ContainerEventListenerWrapper.java:144)
         at com.sap.engine.core.service630.container.AdminContainerEventListenerWrapper.processEvent(AdminContainerEventListenerWrapper.java:19)
         at com.sap.engine.core.service630.container.ContainerEventListenerWrapper.run(ContainerEventListenerWrapper.java:102)
         at com.sap.engine.frame.core.thread.Task.run(Task.java:64)
         at com.sap.engine.core.thread.impl5.SingleThread.execute(SingleThread.java:79)
         at com.sap.engine.core.thread.impl5.SingleThread.run(SingleThread.java:150)
    Any ideas?

    Nothing really seemed to work when trying to solve this problem, just suddenly it stopped appearing. It might have been our installation of SPS 15, since it was around that time that the error went away.

  • Javax.servlet.Filter, throw file not found exception

    I want to use a url which is not exists to let the filter run.
    In the method doFIlter(), if the URL is this one, I will return and do not run chain.doFilter
    Why throw FIle not found exception? Will the fileter check the url whether exist or not?

    I use the URL to let the filter run, but do not want to go to the URL.What should happen if someone requests the URL from the server ?
    Nothing is not possible.
    One possibilty is to send the HTTP Response Code 204 - No Content
    The server has fulfilled the request but does not need to return an entity-body, and might want to return updated metainformation. The response MAY include new or updated metainformation in the form of entity-headers, which if present SHOULD be associated with the requested variant.
    If the client is a user agent, it SHOULD NOT change its document view from that which caused the request to be sent. This response is primarily intended to allow input for actions to take place without causing a change to the user agent's active document view, although any new or updated metainformation SHOULD be applied to the document currently in the user agent's active view.
    The 204 response MUST NOT include a message-body, and thus is always terminated by the first empty line after the header fields.
    (RFC 2616 Fielding, et al.)

  • "FILE NOT FOUND" KEEPS POPPING UP AND THE MP3 FILE IS MISSING?

    I PULLED AN MP3 FILE FROM MY ITUNES LIBRARY THAT RUNS OFF MY EXTERNAL HARDDRIVE INTO A SESSION AND CHOPPED IT UP AND EVERYTHING WAS FINE! THEN I DRAGGED MY FILES OVER TO MY EXTERNAL HARDDRIVES TO FREE UP SPACE BUT DRUG THAT PARTICULAR PROJECT FOLDER BACK TO MY MACBOOK PRO AND WHEN I OPENED THE SESSION THE FILE NOT FOUND ERROR POPPED UP AND THE MP3 IS NOT IN PLAYBACK SESSION? THE PARTS I CUT UP ARE NOW GREY AND THE AUDIO BIN SHOWS THE NAME OF FILE BUT WITH AN ! AT THE END AND WILL NOT PLAY?????? WHAT DO I DO???? THE AUDIO FILE FOLDER FOR THAT PROJECT SHOWS THE MP3 FILE???

    Please don't 'shout'. People really don't like it.

  • CTIOS 8.5(2) Agent Desktop fails to start - file not found exception

    I can run the CTIOS 8.0(1) Agent Desktop OK against my 8.5(2) system, but when I install 8.5(2) SR on the client machine (running XP SP3), the app will not start. (Actually trace shows it starts a little bit but debugging doesn't point out the problem).
    It pops up a Windows Message wanting to send a report to Microsoft (yeah, we know where that goes) and I can see it say something about a file not found exception.
    I uninstall CTIOS 8.5(2) and it works perfectly.
    Makes you wonder how this passed QC testing. I have tried on two different machines.
    Anyone have the workaround that establishes the file it's looking for?
    Regards,
    Geoff

    I still have my TAC case open but I also have a workaround that seems to work.  As Chad described above he had a machine that the 8.5.2 upgrade originally did not launch on but then magically started working on.  I also came across that case. Once I had one working machine I could upgrade it and downgrade successfully without issues.   Seeing that the 8.5.2 installer examines the system to be upgraded I figured it's checking the registry and/or the installation files. I then did the following:
    Working system
    1) Downgrade working 8.5.2 system to 8.0.1
    2) Export the Cisco Systems Inc key from this 8.0.1 system
    3) Copy the CTIOS Client and CTIOS Silent Monitor directories for the 8.0.1 system
    Non working System
    4) Stop the CTIOS Silent Monitor system
    5) Delete the Cisco System Inc key from the reg
    6) Import the Cisco Systems Inc key from the working system
    7) delete the existing CTIOS Client and CTIOS Silent Monitor directories
    8) Copy in the CTIOS Client and CTIOS Silent Monitor directories from the working system
    9) Run the 8.5.2 installer
    Reboot - and run the agent/supervisor desktop
    I did this on several test machines and it worked every time.  I have upgraded about 5-6 supervisors and they all say it's working fine as well.
    Carlos

  • Problems with cached previews and File Not Found errors in preview and build

    I am having serious issues with Encore CS5.
    When I try and build a preview or disk/image I am getting File Not Found errors. I have emptied the media cache in the preferences but my project still seems to be referencing previously cached files or rendered menus. Is there any way to manually delete previous previews or the cache. I know that there are no missing files in my project. Any help would be very much appreciated.
    I am running Mac OS 10.6.4 and Encore 5.0

    To fix your locales, see http://wiki.archlinux.org/index.php/Configuring_locales -- in specific, you'll need to uncomment the en_US.utf8 locale at least, since that's the one that's specified in your rc.conf

  • Why i get servlet exception/login servlet not found exception  with .ear ?

    I am able to deploy my war and after that generating the ear from that. both works fine in local system.
    But when i run (Jboss as service[Java Service Wrapper]) it takes war without any problem.But with ear file i am getting servlet not found exception.I can't understand where this problem is coming from.
    Even if i take my JSPWIki ear which is running well in production server, this also gives same error.
    One more thing, the files, what i am running well in local system i.e. war and ear working fine. (can't test in production server so testing in same kind of testing server) there also getting login servlet not found exception. Even in same location other files which are deployed are working fine.out of 4 at least one is working fine.
    I don't undersatnd where this whole problem is .
    Please guiide me where sholud i concentrate to solve this problem.
    thnaks
    Vijendra

    I took the source code including the dll files already added to the project from here:
    spazzarama/Direct3DHook
    The solution include two projects the one name Capture is class library type and the dll that make the exception is in this project.
    I tried now to use the program Dependency Walker on this dll file and it found error/s:
    This is the log:
    Error: At least one required implicit or forwarded dependency was not found.
    Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
    Error: Modules with different CPU types were found.
    Warning: At least one delay-load dependency module was not found.
    Screenshot:
    It happen only when using/detecting Direct3D 11 . So far only in Direct3D 11, When i use it with a game that run Direct3D 9 it's working fine.
    The question is how can i solve this dll problem ? Any site/place to download this dll from ?

  • File Not Found bug with long audio file names?

    Hello -
    Crazy problem. I'll probably post way too much information, but I want to make sure I cover everything. Help!
    We run Logic Studio/Logic 8 on multiple 10.4.10/11 computers - G5 Power PC, new intel iMac, intel mini, G4 laptops. We are working on an audio post job using very messy OMFs that were prepared in Final Cut. We had problems opening them in Logic, so we opened the OMFs in Soundtrack Pro, exported to AAFs, and opened those in Logic.
    The sessions look fine in Logic now (all files relinked), and the session is consolidated - ie, all files are local/in the project folder's Audio Files folder. I see this in the Audio Bin and can confirm in the finder.
    Here's the problem. With the sessions closed:
    (A) I renamed the project folder by adding an asterix to the front of the folder name, and changed the color label of the folder in the finder in order to mark it as the original folder.
    (B) I made a copy of the whole folder (session files & audio files) in order to have something to work from and not mess up the original. When I opened up the session in the new folder, it immediately said audio file not found, do you want to search, locate, or skip. It couldn't find the file in a search, and obviously when you skip, then skip, then skip all, it opens the session with the data (regions are there but grayed) - so all the audio files are orphaned.
    So when I try to locate the file, here's what happens. . . The audio file names are really horrendously long (must be some artifact of working in Final Cut). We're talking: "1087-001A SERG AIRPORT WAITING * 1-1channel_00044D02AA9- 363A-4CC5-A86B-0741023DB062.aif" - one bazillion characters.
    So the audio file locate dialog box truncates the name of the file that's missing by using the first 20 characters or so, and then a "#" character, and then some random string of 3-6 characters that is not at all related to the file name. So who knows which of the 4-30 SERG AIRPORT files is supposed to go there!
    Obviously if this were a 2 minute session file of 10 files or something, we could figure it out and relink everything, but we're talking about a feature-length session with a bazillion files.
    (C) Okay, so I tried to open the original session, in the folder that I had renamed by prefacing the original name with an * and changing the color of the folder. But I started to get the file not found errors. OH GEEZ. So I didn't save. I re-renamed the folder by taking out the * and changing the color label back. Then I tried to open the session again, but I still kept getting the file not found problem.
    I have to stress that I didn't move any of the audio files, or change ANYTHING in the session.
    So I thought - is all of this because I tried to open a new instance of the session, in a new instance of the folder? Is it because I renamed the folders? Normally you can rename folders, even session names, no problems, and Logic corrects the paths to the audio files!
    (D) So, crap. I reopened the original AAF file in logic and saved it in a new place. I closed the file, reopened it, closed, reopened, just to make sure everything was working! I checked the location of the files in the audio bin, and everything was great.
    (E) So now I copied the folders to an external hard drive to be able to work on another computer. But when I tried to open the sessions on a new computer. . . You guessed it, nada.
    So. . . the questions are:
    (1) Those original sessions that now will not work - is there anything I can do to recover their functionality? We had work in there that I would prefer not to lose. . .
    (2) Is this a known bug having to do with the length of the Audio File names?
    (3) How do we get over this? My only idea so far is we could select all in a working logic session and say "Audio Tracks names to regions" or something and will that change the actual file names on teh computer? Then hopefully things would work on mulitple systems. . .
    Okay. HELP! Thanks!
    Polly

    OK I got it.
    It is necessary to use prefix "file:///" before file name.
    Thanx everyway.

  • Getting a file not found error with jam pack instruments

    Since Logic Express no longer works with the current Mac OS X versions, I'm trying to get used to using GarageBand again while I save up to buy the full Logic Package.  I had purchased all of the jam packs years ago and recently also purchased Main Stage.  Now, when I go to use, for example, an instrument from the Orchestral jam pack, I get a message saying "EXS24 instrument “Cellos.exs”: Audio file “VC-L_legato_f_C2.wav” not found!" with the option to continue or search again.  Clicking "search again" always ends up with the same message.  This is driving me nuts!  Pretty ****** off right now that I can't use what I paid money for.  Isn't this stuff supposed to "just work"?  Or did that die with Steve Jobs?

    same Problem: Working with OS X 10.6.8 on a MacBookPro Santa Rosa and Logic Pro: Its not possible to use the cello.exs 'cos missing audio file “VC-L_legato_f_C2.wav”, same problem with Basses.exs (missing KB-L_legato_f_A#1.wav) and the  Piano. All this broken Instruments are from the Jam pack Orchestra Library.

  • File Not Found Error with FlashHelp

    When I deploy and launch my FlashHelp project I get a "Not
    Found The requested resource was not found." error in the topic
    pane. I'm also not able to reference any of the topics from the TOC
    and get the same error.
    I just upgraded to RoboHelp v6 and all of this worked fine
    when the project was generated using the previous version of
    RoboHelp (5).
    Does anyone know what changed that might be causing the
    problem?

    Hello,
    I am having a similar problem. Did you find a solution?
    Thank you,
    Melissa
    "arunak" <[email protected]> wrote:
    >
    Hi Pratim,
    I am also facing the same problem. can u please let me know whenever
    u get the
    solution for this.
    Regards,
    Arunak
    Pratim <[email protected]> wrote:
    Hi,
    I'm writing a web service on weblogic 8.1 with weblogic workshop.Ihave
    to use log4j-1.2.7 supplied by client with my application.I cannot write
    ant script manually.Also I cannot change server start script or cannot
    put any command line argument when the server starts.
    Now I require this logger in my EJB.I have kept log4j.properties inthe
    same path where my EJB's are.But the final ear produced does not contain
    this log4j.properties and subsequently I get the error "log4j:ERROR
    Could not read configuration file [log4j.properties]."
    Please help me to resolve this problem so that log4j.properties goes
    with the final .ear file and the ejb code finds the logger.
    thanks,
    pratim

  • File not found error with log4j.properties

    Hi,
    I'm writing a web service on weblogic 8.1 with weblogic workshop.I have to use log4j-1.2.7 supplied by client with my application.I cannot write ant script manually.Also I cannot change server start script or cannot put any command line argument when the server starts.
    Now I require this logger in my EJB.I have kept log4j.properties in the same path where my EJB's are.But the final ear produced does not contain this log4j.properties and subsequently I get the error "log4j:ERROR Could not read configuration file [log4j.properties]."
    Please help me to resolve this problem so that log4j.properties goes with the final .ear file and the ejb code finds the logger.
    thanks,
    pratim

    Hello,
    I am having a similar problem. Did you find a solution?
    Thank you,
    Melissa
    "arunak" <[email protected]> wrote:
    >
    Hi Pratim,
    I am also facing the same problem. can u please let me know whenever
    u get the
    solution for this.
    Regards,
    Arunak
    Pratim <[email protected]> wrote:
    Hi,
    I'm writing a web service on weblogic 8.1 with weblogic workshop.Ihave
    to use log4j-1.2.7 supplied by client with my application.I cannot write
    ant script manually.Also I cannot change server start script or cannot
    put any command line argument when the server starts.
    Now I require this logger in my EJB.I have kept log4j.properties inthe
    same path where my EJB's are.But the final ear produced does not contain
    this log4j.properties and subsequently I get the error "log4j:ERROR
    Could not read configuration file [log4j.properties]."
    Please help me to resolve this problem so that log4j.properties goes
    with the final .ear file and the ejb code finds the logger.
    thanks,
    pratim

  • File not found Exception when zipping a file

    Hello I seem to have run into a problem when trying to zip a directory.
    I get the error:
    java.io.FileNotFoundException: C:\Users\dojo\Documents\Programming\compress (Access is denied)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
    at ZipUtility.zip(ZipUtility.java:31)
    at ZipUtility.main(ZipUtility.java:21)
    when i run the code
    import java.io.File;
    import java.io.FileOutputStream;
    import java.util.zip.ZipEntry;
    import java.util.zip.ZipOutputStream;
    import java.io.*;
    public class ZipUtility {
         public ZipOutputStream cpZipOutputStream = null;
         public String strSource = "";          
         public String strTarget = "";          
         public static long  size          = 0;     
         public static int   numOfFiles    = 0;          
         public static void main(String args[]) {
              ZipUtility udZipUtility = new ZipUtility();                    
              udZipUtility.strSource = "C:\\Users\\dojo\\Documents\\Programming\\compress\\restoreDump"; //args[0];          
              udZipUtility.strTarget = "C:\\Users\\dojo\\Documents\\Programming\\compress"; //args[1];          
              udZipUtility.zip();          
         public void zip(){                    
              try          {                              
                   File cpFile = new File (strSource);                                             
                   if (!cpFile.isFile() && !cpFile.isDirectory() ) {                                   
                        System.out.println("\nSource file/directory Not Found!");                                   
                        return;                         
                   FileOutputStream fos = new FileOutputStream(strTarget);               
                   cpZipOutputStream = new ZipOutputStream(fos);                         
                   cpZipOutputStream.setLevel(9);                         
                   zipFiles( cpFile);                         
                   cpZipOutputStream.finish();                         
                   cpZipOutputStream.close();                         
                   System.out.println("\n Finished creating zip file " + strTarget + " from source " + strSource);                         
                   System.out.println("\n Total of  " + numOfFiles +" files are Zipped " );               
                   System.out.println("\n Total of  " + size  + " bytes are Zipped  ");          
              }     catch (Exception e){                                   
                   e.printStackTrace();                    
         public void  zipFiles(File cpFile) {                    
              int byteCount;
              final int DATA_BLOCK_SIZE = 2048;     
              FileInputStream cpFileInputStream;
              if (cpFile.isDirectory()) {                              
                   if(cpFile.getName().equalsIgnoreCase(".metadata")){ //if directory name is .metadata, skip it.                         
                        return;               
                   File [] fList = cpFile.listFiles() ;                              
                   for (int i=0; i< fList.length; i++){                                        
                        zipFiles(fList) ;                              
              else {                              
                   try {          
                        if(cpFile.getAbsolutePath().equalsIgnoreCase(strTarget)){
                             return;
                        System.out.println("Zipping "+cpFile);                    
                        size += cpFile.length();                    
                        //String strAbsPath = cpFile.getAbsolutePath();                                        
                        numOfFiles++;                    
                        String strAbsPath = cpFile.getPath();                    
                        String strZipEntryName = strAbsPath.substring(strSource.length()+1, strAbsPath.length());                                        
                        //byte[] b = new byte[ (int)(cpFile.length()) ];
                        cpFileInputStream = new FileInputStream (cpFile) ;                                                                           
                        ZipEntry cpZipEntry = new ZipEntry(strZipEntryName);
                        cpZipOutputStream.putNextEntry(cpZipEntry );
                        byte[] b = new byte[DATA_BLOCK_SIZE];
                        while ( (byteCount = cpFileInputStream.read(b, 0, DATA_BLOCK_SIZE)) != -1)
                             cpZipOutputStream.write(b, 0, byteCount);
                        //cpZipOutputStream.write(b, 0, (int)cpFile.length());
                        cpZipOutputStream.closeEntry() ;
                   } catch (Exception e) {                                        
                        e.printStackTrace();                              
    I really have no idea why its saying access denied if anyone can help that would be great.

    son_goku
    Read the stack trace from the bottom up. It's telling you that the error, or exception arose
    at ZipUtility.zip(ZipUtility.java:21)
    which is udZipUtility.zip();This line called the zip() method which threw an exception
    at ZipUtility.main(ZipUtility.java:31)
    which is FileOutputStream fos = new FileOutputStream(strTarget);What is the value of strTarget?"C:\\Users\\dojo\\Documents\\Programming\\compress"This is a folder, isn't it?
    Read the javadoc for public FileOutputStream(String name)
           throws FileNotFoundException
    If the file exists but is a directory rather than a regular file, does not exist but cannot be created, or cannot be opened for any other reason then a FileNotFoundException is thrown.
    Regards, Darryl

  • OIM 11g File not found exception

    Hi,
    I am getting following exception:
    Caused By: java.io.FileNotFoundException: file:/opt/oracle/apps/oim11g/MWHOME/Oracle_IDM1/server/apps/oim.ear/admin.war/WEB-INF/lib/OESOIMTaskFlows.jar!/taskflows/policycreate/DataConstraints.jsff
         at oracle.ide.net.JarIndex.getLOC(JarIndex.java:1191)
         at oracle.ide.net.JarIndex.access$1000(JarIndex.java:58)
         at oracle.ide.net.JarIndex$12.run(JarIndex.java:575)
         at oracle.ide.net.JarIndex$12.run(JarIndex.java:571)
    Can anyone help me in fixing the issue?

    I found a solution to this issue. The problem is with java.net.Socketexceptions happening on the servers. To resolve that you need to increase the ulimit for files.
    Edit - /etc/security/limits.conf and the following for your user (mine was oracle)
    oracle soft nofile 4096
    oracle hard nofile 10240
    Log off and log back in.
    Start your serves and the exception should not happen again.

Maybe you are looking for

  • Error while activating data loaded into DataStore Object in BI 7.0

    Hi Guys, I am facing the following problem : When I load data into a Datastore Object, all the records get loaded but the job fails during activation of the data. Below is the job log : Activation is running: Data target 0RPM_DS07, from 77 to 77 Over

  • Using libraries vs. Bridge for graphics in placeholder frames

    Hi, I do not understand the advantanges of using libraries vs. Bridge for my purpose: Purpose: I am working with templates using graphic placeholder frames. The frames are anchored in table cells and have object styles applied defining e.g. the place

  • Ipod formerly connected to PC won't mount on new G4

    I had a PC that crashed with no backup (yes, I realize how stupid that is now) and lots of music on itunes that was synched with my 20GB click wheel ipod. I recently bought a G4 and it won't recognize my ipod. I'd prefer not to have to do a restore b

  • Rsa provider not found

    Hello, i have the following problem. Our product is a workflow enterprise solution. We use a licence file, which is rsa encrypted. I wrote for this a class that does the encryption. It works fine, when called directly (inside eclipse), but i also nee

  • Safari could not download the file -there is not enough free disk space

    I've tried downloading Windows Media Viewer, StuffIt Expander, and Adobe Reader however when I do I receive an error message as follows (example is for the StuffIt Expander -similar message for the other programs): Safari could not download the file