ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 43559] New: - NullPointerException in ftp task when using recentDateFormatConfig
Date Fri, 05 Oct 2007 08:37:23 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĚ
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43559>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĚ
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43559

           Summary: NullPointerException in ftp task when using
                    recentDateFormatConfig
           Product: Ant
           Version: 1.7.0
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Optional Tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: franck_perrin14@yahoo.fr


I try to use the ftp task accessing an AIX 5.3 FTP server.
The server is in french language.
When I use the recentDateFormatConfig attribute, a NullPointerException is 
raised.
If I dont use it, nothing happens.
Here is the task I execute :
	<target name="listp114p06e">
		<ftp action="list"
			server="yyyyyy"
			userid="xxxxxx"
			password="zzzzzz"
			remotedir="Websphere/Envts/prod2/LogApps/Today"
			defaultDateFormatConfig="dd MMM yyyy"
			recentDateFormatConfig="dd MMM HH:mm"
			serverLanguageCodeConfig="fr"		             
			listing="list.txt">
			<fileset>
				<include name="**/*"/>
			</fileset>
		</ftp>
	</target>
Here the output in debug mode :

Apache Ant version 1.7.0 compiled on December 13 2006
Buildfile: ..\ant\build.xml
Adding reference: ant.PropertyHelper
Detected Java version: 1.4 in: C:\j2sdk1.4.2_06\jre
Detected OS: Windows XP
Adding reference: ant.ComponentHelper
Setting ro project property: ant.file -> C:\apache-ant-1.7.0
\bin\..\ant\build.xml
Adding reference: ant.projectHelper
Adding reference: ant.parsing.context
Adding reference: ant.targets
parsing buildfile C:\apache-ant-1.7.0\ant\build.xml with URI = file:/C:/apache-
ant-1.7.0/ant/build.xml
Setting ro project property: ant.project.name -> TestAntFTP
Adding reference: TestAntFTP
Setting ro project property: ant.file.TestAntFTP -> C:\apache-ant-1.7.0
\ant\build.xml
Project base dir set to: C:\apache-ant-1.7.0\ant
 +Target:
 +Target: getp114p06e
 +Target: listp114p06e
Attempting to create object of type org.apache.tools.ant.helper.DefaultExecutor
Adding reference: ant.executor
Build sequence for target(s) `listp114p06e' is [listp114p06e]
Complete build sequence is [listp114p06e, getp114p06e, ]

listp114p06e:
[antlib:org.apache.tools.ant] Could not load definitions from resource 
org/apache/tools/ant/antlib.xml. It could not be found.
      [ftp] Opening FTP connection to yyyyyy
      [ftp] custom configuration
      [ftp] custom config: system key = default (UNIX)
      [ftp] custom config: default date format = dd MMM yyyy
      [ftp] custom config: recent date format = dd MMM HH:mm
      [ftp] custom config: server language code = fr
      [ftp] connected
      [ftp] logging in to FTP server
      [ftp] login succeeded
      [ftp] changing the remote directory
      [ftp] listing files
fileset: Setup scanner in dir null with patternSet{ includes: [**/*] excludes: 
[] }
will try to cd to IDS where a directory called ids exists
      [ftp] disconnecting

BUILD FAILED
C:\apache-ant-1.7.0\ant\build.xml:38: java.lang.NullPointerException
        at org.apache.tools.ant.dispatch.DispatchUtils.execute
(DispatchUtils.java:115)
        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:1329)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets
(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
        at org.apache.tools.ant.Main.runBuild(Main.java:698)
        at org.apache.tools.ant.Main.startAnt(Main.java:199)
        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.lang.NullPointerException
        at 
org.apache.tools.ant.taskdefs.optional.net.FTP$FTPDirectoryScanner.checkRemoteSe
nsitivity(FTP.java:583)
        at 
org.apache.tools.ant.taskdefs.optional.net.FTP$FTPDirectoryScanner.forceRemoteSe
nsitivityCheck(FTP.java:552)
        at 
org.apache.tools.ant.taskdefs.optional.net.FTP$FTPDirectoryScanner.scan
(FTP.java:231)
        at org.apache.tools.ant.taskdefs.optional.net.FTP.transferFiles
(FTP.java:1570)
        at org.apache.tools.ant.taskdefs.optional.net.FTP.transferFiles
(FTP.java:1683)
        at org.apache.tools.ant.taskdefs.optional.net.FTP.execute(FTP.java:2373)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute
(DispatchUtils.java:105)
        ... 11 more
--- Nested Exception ---
java.lang.NullPointerException
        at 
org.apache.tools.ant.taskdefs.optional.net.FTP$FTPDirectoryScanner.checkRemoteSe
nsitivity(FTP.java:583)
        at 
org.apache.tools.ant.taskdefs.optional.net.FTP$FTPDirectoryScanner.forceRemoteSe
nsitivityCheck(FTP.java:552)
        at 
org.apache.tools.ant.taskdefs.optional.net.FTP$FTPDirectoryScanner.scan
(FTP.java:231)
        at org.apache.tools.ant.taskdefs.optional.net.FTP.transferFiles
(FTP.java:1570)
        at org.apache.tools.ant.taskdefs.optional.net.FTP.transferFiles
(FTP.java:1683)
        at org.apache.tools.ant.taskdefs.optional.net.FTP.execute(FTP.java:2373)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        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:1329)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets
(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
        at org.apache.tools.ant.Main.runBuild(Main.java:698)
        at org.apache.tools.ant.Main.startAnt(Main.java:199)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

Total time: 1 second

I installed the libraries commons-net-1.4.1.jar and jakarta-oro-2.0.8.jar in 
ANT_HOME/lib.

Here is what I get when I use the FTP commands :
ftp> cd Websphere/Envts/prod2/LogApps/Today
250 Commande CWD r┌ussie.
ftp> pwd
257 "/appli2/was/Websphere/Envts/prod2/LogApps/Today" est un r┌pertoire en cours
.
ftp> ls -l
200 Commande PORT r┌ussie.
150 Ouverture de la connexion de donn┌es pour /bin/ls.
8 total
drwxr-xr-x   2 wasadmin wasadmin       4096 05 oct 09:30 ids
drwxr-xr-x   2 wasadmin wasadmin        256 04 oct 10:35 isu
drwxr-xr-x   3 wasadmin wasadmin        256 26 sep 09:50 nci
drwxr-xr-x   3 wasadmin wasadmin        256 12 sep 15:50 nco
drwxr-xr-x   2 wasadmin wasadmin        256 01 oct 09:02 nhb
drwxr-xr-x   2 wasadmin wasadmin        256 26 jul 07:35 niw
drwxr-xr-x   3 wasadmin wasadmin        256 25 jun 20:58 nsp
226 Transfert termin┌.
ftp : 443 octets rešus en 0,00 secondes Ó 443000,00 Ko/sec.

As you can see the date format is "dd MMM HH:mm".

Thanks.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message