Bug 41958 - Javadoc failure with sun java 6 jdk on windows
Javadoc failure with sun java 6 jdk on windows
Product: Ant
Classification: Unclassified
Component: Documentation
Other Windows XP
: P2 normal (vote)
: 1.8.0
Assigned To: Ant Notifications List
Depends on:
  Show dependency tree
Reported: 2007-03-27 06:04 UTC by Xavier Hanin
Modified: 2008-11-24 01:20 UTC (History)
2 users (show)

ant verbose log (44.50 KB, text/plain)
2007-03-27 06:05 UTC, Xavier Hanin
ant 1.6.5 verbose log (37.25 KB, text/plain)
2007-03-27 08:19 UTC, Xavier Hanin

Note You need to log in before you can comment on or make changes to this bug.
Description Xavier Hanin 2007-03-27 06:04:54 UTC
A very basic call to javadoc currently fails with ant 1.7.0 + sun jdk 6.0 +
windows vista, while it works with the same env but ant 1.6.5.

I will attach my verbose log in a moment.
Comment 1 Xavier Hanin 2007-03-27 06:05:41 UTC
Created attachment 19813 [details]
ant verbose log
Comment 2 Xavier Hanin 2007-03-27 06:10:07 UTC
FYI, I've done tests with sun jdk 1.4.2_13 and 1.5.0_10 on the same box and ran
into the same problem.
Comment 3 Peter Reilly 2007-03-27 06:27:00 UTC
Could you do a -verbose on ant 1.6.5 as well please - to
see what difference there is in the command line
Comment 4 Steve Loughran 2007-03-27 07:56:47 UTC
error code 0x57 is, according to http://support.microsoft.com/kb/155011, some
low level networky problem:

ERROR_ADAP_HDW_ERR                    A network adapter hardware
                                            error occurred.
Comment 5 Xavier Hanin 2007-03-27 08:17:56 UTC
I think the error code is 87, and not 57:
java.io.IOException: Cannot run program "D:\dev\jdk\jdk1.6.0\bin\javadoc.exe":
CreateProcess error=87

So from microsoft web site:
87L   ERROR_INVALID_PARAMETER               The parameter is incorrect.

will attach the ant 1.6.5 log in a moment
Comment 6 Xavier Hanin 2007-03-27 08:19:16 UTC
Created attachment 19816 [details]
ant 1.6.5 verbose log
Comment 7 Steve Loughran 2007-03-27 08:21:43 UTC
sorry, I'd converted it to 0x57 before looking up the file, but the msdn docs
(unlike the header files) are in decimal notation. You are right, the app is
failing because it thinks a param is incorrect. 

try setting useexternalfile="true"; this could be a function of the #of parameters
Comment 8 Xavier Hanin 2007-03-27 08:34:53 UTC
useexternalfile="true" fixed the problem, thanks!

Then I noticed another difference between ant 1.6.5 and ant 1.7.0, with 1.7 I
have errors if my fileset contains files which are not regular java files, like
resources for example. So I have to set includes="**/*.java" in my fileset,
while ant 1.6.5 was working properly without this includes...
Comment 9 Peter Reilly 2007-03-27 08:49:36 UTC
Yes, the ant 1.7 has logo.png in the list of files for javadoc,
and ant 1.6.5 does not.
The task call (from the e-mail on ant-dev) was
<javadoc destdir="${javadoc.build.dir}">
   <fileset dir="${src.dir}"/>
so it looks like ant 1.6.5 filtered the file list for
the command line to only
have .java files and ant 1.7.0 does not.
Comment 10 Xavier Hanin 2007-03-27 09:05:16 UTC
OK, so the problem is linked to the fileset used. Indeed, adding an includes to
the fileset fixes the problem, even without useexternalfile="true".

Thanks for your help!
Comment 11 Ron Baldwin 2007-03-29 17:16:36 UTC
I'm having this problem on XP, using 1.7.0 and jdk 6.  The code below worked on
1.6.x.  Adding useexternalfile="true" makes it work again.

<javadoc sourcepath="${base.src.dir}" destdir="${build.dir}/javadoc"
         classpathref="class.path" packagenames="com.example.*"/>
Comment 12 Stefan Bodewig 2008-11-21 06:50:30 UTC
looks as if we should recommend useexternalfiles stronger
Comment 13 Stefan Bodewig 2008-11-24 01:20:55 UTC
documented in svn revision 720139