db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mi...@apache.org
Subject svn commit: r1471526 - in /db/derby/code/branches/10.10: ./ java/engine/org/apache/derby/impl/store/raw/data/ java/engine/org/apache/derby/loc/ java/shared/org/apache/derby/shared/common/reference/
Date Wed, 24 Apr 2013 16:44:09 GMT
Author: mikem
Date: Wed Apr 24 16:44:08 2013
New Revision: 1471526

URL: http://svn.apache.org/r1471526
Log:
DERBY-5886 FILE_CANNOT_REMOVE_FILE exception prints garbage.

backported changes #1469505 and #1469923 from trunk to 10.10 branch.

Added new messages to cover cases where no exception was available for
the second argument, and made text of those messages more specific to
the actual usage.  Fixed the calls in RAFContainer.java to be consistent, and
still use original error.



Modified:
    db/derby/code/branches/10.10/   (props changed)
    db/derby/code/branches/10.10/java/engine/org/apache/derby/impl/store/raw/data/EncryptOrDecryptData.java
    db/derby/code/branches/10.10/java/engine/org/apache/derby/impl/store/raw/data/RAFContainer.java
    db/derby/code/branches/10.10/java/engine/org/apache/derby/impl/store/raw/data/RFResource.java
    db/derby/code/branches/10.10/java/engine/org/apache/derby/loc/messages.xml
    db/derby/code/branches/10.10/java/shared/org/apache/derby/shared/common/reference/SQLState.java

Propchange: db/derby/code/branches/10.10/
------------------------------------------------------------------------------
  Merged /db/derby/code/trunk:r1469505,1469923

Modified: db/derby/code/branches/10.10/java/engine/org/apache/derby/impl/store/raw/data/EncryptOrDecryptData.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.10/java/engine/org/apache/derby/impl/store/raw/data/EncryptOrDecryptData.java?rev=1471526&r1=1471525&r2=1471526&view=diff
==============================================================================
--- db/derby/code/branches/10.10/java/engine/org/apache/derby/impl/store/raw/data/EncryptOrDecryptData.java
(original)
+++ db/derby/code/branches/10.10/java/engine/org/apache/derby/impl/store/raw/data/EncryptOrDecryptData.java
Wed Apr 24 16:44:08 2013
@@ -356,8 +356,8 @@ public class EncryptOrDecryptData implem
                     StorageFile oldFile = getFile(files[i]);
                     if (!privDelete(oldFile)) {
                         throw StandardException.newException(
-                                      SQLState.FILE_CANNOT_REMOVE_FILE,
-                                      oldFile);
+                                  SQLState.FILE_CANNOT_REMOVE_ENCRYPT_FILE,
+                                  oldFile);
                     }
                 }
             }

Modified: db/derby/code/branches/10.10/java/engine/org/apache/derby/impl/store/raw/data/RAFContainer.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.10/java/engine/org/apache/derby/impl/store/raw/data/RAFContainer.java?rev=1471526&r1=1471525&r2=1471526&view=diff
==============================================================================
--- db/derby/code/branches/10.10/java/engine/org/apache/derby/impl/store/raw/data/RAFContainer.java
(original)
+++ db/derby/code/branches/10.10/java/engine/org/apache/derby/impl/store/raw/data/RAFContainer.java
Wed Apr 24 16:44:08 2013
@@ -1680,7 +1680,7 @@ class RAFContainer extends FileContainer
                  catch (SecurityException se)
                  {
                      throw StandardException.newException(
-                         SQLState.FILE_CANNOT_REMOVE_FILE, se, file, stub);
+                         SQLState.FILE_CANNOT_REMOVE_FILE, se, file, se.toString());
                  }
              }
 	

