Bug 49430 - Bootstrap failure using JDK 1.4
Summary: Bootstrap failure using JDK 1.4
Status: RESOLVED FIXED
Alias: None
Product: Ant
Classification: Unclassified
Component: Core (show other bugs)
Version: 1.8.0
Hardware: PC Linux
: P2 critical (vote)
Target Milestone: 1.8.2
Assignee: Ant Notifications List
URL:
Keywords:
: 50368 (view as bug list)
Depends on:
Blocks: 30094
  Show dependency tree
 
Reported: 2010-06-11 14:19 UTC by Jesse Glick
Modified: 2010-12-01 03:51 UTC (History)
2 users (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2010-06-11 14:19:39 UTC
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.
Comment 1 Jesse Glick 2010-06-11 14:30:43 UTC
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
Comment 2 Jesse Glick 2010-06-11 14:35:27 UTC
Reproduced also on 1.8.0 sources using J2SDK 1.4.2_19, so not a recent regression.
Comment 3 Jesse Glick 2010-06-11 14:40:00 UTC
For easier hyperlinking:

svn revision 953809
Comment 4 Stefan Bodewig 2010-12-01 03:51:04 UTC
*** Bug 50368 has been marked as a duplicate of this bug. ***