Does Portal register file deletions?

Hi Everybody,
I need to know if Portal saves any kind of history about KM documents.
If some user deletes a file, does Portal saves who and when did it?
I'm not talking about versions, what I need is some kind of log i.e. in the database.
Thanks in advance,
Fede

You may see it exaclty using SVN client. The bw_r_irf_fpga1.v is all new, as is the underlying regfile_1w_4r.v. At last, execution unit, rml and cwp are modified (current cwp is wired from rml to bw_r_irf_fpga1).

Similar Messages

  • PDF does not remain in the Registered file types list

    I've installed Adobe Reader X. The PDF file type was not automatically associated with Adobe Reader. So, I went through the standard process of adding it to the Windows Registered file types. It does not remain in the list. I've checked the box to "Always use the selected program.....", but when I reopen the Registered File types window, PDF is not there. PDFX is there and registered to open with Adobe Reader, but not PDF.

    I forgot to mention, I'm running Windows XP SP3.

  • How long does it take to delete all the files in a lost MacBook Pro?

    How long does it take to delete all the files in a lost MacBook Pro?

    Quite a while since there may be 1/2 million files or more to delete. There is only one quick way, and that is to reformat the drive.

  • What does 'include render files' option mean for when I duplicate a project. I deselected it and the duplicated file is very slow so maybe this has affected it. It's a shame cause original project is deleted. Have I lost the rendered files? Thanks

    What does 'include render files' option mean for when I duplicate a project. I deselected it and the duplicated file is very slow so maybe this has affected it. It's a shame cause original project is deleted. Have I lost the rendered files? Thanks

    Yes, if you duplicate without the render files and delete the original project you lose the render files. But render files get recreated - automatically if you have it set in the preferences (which is the default option). It just takes time.

  • Diadem Does not save data to neither portal nor file

    I tried to acquire data from DAQ USB-6289 and save data to portal or file in DIADem DAC, but failed to get any data in portal, and no file was created, and no error was promptEd. But when I open a example file with saving function, it works fine. I'm sure there isn't any problem about the script since it is a very simple one. Do you have any suggestions?
    Thanks a lot.
    Jing

    Hi Jing -
    Since you said you're building your scheme based off of an example, I'm going to assume you've already included a Save Data or Save Data with Trigger block in your DAC scheme.  This is mandatory if you want to use Data Storage with either of the two following techniques.
    If you're running your DAC scheme programmatically, are you using the SchemeMeasTest() command, or the SchemeMeasStart() command?  If you want your DAC scheme to be run with Data Storage (Data Portal or File) enabled, you'll need to use the SchemeMeasStart() command.  The other command merely runs the scheme with visualization only (as a test).
    If you're running your DAC scheme interactively, are you pressing the Start Display button or the Start Measurement button (see below)?  These two buttons are the interactive versions of the aforementioned programmatic commands.  If you want to test your visualization without Data Storage, use the Start Display button.  If you want data to be saved to either the Data Portal or File, use the Start Measurement button.  
    Let me know if this still doesn't help.
    Derrick S.
    Product Manager
    NI DIAdem
    National Instruments

  • File.delete() and File.deleteOnExit() doesn't work consistently..

    I am seeing some odd behavior with trying to delete files that were opened. Usually just doing new File("file.txt").delete() would work. However, in this case, I have created an input stream to the file, read it in, saved it to another location (copied it), and now I am trying to delete it.
    The odd thing is, in my simple application, the user can work with one file at a time, but I move "processed" files to a lower pane in a swing app. When they exit it, it then archives all the files in that lower pane. Usually every file but the last one opened deletes. However, I have seen odd behavior where by some files don't delete, sometimes all of them wont delete. I tried the deleteOnExit() call which to me should be done by the JVM after it has released all objects such that they don't matter and the JVM ignores any object refs and directly makes a call (through JNI perhaps) to the underlying OS to delete the file. This doesn't work either.
    I am at a loss as to why sometimes some files delete, and other times they don't. In my processing code, I always close the input stream and set its variable to null. So I am not sure how it is possible a reference could still be held to the object representing the file on disk.

    and then, in the other class
      public int cdplayerINIToMMCD(File aDatabase, String thePassword) throws IllegalArgumentException {
         /*---------DATA---------*/
         String dbLogin, dbPassword;
         JFileChooser fc;
         INIFileFilter ff;
         int dialogReturnVal;
         String nameChosen;
         File INIFile;
         ProgressMonitor progressMonitor;
         BufferedReader inFileStream;
         String oneLine;
         int totalLines = 0;
         int linesParsed = 0;
         boolean openDBResult;
         int hasPassword;
         if ((aDatabase == null) || (!aDatabase.exists()) ||
            (FileManagement.verifyMMCD(aDatabase) == FileManagement.VERIFY_FAILED)) {
            throw new IllegalArgumentException();       
         else { 
            currentDB = aDatabase;
            if(thePassword == null) {
              dbPassword = "";
            else { dbPassword = thePassword; }
            dbLogin = dbPassword; //For MSAccess dbLogin == dbPassword
         //Ask the user for the cdplayer.ini file.
         //Create a file chooser
         if (System.getProperty("os.name").indexOf("Windows") > -1) {
            fc = new JFileChooser("C:\\Windows");
         else {
            fc = new JFileChooser();     
         fc.setMultiSelectionEnabled(false);
         fc.setDragEnabled(false);
         //Create a new FileFilter
         ff = new INIFileFilter();
         //Add this filter to our File chooser.
         fc.addChoosableFileFilter(ff);
         fc.setFileFilter(ff);
         //Ask the user to locate it.
         do {
            dialogReturnVal = fc.showOpenDialog(mainFrame);
            if (dialogReturnVal == JFileChooser.APPROVE_OPTION) {
               nameChosen = fc.getSelectedFile().getAbsolutePath();
               if(nameChosen.toLowerCase().endsWith(INIFileFilter.FILE_TYPE)) { INIFile=new File(nameChosen); }
               else { INIFile = new File(nameChosen+INIFileFilter.FILE_TYPE); }
               if (!INIFile.exists()) {
                  continue; //If the name specified does not exist, ask again.
               else { break; }
            else { //User clicked cancel in the open dialog.
               //Ignore what we've done so far.
               return(IMPORT_ABORTED);
         } while(true); //Keep asking until cancelled or a valid file is specified.
         //Determine how many lines will be parsed.
         try {
           //Open the INI for counting
           inFileStream = new BufferedReader(new InputStreamReader(new FileInputStream(INIFile)));
           while ((inFileStream.readLine()) != null) {
               totalLines++;
           //Close the INI file.
           inFileStream.close();
         } catch (IOException ex) { return(IMPORT_FAILED); }
         //Make a progress monitor that will show progress while importing.
         progressMonitor = new ProgressMonitor(mainFrame, "Importing file","", 0, totalLines);
         progressMonitor.setProgress(0);
         progressMonitor.setMillisToPopup(100);
         progressMonitor.setMillisToDecideToPopup(1);
         //Make our DatabaseHandler to insert results to the database.
         dbh = new DatabaseHandler();
         //Open the database connection.
         do {
           try {
              openDBResult = dbh.openDBConnection(currentDB, dbLogin, dbPassword);
           } catch(JDBCException ex) { return(IMPORT_JDBC_ERROR); } //OUCH! can't write anything.
             catch(SQLException ex) {
                 openDBResult = DatabaseHandler.OPNCN_FAILED;
                 //Can not open the database. Is it password protected?
                 hasPassword = JOptionPane.showConfirmDialog(mainFrame, "Could not open the database. "+
                                                "The password is wrong or you have not specified it.\n"+
                           "Do you want to enter one now?", "New password?", JOptionPane.YES_NO_OPTION);
                if (hasPassword == MMCDCatalog.DLG_OPTN_YES) {
                   dbPassword = JOptionPane.showInputDialog(mainFrame, "Please enter your "+
                                                              "password for the DataBase:");
                    dbLogin = dbPassword; //For MSAccess, login == password                                                    
                //If the password wasn't the problem, then we can't help it.
                else { return(IMPORT_FAILED); }
         } while(openDBResult != DatabaseHandler.OPNCN_OK); //If it is OK, no exception thrown.
         //Import the ini file
         try {
            //Open the INI file for parsing.
            inFileStream = new BufferedReader(new InputStreamReader(new FileInputStream(INIFile)));
            //Read and parse the INI file. Save entries once parsed.
            while ((oneLine = inFileStream.readLine()) != null) {
               parseLine(oneLine);
               linesParsed++;
               progressMonitor.setNote("Entries imported so far: "+entriesImported);
               progressMonitor.setProgress(linesParsed);
               if ((progressMonitor.isCanceled()) || (linesParsed == progressMonitor.getMaximum())) {
                  progressMonitor.close();
                  break;
            //Close the INI file.
            inFileStream.close();
         } catch (IOException ex) {
              //Make absolutely sure the progressMonitor has disappeared
                progressMonitor.close();
                if (dbh.closeDBConnection() != DatabaseHandler.CLSCN_OK) {
                 JOptionPane.showMessageDialog(mainFrame, "Error while reading the INI file.\n"+
                    "Error while attempting to close the database", "Error", JOptionPane.INFORMATION_MESSAGE);
              else {
                 JOptionPane.showMessageDialog(mainFrame, "Error while reading the INI file.",
                                                    "Error", JOptionPane.INFORMATION_MESSAGE);     
                return(IMPORT_FAILED);
         //Make absolutely sure the progressMonitor has disappeared
         progressMonitor.close();
         //Close the database connection
         if (dbh.closeDBConnection() != DatabaseHandler.CLSCN_OK) {
            JOptionPane.showMessageDialog(mainFrame, "Error while closing the database after import.",
                                          "Error", JOptionPane.INFORMATION_MESSAGE);
         //Did the user cancel?
         if (totalLines != linesParsed) {
            return(IMPORT_ABORTED);     
         //Success!
         //Everything ok. Return the number of entries imported.
         return(entriesImported);
      }

  • What does the open file dialog do 'under the hood' and is there a way to simulate it

    What does the open file dialog do 'under the hood' and is there a way to simulate it?
    I have a bug in my code (that I've posted about before, here) which I can't fix at the moment, but I do have a workaround.
    Briefly, the bug:
    I call a dll from a function node, to initialise and run a spectrometer. If I start up the PC, LabVIEW and run my vi the code runs without complaint, the first call to the dll to initialise the spectrometer doesn;t return an error but the spectrometer is not detected either.
    I've tried various solutions, see the link above, and none work
    The workaround:
    If, at any time before running the code containing the function node I open an 'open file' dialog window, select the dll and click ok/hit enter then everything is fine. When I run the main code the spectrometer is detected.
    I use an express vi to open the file dialog, I specify the start path and file name as constant inputs and just click ok/hit return when the dialog pops up. I don't do anything with the dialog outputs. In fact the vi that contains the open file dialog can be run before the project containing the bug is even open.
    I have to do this everytime I turn the PC on.
    So, either
    1) Can somewone suggest a fix for the original bug?
    2) What is the easiest way to simulate the enter keypress when the open file dialog pops up
    or
    3) Can someone tell me what the open file dialog does under the hood that somehow causes the dll to work and can it be simulated in straight LabVIEW
    I suspect that the dll itself is dodgy ( I have in the past talked to the supplier but not got very far, and I will try again but I would like a quick, temporary solution too). I'm guessing that the file dialog is making some kind of check on the file, and possibly registering its presence with the OS (winXP). I tried using the file/folder exists vi to see if checking the file like that worked but no luck.
    Any help greatly appreciated.
    Dave

    Hi David
    I am very conscious about thread hijacking but this sounded like my issue so I hope you dont mind me asking about your issue. I am hoping that you have a spectrometer from the same vendor as me and its not just me seeing an Error 1097 issue. My spectrometer is from a company called Stellarnet.
    So far I have unable to get it to work with other VIs. There is one condition where I can get it to work but its no good for me.
    Case 1
    I open the VI in a fresh labview environment with no other VIs in memory. The code runs with no issue.
    Case 2
    Labview is not opened. I double click the spectrometer VI in windows explorer.  The VI opens but it fails to run resulting in Error 1097. Personally, I dont see the difference between this and Case 1 above and yet it fails.
    Case 3
    If I already have other VI's in memory and try to load the spectrometer VI and run it fails with Error 1097. This case is the one that most important to me. I have a test executive that will load test VIs dynamically and I can't get this to work. Same problem Error 1097.
    I wanted to share what I have seen with you and to let you know that maybe somebody else has the same issue. I am convinced its the DLL but the vendor dis-agreed saying it was LabVIEW. I couldn't convince him otherwise.
    Thanks in advance
    David

  • How long does it take to delete an old user/administrator from my MacBook Pro?  Hours/Days?

    I just bought a new 2011 MacBook Pro and I want to give my late 2006 MacBook Pro to my niece for college.  It's in near-perfect condition.
    I'm trying to delete all of my user info and files.  I went ahead and created an account for her as an "administrator".  Then, I logged off from my account, logged in as her and then tried to delete my old account under System Settings / Accounts.
    I got as far as to remove the user account and to delete the home folder for my old user account.  Now it says "Deleting account..." under my user name.  It's been this way for about 6 hours.
    I have no way of knowing how long it takes, but does anyone know if it takes hours?  A full day?  With no status bar to indicate the deletion process, I have no way of knowing if my old computer is "stuck" or if it's actually working.  I have yet to try and stop the process for fear of screwing something up.  But if anyone has any idea how long this might take, I'd appreciate it so I can move on and do other things while this computer just "does its thing".
    Thanks!
    -CSI

    Cool.  Thanks for the response back.
    The late 2006 is running on OS X Lion (10.7). 
    As for the "Activity Monitor", where would I find that?  I tried to search for it...but nothing popped up.
    I did, however, "get info" on the hard drive icon and noticed that the available disc space has gotten bigger, which would indicate to me that there have been some program and file deletions during the course of the day.  In fact, when I started the process, there was only about 50Gb of disc space available.  But, it seems like that number has doubled, which indicates to me the disc space is slowly freeing up. 
    Again, it would be nice to some how know how long it would take.  Maybe this "activity monitor" is something I can find and see.
    -Chris

  • Error coming while deploying portal EAR file into the weblogic Portal 8.1..

    HI Guys,
    When I deploy the latest PORTAL EAR file into the BEA portal environment we
    receive a number of these errors:
    ####<Feb 27, 2008 4:36:14 PM PST> <Warning> <netuix> <dev147> <portalName>
    <ExecuteThread: '0' for queue: 'weblogic.kernel.System'> <<WLS Kernel>>
    <BEA-423171> <
    java.lang.Throwable: New portlet file
    [portlet/portletname.portlet] and existing portlet
    file null have the same definition label
    Lebel Name. Will not create a definition for
    portlet file [portlet/portletname.portlet].
    at
    com.bea.netuix.application.manager.persistence.jdbc.PortletDefinitionDelegate.c
    reatePortletDefinitionInternal(PortletDefinitionDelegate.java:1442)
    at
    com.bea.netuix.application.manager.persistence.jdbc.PortletDefinitionDelegate.c
    reatePortletDefinition(PortletDefinitionDelegate.java:906)
    at
    com.bea.netuix.application.manager.persistence.jdbc.PortletDefinitionManagerImp
    l.createPortletDefinition(PortletDefinitionManagerImpl.java:520)
    at
    com.bea.netuix.application.manager.persistence.jdbc.PortletDefinitionManager_41
    0kn4_EOImpl.createPortletDefinition
    (PortletDefinitionManager_410kn4_EOImpl.java:476)
    at
    com.bea.netuix.servlets.repository.PortletFilePersistenceManager.create
    (PortletFilePersistenceManager.java:189)
    at
    com.bea.netuix.servlets.repository.PortletFilePersistenceManager.createUpdatePo
    rtletDefinitions(PortletFilePersistenceManager.java:304)
    at com.bea.netuix.servlets.repository.PortletFilePersistenceManager.sync
    (PortletFilePersistenceManager.java:609)
    at
    com.bea.netuix.servlets.repository.AbstractFilePersistenceManager$Sync.run
    (AbstractFilePersistenceManager.java:187)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs
    (AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs
    (SecurityManager.java:147)
    at
    com.bea.netuix.servlets.repository.AbstractFilePersistenceManager.startup
    (AbstractFilePersistenceManager.java:86)
    at com.bea.netuix.servlets.manager.PortalServlet.initFilePoller
    (PortalServlet.java:511)
    at com.bea.netuix.servlets.manager.PortalServlet.init
    (PortalServlet.java:242)
    at javax.servlet.GenericServlet.init(GenericServlet.java:258)
    at weblogic.servlet.internal.ServletStubImpl$ServletInitAction.run
    (ServletStubImpl.java:1099)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs
    (AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs
    (SecurityManager.java:121)
    at weblogic.servlet.internal.ServletStubImpl.createServlet
    (ServletStubImpl.java:975)
    at weblogic.servlet.internal.ServletStubImpl.createInstances
    (ServletStubImpl.java:954)
    at weblogic.servlet.internal.ServletStubImpl.prepareServlet
    (ServletStubImpl.java:893)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlet
    (WebAppServletContext.java:3456)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlets
    (WebAppServletContext.java:3413)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlets
    (WebAppServletContext.java:3399)
    at weblogic.servlet.internal.WebAppServletContext.preloadResources
    (WebAppServletContext.java:3382)
    at weblogic.servlet.internal.WebAppServletContext.setStarted
    (WebAppServletContext.java:6262)
    at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:892)
    at weblogic.j2ee.J2EEApplicationContainer.start
    (J2EEApplicationContainer.java:2181)
    at weblogic.j2ee.J2EEApplicationContainer.activate
    (J2EEApplicationContainer.java:2222)
    at
    weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.activateCo
    ntainer(SlaveDeployer.java:2521)
    at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.doCommit
    (SlaveDeployer.java:2439)
    at weblogic.management.deploy.slave.SlaveDeployer$Task.commit
    (SlaveDeployer.java:2156)
    at weblogic.management.deploy.slave.SlaveDeployer$Task.checkAutoCommit
    (SlaveDeployer.java:2255)
    at weblogic.management.deploy.slave.SlaveDeployer$Task.prepare
    (SlaveDeployer.java:2150)
    at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare
    (SlaveDeployer.java:2402)
    at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask
    (SlaveDeployer.java:884)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta
    (SlaveDeployer.java:592)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate
    (SlaveDeployer.java:501)
    at weblogic.drs.internal.SlaveCallbackHandler$1.execute
    (SlaveCallbackHandler.java:25)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
    Thanks in advance...
    Regards,
    Sandeep K

    Before deploying the app, you could check database table PF_PORTLET_DEFINITION for any entries there which might conflict with yours.
    --Stefan                                                                                                                                                                                                                                                                                                   

  • Operations on file: Deleting and get size

    Hi,
    I'm triying to delete a file. I use the following code:
    File found = new File (directoryOutputFileWriter+f);
                   boolean deleted = found.delete();But when I execute it the boolean deleted it's always false and the file is not deleted.
    Then I try to get the size of another file in this way:
    File produced = new File(directoryOutputFileWriter+file[0]);
    long size = produced.length();but I receive a null value (the file exists and its dimension is over 0 of course).
    Why?
    How can I solve?
    Thanks, bye bye.

    Hello,
    in my experience the absolute #1 source of astonishment with file operations is loose manual checking (mistyping or misreading).
    I suggest you use those traces:
    File found = new File (directoryOutputFileWriter+f);
    System.out.println("File path is"+found.getAbsolutePath());
    System.out.println("Does this file exists? "+found.exists());
    System.out.println("Is this file really a file? "+found.isFile()); // You may not be able to delete a directory on all platforms
    System.out.println("Is this file deleted now? "+found.delete());#2 is developers not reading the javadoc (that states that delete may not succeed), but I acknowledge you have read it, as you're investigating why it hasn't, and not complaining that it has.
    #3 is people overlooking OS-specific file management. E.g. Unix-Linux-Window file permissions management all may let you read a file but not delete it (with the unices having a richer set of combinations than windows). The rules for directory deletion are different between Unices and Windows. Etc...
    Edited by: jduprez on Jul 5, 2010 9:44 AM
    @Mel: I sometimes wish I was that much connected to my wife's mind ;o)
    @Joachim: nice catch! Loose manual checking indeed (both on my part and on OP's)...

  • Number of irf (integer register file) reading ports, 3 or 4??

    All T1 documents indicate that irf (integer register file) has 3 reading ports. But when reading through its rtl model bw_r_irf.v, I have to raise the doubt that it actually has 4 reading ports physically, which are r1, r2, r3 and r3h. Even though the addresses of r3 and r3h are very close, they are different by the lowest bit in the rtl. In physical implementation, you have to use a different ports for different addresses. So my question is:
    1. Is T1 irf implemented with 4 ports physically or I miss-understand the problem?
    2. What's the use for that extra port 3h?

    Hi,
    The register file is implemented such that, when doing a read, only 4 high bits of the address got decoded, so content of two neighboring register got read out. For port 1 and 2, the lowerst bit of the address is used to select which one goes to the output.
    RTL for port rs1, rs2 and rs3 are identical but implementation could be how you describe above. ie. using lowest bit of address to mux select which output goes out.
    However for port3, the lowerst bit of the address is not used(even thouth it exists in RTL), so the content of both registers goes to the output, the data from the even register goes to port 3 while the data from the odd register goes to port 3h
    All five bits of address are used for port3 in RTL, lowest bit is hardcoded to 1 for the port 3h. For double-store the lowest bit has to be zero (double word/even register alignment). For single word store, port3 can access either odd or even address (same mechanism as port1 and port2) and lower 32bits of port3 will be the same as port3h.
    Thanks.

  • Alternative to File.delete() and deleteOnExit()

    Is there any GOOD way to delete physical files from a Java app running under Windows besides the File object's incredibly lame and emasculated delete() and deleteOnExit() methods?
    Despite my best efforts, I have yet to find ANY circumstances under which calling File.delete() will actually delete a file under Windows XP... It's as though the mere act of a running Java application becoming AWARE that a file exists is enough to make the JVM lock the file so nothing else can touch it (including the running app itself).
    Is there perhaps some alternate JNI-based alternative that treats deletions as more than polite suggestions that a file be considered for future removal, and PERSONALLY sees to it that the underlying OS makes an immediate and determined effort to physically delete the file IMMEDIATELY?

    The File object referenced above is used to open a FileInputStream, which is subsequently closed prior to calling the File object's delete() method.
    From what I've read about this problem over the past few days, it arises because Sun didn't follow their own best practices and left releasing the file lock to the Stream's finalize() method (or otherwise left some critical prerequisite to the lock's release to a garbage collection run)... which, as we all know, is something you should never do when you're DEPENDING upon having something executed because there's NO guarantee it will run in a timely manner, or even run at all (if, say, the application throws an Exception).
    Apparently, the problem arises something like this:
    A running Java app creates a File object and does something that requires doing actual I/O upon it, like opening an input/output stream.
    The JVM asks its abstraction layer to ask Windows to open the file. A delegate is dispatched to contact win32 and request a file lock. Windows creates a file lock in the thread's name, and gives the delegate the good news.
    The running app does its stream I/O.
    The running app closes the stream, and nullifies the object's reference just to be safe.
    Unfortunately, the JVM has other plans in mind. It throws the old Stream object into the garbage collector's work heap, then forgets it ever existed without bothering to stick around and personally make sure the file lock is released RIGHT AWAY.
    The running app continues... it's done with the file and has no further use for it, so it calls the File object's delete() method as its final act before nullifying the File object itself.
    The JVM dispatches another delegate to ask Windows to delete the file. Unfortunately, windows notices that the JVM still holds a lock on the file and tartly sends it home empty-handed, with instructions to tell its parent to make up its mind what it wants to do with the file. The delegate meekly reports failure, and the message is passed back to the running app without further action.
    What SHOULD happen:
    Calling Stream.close() should cause a delegate to be IMMEDIATELY dispatched to notify Windows that the lock should be released.
    OR, if Sun doesn't want to do that for performance reasons, then the JVM should double-check to make sure that the failure wasn't its own fault -- forcing an IMMEDIATE sweep through the garbage collector to return any queued-for-release file locks (possibly after taking a side trip to verify that the file still physically exists), followed by a second deletion attempt once it's certain that windows has responded to its request to release the lock.
    Calling System.gc() before calling File.delete() seems to work for now... but it's a really bad kludge that Sun needs to address since there's technically no guarantee that the garbage collector will actually run and release the lock.
    IMHO, this is an outright shameful bug. Sun can make all the lame excuses it wants to make about enforcing platform abstraction, but the fact is... anyone who calls File.delete() after personally making sure they've cleaned up after themselves by closing their streams has every reasonable expectation that the file will, in fact, be physically deleted unless some OTHER app or thread has acquired a secondary lock in the meantime. The buck has to stop somewhere. File deletion is one of those unglamorous tasks that nobody really thinks about until it doesn't work... and when it fails, it comes as a really rude surprise. If Sun can't alter the behavior of File.delete() for legacy reasons, then they should add an alternate method, like "File.deleteNow() throws RuntimeException" that guarantees the following behavior:
    "The JVM asks the host operating system to delete the file. If the OS refuses, the JVM tries to figure out why, and whether the failure might be its own fault. If it has reason to believe it's its own fault, it will force an immediate garbage collection run to clean up any outstanding mess, then ask the host OS to delete the file again. If it succeeds, the method returns true. If it fails, a RuntimeException (or subclass that actually lets the caller figure out why it failed) gets thrown."
    The key point is that File.delete() must NEVER fail unless some OTHER app, process, or thread that's completely unrelated to the one that locked the file and now wants it deleted has acquired a lock on the file in the meantime. I think just about everyone will agree that the current behavior of File.delete() under win32 absolutely violates the implicit contract that developers reasonably expect of a function to delete a file.
    Just to give one concrete example of a scenario where File.deleteOnExit() isn't feasible... suppose you have some emergency maintenance task that needs to be launched (with manually-supplied arguments) every few months when Something Bad happens... usually at night or over a weekend. To make life easy, the emergency app is implemented as a Servlet (so the notified individual can quickly and easily fix it in 3 minutes with his PalmOS phone and browser). The problem is, deleteOnExit() won't do much good when called from a Servlet, because the JVM running Tomcat hosting the Servlet is almost guaranteed to run for months without actually exiting... and when it finally DOES exit, it probably WON'T be graceful or intentional...

  • Ever since enabling Soft Delete on one of my tables, the logs are flooded with "... does not support the 'deleted' system property"

    I enabled Soft Delete on one of my Azure Mobile Services tables, and ever since then, the logs are flooded with tons of warnings that say something like this:
    The table 'Section' does not support the 'deleted' system property.
    Is there a way to suppress these warnings, or is it advisable to enable soft delete for all of my tables?
    As a follow on, is there a way to export the logs so that it's easier to peruse through them and search?
    Thanks :)

    Hi
    You can set your logging level in Azure Admin portal to be Error only, so it only logs errors and warnings will be ignored.
    Regards
    Aram

  • Help with File.delete()

    Hi All!
    I am doing the following code:
    String indexPath = "Y:/var/session/ZGCoVyCCcooSl1uHRYCAWg.idx";
    File idxFile = new File(indexPath);
    if(idxFile.exists())
    System.out.println(indexPath + " exists.");
    else
    System.out.println(indexPath + " does not exist.");
    boolean idxDeleted = idxFile.delete();
    if(!idxDeleted)
    System.out.println("could not delete " + indexPath);
    if(idxFile.exists())
    System.out.println("failed to delete " + indexPath);
    When I run this code I get the following output:
    Y:/var/session/ZGCoVyCCcooSl1uHRYCAWg.idx exists.
    Which means that the file existed and the file is deleted. But, actually file is not deleted. When I try to manually delete the file, I get "sharing violation" error. I am running this code on a Windows 2000 server system and JDK1.4. I appreciate any help.
    thanks,
    Padma.

    That IS strange. I don't have a Win2K server to test on, but I know Win2K Pro (at a client's site) seems incredibly slow at a lot of things, like when working with WinExporer. Someone told me it had to do with a configuration option. Perhaps there is something in the config telling your server to defer file deletes, e.g. "lock" the (to be)deleted file so no one can access it, mark it for deletion, but defer until later during a lull when all pending deletes can be batched at once. That would explain why you can see it, but not access it, and it goes away after some time. Then again, I might be TOTALLY out in left field... :(

  • Why doesn't flash player stay installed and why does the saved file disappear.

    Why doesn't flash player stay installed and why does the saved file disappear.  I have downloaded and installed flash player several times on my Win7 Vaio laptop. I have uninstalled and deleted all versions.  I am the administrator and I have also turned off my Security Software, but the same thing keeps happening over and over.  The Java Script is enabled and I have tried both downloading via IE and firefox.  It is rediculous that it keeps disappearing and I keep getting messages that the newest version is needed.  I am downloading directly from adobe and they say it is the latest.  Getting very frustrated.  They ask if we have any problems when we go to the finish line, but there is no place for comments.  I guess they don't really care if it works or not.

    So is it actually installed, or is it not?  If not, download and run the offline installers:
    Flash Player for ActiveX (Internet Explorer)
    Flash Player Plug-in (All other browsers)
    If it still does not work correctly, check
    http://forums.adobe.com/thread/885448
    http://forums.adobe.com/thread/867968
    In Firefox also check if the Shockwave Flash plugin is enabled.

Maybe you are looking for