https://issues.apache.org/bugzilla/show_bug.cgi?id=54397
Bug ID: 54397
Summary: Copy task fails when copying from CIFS mounted
location
Product: Ant
Version: 1.8.4
Hardware: Other
OS: AIX
Status: NEW
Severity: major
Priority: P2
Component: Core tasks
Assignee: [email protected]
Reporter: [email protected]
Classification: Unclassified
When using the copy task to copy files from a CFIS mount, we are seeing the
following behavior (directory contains a bunch of files with numbers as names:
fileset: Setup scanner in dir /opt/storage with patternSet{ includes: [**]
excludes: [] }
[copy] 100 added as 100 doesn't exist.
[copy] 16 added as 16 doesn't exist.
[copy] 18 added as 18 doesn't exist.
[copy] 28 added as 28 doesn't exist.
<snip>
[copy] Copying 92 files to /opt/restore2
[copy] Copying /opt/storage/100 to /opt/restore2/100
[ant] Exiting /opt/backup-restore.xml.
BUILD FAILED
/opt/backup-restore-wrapper.xml:63: The following error occurred while
executing this line:
/opt/backup-restore.xml:506: Failed to copy /opt/storage/100 to
/opt/restore2/100 due to Invalid argument
at org.apache.tools.ant.taskdefs.Copy.doFileOperations(Copy.java:914)
at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:567)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:392)
at org.apache.tools.ant.Target.performTasks(Target.java:413)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at
org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:392)
at org.apache.tools.ant.Target.performTasks(Target.java:413)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.Main.runBuild(Main.java:811)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.io.IOException: Invalid argument
at sun.nio.ch.FileChannelImpl.map0(Native Method)
at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:758)
at
sun.nio.ch.FileChannelImpl.transferFromFileChannel(FileChannelImpl.java:542)
at sun.nio.ch.FileChannelImpl.transferFrom(FileChannelImpl.java:605)
at
org.apache.tools.ant.util.ResourceUtils.copyResource(ResourceUtils.java:532)
at org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java:559)
at org.apache.tools.ant.taskdefs.Copy.doFileOperations(Copy.java:899)
... 30 more
The task is simply:
<copy todir="${BACKUP_STORAGE_DIR}" preservelastmodified="yes">
<fileset dir="${STORAGE_LOCATION}"
includes="**">
</fileset>
</copy>
This works fine when run against local files or NFS mounts.
System details:
bash-4.2$ ant -version
Apache Ant(TM) version 1.8.4 compiled on May 22 2012
bash-4.2$ java -version
java version "1.6.0"
Java(TM) SE Runtime Environment (build pap6460sr12-20121025_01(SR12))
IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 AIX ppc64-64
jvmap6460sr12-20121024_126067 (JIT enabled, AOT enabled)
J9VM - 20121024_126067
JIT - r9_20120914_26057
GC - 20120928_AA)
JCL - 20121014_01
bash-4.2$ oslevel -g
6.1.0.0
bash-4.2$ instfix -i | grep AIX_ML
All filesets for 6100-00_AIX_ML were found.
All filesets for 6100-01_AIX_ML were found.
All filesets for 6100-02_AIX_ML were found.
All filesets for 6100-03_AIX_ML were found.
All filesets for 6100-04_AIX_ML were found.
mount created with the mkcifsmnt command
Server providing the share:
Windows Server 2008 R2
--
You are receiving this mail because:
You are the assignee for the bug.