You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Rick Hillegas (JIRA)" <ji...@apache.org> on 2012/07/27 21:33:33 UTC

[jira] [Created] (DERBY-5886) FILE_CANNOT_REMOVE_FILE exception prints garbage.

Rick Hillegas created DERBY-5886:
------------------------------------

             Summary: FILE_CANNOT_REMOVE_FILE exception prints garbage.
                 Key: DERBY-5886
                 URL: https://issues.apache.org/jira/browse/DERBY-5886
             Project: Derby
          Issue Type: Bug
          Components: Store
    Affects Versions: 10.10.0.0
            Reporter: Rick Hillegas


SQLState.FILE_CANNOT_REMOVE_FILE maps to a message which has 2 arguments. This SQLState is used many times. It is variously given 1, 2, or 3 arguments. It's unclear whether we need multiple messages here or whether a single message could be pressed into service for all cases. As it is, some of these invocations are going to generate confusing garbage for the user. This SQLState is used in the following classes:

java/engine/org/apache/derby/impl/store/raw/data/EncryptData.java
java/engine/org/apache/derby/impl/store/raw/data/RAFContainer.java
java/engine/org/apache/derby/impl/store/raw/data/RFResource.java


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (DERBY-5886) FILE_CANNOT_REMOVE_FILE exception prints garbage.

Posted by "Mike Matrigali (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5886?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mike Matrigali updated DERBY-5886:
----------------------------------

    Issue & fix info: High Value Fix
              Labels: derby_triage10_10  (was: )

triaged for 10.10

marking high value, as it seems like a easy fix and may help diagnose a problem in the field if we can
get good error messages to the log.
                
> FILE_CANNOT_REMOVE_FILE exception prints garbage.
> -------------------------------------------------
>
>                 Key: DERBY-5886
>                 URL: https://issues.apache.org/jira/browse/DERBY-5886
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 10.10.0.0
>            Reporter: Rick Hillegas
>              Labels: derby_triage10_10
>
> SQLState.FILE_CANNOT_REMOVE_FILE maps to a message which has 2 arguments. This SQLState is used many times. It is variously given 1, 2, or 3 arguments. It's unclear whether we need multiple messages here or whether a single message could be pressed into service for all cases. As it is, some of these invocations are going to generate confusing garbage for the user. This SQLState is used in the following classes:
> java/engine/org/apache/derby/impl/store/raw/data/EncryptData.java
> java/engine/org/apache/derby/impl/store/raw/data/RAFContainer.java
> java/engine/org/apache/derby/impl/store/raw/data/RFResource.java

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (DERBY-5886) FILE_CANNOT_REMOVE_FILE exception prints garbage.

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13456020#comment-13456020 ] 

Dag H. Wanvik commented on DERBY-5886:
--------------------------------------

Note that File#delete does not throw IOException, it only returns false if a file can't be deleted, so maybe that's why the second argument is (inadvertently?) omitted from the two usages in EncryptData and RFResource.

Java 7 offers the method java.nio.file.Files#delete(path) which does throw IOException and others if the file can't be deleted. http://docs.oracle.com/javase/7/docs/api/java/nio/file/Files.html#delete(java.nio.file.Path), so going forward we may want to use that method so get more precise diagnostics.
                
> FILE_CANNOT_REMOVE_FILE exception prints garbage.
> -------------------------------------------------
>
>                 Key: DERBY-5886
>                 URL: https://issues.apache.org/jira/browse/DERBY-5886
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 10.10.0.0
>            Reporter: Rick Hillegas
>              Labels: derby_triage10_10
>
> SQLState.FILE_CANNOT_REMOVE_FILE maps to a message which has 2 arguments. This SQLState is used many times. It is variously given 1, 2, or 3 arguments. It's unclear whether we need multiple messages here or whether a single message could be pressed into service for all cases. As it is, some of these invocations are going to generate confusing garbage for the user. This SQLState is used in the following classes:
> java/engine/org/apache/derby/impl/store/raw/data/EncryptData.java
> java/engine/org/apache/derby/impl/store/raw/data/RAFContainer.java
> java/engine/org/apache/derby/impl/store/raw/data/RFResource.java

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira