ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 44528] New: NPE while using ftp task to del the contents of a directory
Date Tue, 04 Mar 2008 14:58:17 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=44528

           Summary: NPE while using ftp task to del the contents of a
                    directory
           Product: Ant
           Version: 1.7.0
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
        AssignedTo: notifications@ant.apache.org
        ReportedBy: ian.dees@gmail.com


Following stack trace is received when trying to delete the contents of a
directory using the <ftp> task:

The following error occurred while executing this line:
java.lang.NullPointerException
        at
org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:539)
        at
org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:380)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
        at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
        at org.apache.tools.ant.Main.runBuild(Main.java:668)
        at org.apache.tools.ant.Main.startAnt(Main.java:187)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
Caused by: /home2/builder/project-name/checkouts/build/reports-build.xml:577:
java.lang.NullPointerException
        at org.apache.tools.ant.Task.perform(Task.java:373)
        at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:64)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at
org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:378)
        ... 12 more
Caused by: java.lang.NullPointerException
        at
org.apache.tools.ant.taskdefs.optional.net.FTP$FTPDirectoryScanner.scandir(FTP.java:337)
        at
org.apache.tools.ant.taskdefs.optional.net.FTP$FTPDirectoryScanner.scandir(FTP.java:351)
        at
org.apache.tools.ant.taskdefs.optional.net.FTP$FTPDirectoryScanner.checkIncludePatterns(FTP.java:233)
        at
org.apache.tools.ant.taskdefs.optional.net.FTP$FTPDirectoryScanner.scan(FTP.java:197)
        at
org.apache.tools.ant.taskdefs.optional.net.FTP.transferFiles(FTP.java:1287)
        at
org.apache.tools.ant.taskdefs.optional.net.FTP.transferFiles(FTP.java:1382)
        at
org.apache.tools.ant.taskdefs.optional.net.FTP.execute(FTP.java:2010)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        ... 16 more

Relevant section of reports-build.xml:

<ftp action="del"
  server="@{server}"
  userid="@{userid}"
  password="@{password}"
  remotedir="@{basedir}/@{type}/doc"
  ignoreNonCriticalErrors="true">
  <fileset includes="**" />
</ftp>

'ls -l' of @{remotedir}:

229 Entering Extended Passive Mode (|||42002|)
150 Here comes the directory listing.
drwxr-xr-x    4 503      8            4096 Mar 04 14:43 api
drwxr-xr-x    2 503      8            4096 Mar 04 14:43 checkstyle
drwxr-xr-x    2 503      8            4096 Mar 04 14:43 cpd
drwxr-xr-x    2 503      8            4096 Mar 04 14:42 findbugs
drwxr-xr-x    2 503      8            4096 Mar 04 14:43 hansel
drwxr-xr-x    2 503      8            4096 Mar 04 14:43 jdepend
drwxr-xr-x    5 503      8            4096 Mar 04 14:43 level2
drwxr-xr-x    2 503      8            4096 Mar 04 14:43 pmd
drwxr-xr-x    2 503      8            4096 Mar 04 14:43 qualityaudit
drwxr-xr-x    2 503      8            4096 Mar 04 14:43 test
226 Directory send OK.


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

Mime
View raw message