You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2008/04/21 12:09:40 UTC

DO NOT REPLY [Bug 44843] New: ant unzip tasks should make filenotfound exceptions more explicit

https://issues.apache.org/bugzilla/show_bug.cgi?id=44843

           Summary: ant unzip tasks should make filenotfound exceptions more
                    explicit
           Product: Ant
           Version: 1.7.0
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
        AssignedTo: notifications@ant.apache.org
        ReportedBy: stevel@apache.org


If you try and <unzip> a file that doesnt exist, all you see in the log is
Error while expanding  lib/package-core-install/sf-core-install-3.12.031dev.zip

when you run at -d you see 
Caused by: java.io.FileNotFoundException:
/home/bob/CC/SmartFrogSVN/core/release/build/ivy/lib/package-core-install/sf-core-install-3.12.031dev.zip
(No such file or directory)

really, a missing file is something we could check for first, and fail with
something meaningful. Also, the text from any nested IOE should be printed
rather than lost at the normal log level


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 44843] ant unzip tasks should make filenotfound exceptions more explicit

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=44843


Stefan Bodewig <bo...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |1.8.0




--- Comment #5 from Stefan Bodewig <bo...@apache.org>  2008-07-18 02:07:40 PST ---
more explicit exceptions in svn revision 677860


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

DO NOT REPLY [Bug 44843] ant unzip tasks should make filenotfound exceptions more explicit

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=44843





--- Comment #3 from Steve Loughran <st...@apache.org>  2008-04-21 05:37:37 PST ---
looking at the code, this is almost invalid, because we do print the inner
cause. But Cruise Control seems to be dropping the second line of the error
text, which is CC's problem, not ours

Still, we can check for the resource existing, and fail with an explicit
BuildException in this state


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 44843] ant unzip tasks should make filenotfound exceptions more explicit

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=44843


Stefan Bodewig <bo...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |notifications@ant.apache.org
         AssignedTo|notifications@ant.apache.org|bodewig@apache.org
             Status|ASSIGNED                    |NEW




-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
You are the assignee for the bug.

DO NOT REPLY [Bug 44843] ant unzip tasks should make filenotfound exceptions more explicit

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=44843


Steve Loughran <st...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |stevel@apache.org




--- Comment #2 from Steve Loughran <st...@apache.org>  2008-04-21 05:35:27 PST ---
full stack trace


BUILD FAILED
/home/bob/CC/SmartFrogSVN/core/release/build.xml:390: Error while expanding
/home/bob/CC/SmartFrogSVN/core/release/build/ivy/lib/package-core-install/sf-core-install-3.12.031dev.zip
        at org.apache.tools.ant.taskdefs.Expand.expandFile(Expand.java:147)
        at org.apache.tools.ant.taskdefs.Expand.execute(Expand.java:106)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
        at org.apache.tools.ant.Main.runBuild(Main.java:758)
        at org.apache.tools.ant.Main.startAnt(Main.java:217)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: java.io.FileNotFoundException:
/home/bob/CC/SmartFrogSVN/core/release/build/ivy/lib/package-core-install/sf-core-install-3.12.031dev.zip
(No such file or directory)
        at java.io.RandomAccessFile.open(Native Method)
        at java.io.RandomAccessFile.<init>(RandomAccessFile.java:212)
        at org.apache.tools.zip.ZipFile.<init>(ZipFile.java:141)
        at org.apache.tools.ant.taskdefs.Expand.expandFile(Expand.java:136)
        ... 17 more
--- Nested Exception ---
java.io.FileNotFoundException:
/home/bob/CC/SmartFrogSVN/core/release/build/ivy/lib/package-core-install/sf-core-install-3.12.031dev.zip
(No such file or directory)
        at java.io.RandomAccessFile.open(Native Method)
        at java.io.RandomAccessFile.<init>(RandomAccessFile.java:212)
        at org.apache.tools.zip.ZipFile.<init>(ZipFile.java:141)
        at org.apache.tools.ant.taskdefs.Expand.expandFile(Expand.java:136)
        at org.apache.tools.ant.taskdefs.Expand.execute(Expand.java:106)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
        at org.apache.tools.ant.Main.runBuild(Main.java:758)
        at org.apache.tools.ant.Main.startAnt(Main.java:217)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 44843] ant unzip tasks should make filenotfound exceptions more explicit

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=44843





--- Comment #4 from Steve Loughran <st...@apache.org>  2008-04-21 05:46:29 PST ---
...although the tar subclass doesnt print that error, so it is affected by this
bug


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 44843] ant unzip tasks should make filenotfound exceptions more explicit

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=44843


Steve Loughran <st...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED




--- Comment #1 from Steve Loughran <st...@apache.org>  2008-04-21 05:34:36 PST ---
stack trace
java.io.FileNotFoundException:
/home/bob/CC/SmartFrogSVN/core/release/build/ivy/lib/package-core-install/sf-core-install-3.12.031dev.zip
(No such file or directory)
        at java.io.RandomAccessFile.open(Native Method)
        at java.io.RandomAccessFile.<init>(RandomAccessFile.java:212)
        at org.apache.tools.zip.ZipFile.<init>(ZipFile.java:141)
        at org.apache.tools.ant.taskdefs.Expand.expandFile(Expand.java:136)
        at org.apache.tools.ant.taskdefs.Expand.execute(Expand.java:106)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
        at org.apache.tools.ant.Main.runBuild(Main.java:758)
        at org.apache.tools.ant.Main.startAnt(Main.java:217)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.