Modified: db/derby/code/branches/10.10/java/engine/org/apache/derby/impl/store/raw/data/RFResource.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.10/java/engine/org/apache/derby/impl/store/raw/data/RFResource.java?rev=1471526&r1=1471525&r2=1471526&view=diff
==============================================================================
--- db/derby/code/branches/10.10/java/engine/org/apache/derby/impl/store/raw/data/RFResource.java
(original)
+++ db/derby/code/branches/10.10/java/engine/org/apache/derby/impl/store/raw/data/RFResource.java
Wed Apr 24 16:44:08 2013
@@ -288,12 +288,12 @@ final class RemoveFile implements Servic
             if (fileToGo.isDirectory()) {
                 if (!fileToGo.deleteAll()) {
                     throw StandardException.newException(
-                            SQLState.FILE_CANNOT_REMOVE_FILE, fileToGo);
+                            SQLState.FILE_CANNOT_REMOVE_JAR_FILE, fileToGo);
                 }
             } else {
                 if (!fileToGo.delete()) {
                     throw StandardException.newException(
-                            SQLState.FILE_CANNOT_REMOVE_FILE, fileToGo);
+                            SQLState.FILE_CANNOT_REMOVE_JAR_FILE, fileToGo);
                 }
             }
         }

Modified: db/derby/code/branches/10.10/java/engine/org/apache/derby/loc/messages.xml
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.10/java/engine/org/apache/derby/loc/messages.xml?rev=1471526&r1=1471525&r2=1471526&view=diff
==============================================================================
--- db/derby/code/branches/10.10/java/engine/org/apache/derby/loc/messages.xml (original)
+++ db/derby/code/branches/10.10/java/engine/org/apache/derby/loc/messages.xml Wed Apr 24
16:44:08 2013
@@ -5873,6 +5873,16 @@ ln=lower-case two-letter ISO-639 languag
                 <text>Error encountered while trying to write data to disk during database
recovery.  Check that the database disk is not full. If it is then delete unnecessary files,
and retry connecting to the database.  It is also possible that the file system is read only,
or the disk has failed, or some other problem with the media.  System encountered error while
processing page {0}.</text>
                 <arg>page</arg>
             </msg>
+            <msg>
+                <name>XSDFJ.S</name>
+                <text>Error encountered while trying to remove database file {0}, as
part of encrypting or decrypting database files. Incorrect file or directory ownership or
permissions could cause remove of the file to fail.  Processes not controlled by Derby like
backup or virus checkers could also be responsible.</text>
+                <arg>fileName</arg>
+            </msg>
+            <msg>
+                <name>XSDFK.S</name>
+                <text>Error encountered while trying to remove a jar file {0} stored
in the database. Incorrect file or directory ownership or permissions could cause remove of
the file to fail.  Processes not controlled by Derby like backup or virus checkers could also
be responsible.</text>
+                <arg>fileName</arg>
+            </msg>
 
         </family>
 

Modified: db/derby/code/branches/10.10/java/shared/org/apache/derby/shared/common/reference/SQLState.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.10/java/shared/org/apache/derby/shared/common/reference/SQLState.java?rev=1471526&r1=1471525&r2=1471526&view=diff
==============================================================================
--- db/derby/code/branches/10.10/java/shared/org/apache/derby/shared/common/reference/SQLState.java
(original)
+++ db/derby/code/branches/10.10/java/shared/org/apache/derby/shared/common/reference/SQLState.java
Wed Apr 24 16:44:08 2013
@@ -524,6 +524,8 @@ public interface SQLState {
 	String FILE_UNEXPECTED_EXCEPTION                            = "XSDFF.S";
     String BACKUP_FILE_IO_ERROR                                 = "XSDFH.S";
 	String FILE_NEW_PAGE_DURING_RECOVERY                        = "XSDFI.S";
+	String FILE_CANNOT_REMOVE_ENCRYPT_FILE                      = "XSDFJ.S";
+	String FILE_CANNOT_REMOVE_JAR_FILE                          = "XSDFK.S";
 
 	/*
 	** RawStore - Data.FSLDemo transaction exceptions



Mime
View raw message