• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium (View bug fix roadmap)
    • 1.4.3
    • 1.4.2
    • None
    • Solaris 5.6, jboss 3.0.2 + jetty

      I've set up the attachment directory at /usr/local/attachment and pointed JIRA to this directory.

      When I create an attachement for an issue, the form returns with :

      Form Errors:
      Could not move attachment from /var/tmp/Jetty_8080__jira/hehehmn44018.gif to /usr/local/jira/attach/CWR/CWR-2/10021_hehehmn.gif

      the file is there under Jetty_8080_jira, and all directories have appropriate permissions.

      The issue itself though.. if I view it again, I see that my attachement 'succeeded' (there is a link I can click) and it points to http://myurl.com/jira/secure/attachment/10021/hehehmn.gif

      Any thoughts?

            [JRASERVER-839] Attachment fails (sort of)

            Thanks Mike, it is now working properly.

            Mike Curwen added a comment - Thanks Mike, it is now working properly.

            OK guys - I think I've fixed this with 1.4.3, thanks to Kevin's commons-io patch.

            Can someone try it when 1.4.3 is out and just confirm it's fixed?

            Cheers,
            Mike

            Mike Cannon-Brookes added a comment - OK guys - I think I've fixed this with 1.4.3, thanks to Kevin's commons-io patch. Can someone try it when 1.4.3 is out and just confirm it's fixed? Cheers, Mike

            Hi Kevin,

            Your comment tweaked something in my memory. I once wrote a small web app that had some file upload/management stuff. I developed on NT, but when deployed to our Solaris box, I ran into the same trouble with the renameTo method.

            I always assumed I did something wrong, but perhaps not. What I ended up doing was just writing a small method that read in the file and wrote it back to the new location. This worked on both platforms, so I was happy my bug was 'fixed'.

            FYI: my directories are not on seperate partitions.

            And as a last addendum:
            as reported by you, doing the mv from a prompt as the appropriate user does work for me as well.

            Mike Curwen added a comment - Hi Kevin, Your comment tweaked something in my memory. I once wrote a small web app that had some file upload/management stuff. I developed on NT, but when deployed to our Solaris box, I ran into the same trouble with the renameTo method. I always assumed I did something wrong, but perhaps not. What I ended up doing was just writing a small method that read in the file and wrote it back to the new location. This worked on both platforms, so I was happy my bug was 'fixed'. FYI: my directories are not on seperate partitions. And as a last addendum: as reported by you, doing the mv from a prompt as the appropriate user does work for me as well.

            It looks as though the problem is caused by a call to the java.io.File renameTo method. This doesn't seem to support moving across file systems under *unix. On my machine /tmp and /var are on different partitions.

            Kevin O'Neill added a comment - It looks as though the problem is caused by a call to the java.io.File renameTo method. This doesn't seem to support moving across file systems under *unix. On my machine /tmp and /var are on different partitions.

            All of the users reporting this issue are *nix users.

            Kevin O'Neill added a comment - All of the users reporting this issue are *nix users.

            The same issue occurs for me.

            Environment.
            OS: Debian Linux 3.0
            Application Server: JBoss 3.0.2 / Jetty 4.somthing
            JDK 1.4

            Notes:
            The files appear in the jetty temp directory.
            The destination directories are present
            The permissions on the directories are correct.
            doing an mv on the command line as the jboss user works as expected.

            Kevin O'Neill added a comment - The same issue occurs for me. Environment. OS: Debian Linux 3.0 Application Server: JBoss 3.0.2 / Jetty 4.somthing JDK 1.4 Notes: The files appear in the jetty temp directory. The destination directories are present The permissions on the directories are correct. doing an mv on the command line as the jboss user works as expected.

            Tom Carter added a comment -

            We have exactly the same problem. We are using:
            Redhat Linux 7.3
            Tomcat 4.1.10

            Tom Carter added a comment - We have exactly the same problem. We are using: Redhat Linux 7.3 Tomcat 4.1.10

            Hi,

            Yes, we get this too - running standalone 1.4.2 and solaris 2.8.

            Mike

            Michael Phillimore-Brown added a comment - Hi, Yes, we get this too - running standalone 1.4.2 and solaris 2.8. Mike

            oh... I suppose I should point out...

            once I click the link, it returns:

            HTTP ERROR: 404 Could not find specified attachment
            RequestURI=/jira/secure/attachment/10021/hehehmn.gif

            I grep the server.log for Exceptions, but the only one is when I click the link, and it's a java.io.FileNotFoundException: /usr/local/jira/attach/CWR/CWR-2/10021_hehehmn.gif (No such file or directory)

            Mike Curwen added a comment - oh... I suppose I should point out... once I click the link, it returns: HTTP ERROR: 404 Could not find specified attachment RequestURI=/jira/secure/attachment/10021/hehehmn.gif I grep the server.log for Exceptions, but the only one is when I click the link, and it's a java.io.FileNotFoundException: /usr/local/jira/attach/CWR/CWR-2/10021_hehehmn.gif (No such file or directory)

              mike@atlassian.com Mike Cannon-Brookes
              3fc3260fc0fb Mike Curwen
              Affected customers:
              2 This affects my team
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: