Using either 1.8.1 or bootstrap.sh, I am unable to build Ant dev sources using JDK 1.4.2_17 on Ubuntu x86: ... Copying 5 files to .../build/classes Copying .../src/main/org/apache/tools/ant/antlib.xml to .../build/classes/org/apache/tools/ant/antlib.xml .../build.xml:962: The following error occurred while executing this line: .../build.xml:569: Failed to copy .../src/main/org/apache/tools/ant/antlib.xml to .../build/classes/org/apache/tools/ant/antlib.xml due to Invalid argument at org.apache.tools.ant.taskdefs.Copy.doFileOperations(Copy.java:877) at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:544) ... Caused by: java.io.IOException: Invalid argument at sun.nio.ch.FileChannelImpl.transferTo0(Native Method) at sun.nio.ch.FileChannelImpl.transferToDirectly(FileChannelImpl.java:392) at sun.nio.ch.FileChannelImpl.transferTo(FileChannelImpl.java:487) at org.apache.tools.ant.util.ResourceUtils.copyResource(ResourceUtils.java:532) at org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java:560) at org.apache.tools.ant.taskdefs.Copy.doFileOperations(Copy.java:862) ... 31 more Alternately, copying defaults.properties may fail. There is no such problem using JDK 5 (or 6). Immediately before the failure, position is 0 and chunk is the file size; destFile does exist.
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4824045 claims that this is fixed in _24, which is not helpful since (at least without Java SE for Business) you cannot download anything newer than 1.4.2_19. http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5056395 says it cannot work in 1.4.2 at all but does hint at a workaround, so: rev 953809
Reproduced also on 1.8.0 sources using J2SDK 1.4.2_19, so not a recent regression.
For easier hyperlinking: svn revision 953809
*** Bug 50368 has been marked as a duplicate of this bug. ***