This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
NetBeans 4.1 (Daily build: 200503301800), JDK 1.4.2_02, WinXP When I try to build the JavaDoc for my project I get an error message: Javadoc execution D:\projects\jworkbench\netbeans41\nbproject\build-impl.xml:339: Javadoc failed: java.io.IOException: CreateProcess: C:\jdk1.4.2\bin\javadoc.exe -d D:\projects\jworkbench\netbeans41\dist\javadoc -notree -noindex -windowtitle JWorkbench -private -sourcepath D:\projects\jworkbench\src -source 1.4 D:\projects\jworkbench\src\workbench\WbManager.java D:\projects\jworkbench\src\workbench\WbSplash.java D:\projects\jworkbench\src\workbench\WbStarter.java D:\projects\jworkbench\src\workbench\db\ASAConstraintReader.java D:\projects\jworkbench\src\workbench\db\AbstractConstraintReader.java D:\projects\jworkbench\src\workbench\db\CloudscapeConstraintReader.java D:\projects\jworkbench\src\workbench\db\ColumnIdentifier.java D:\projects\jworkbench\src\workbench\db\ConnectionMgr.java D:\projects\jworkbench\src\workbench\db\ConnectionProfile.java D:\projects\jworkbench\src\workbench\db\DbDriver.java D:\projects\jworkbench\src\workbench\db\DbMetadata.java D:\projects\jworkbench\src\workbench\db\DeleteScriptGenerator.java D:\projects\jworkbench\src\workbench\db\DependencyNode.java D:\projects\jworkbench\src\workbench\db\Firebir BUILD FAILED (total time: 0 seconds) The number of directories in this output is much to short, and the last one is even cut off. It seems that some maximum regarding the length of the parameter is hit and thus the generation fails. It seems that I'm not the only one: http://www.netbeans.org/servlets/ReadMsg?listName=nbusers&msgNo=51205 reports a similar error with NB 4.0
java/platform issue?
J2SEProject issue.
Which paltform? It seems as a Windows known cmd.exe issues, it is not able to pass long command line to the process. Using the default platform which runs the javadoc internally or using cygwin bash which allows long command lines may help you.
But this was working with NB 3.6 (same project)
The NetBeans 3.6 has only the default platform. This is what I have suggested. If you use the default platform, it should work. Please, can you set the OS?
Occurs on Win2K and WinXP with the default platform (as a matter of fact, I don't have a different platform configured).
OK, thanks. I will try to fix it.
I've tries it on the WinXP, and it works fine with project having 200 java files. How big is your project (number of java files, the javadoc is built from)? Can you run the gnerate javadoc action with verbosity level = debug (You have to change the Tools/Options/Building/Ant Settings/verbosity level) and attach the output to this issue. Thanks
Created attachment 21349 [details] Output of the debug run for building javadoc
The project has about 500 files in it (The path names are a bit different compared to my first example, because I tried this on a different computer)
Thanks very much. Could you try one more thing, try to change the -javadoc-build target in the build-impl.xml in the following way: Add the attribute useexternalfile="true" into javadoc task. Does it work? The -javadoc-build target should look like: <target name="-javadoc-build" depends="init"> <mkdir dir="${dist.javadoc.dir}"/> <javadoc destdir="${dist.javadoc.dir}" source="${javac.source}" notree="${javadoc.notree}" use="${javadoc.use}" nonavbar="${javadoc.nonavbar}" noindex="${javadoc.noindex}" splitindex="${javadoc.splitindex}" author="${javadoc.author}" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}" private="${javadoc.private}" additionalparam="${javadoc.additionalparam}" failonerror="true" useexternalfile="true"> <classpath> <path path="${javac.classpath}"/> </classpath> <sourcepath> <pathelement location="${src.dir}"/> </sourcepath> <fileset dir="${src.dir}"/> </javadoc> </target>
Save the old build-impl.xml first and restore it after you tried it. You can also restore the original build-impl.xml by deleting it, closing project and opening it again.
The useexternalfile should work fine, I am going to fix it in this way.
Yes, adding useexternalfile="true" works fine. Thanks for your help
Unfortunately I will not be able to use this fix until the Ant 1.7 is out. The Ant 1.6.2 has a bug (see http://issues.apache.org/bugzilla/show_bug.cgi?id=27814) which crashes the Javadoc on folders containig spaces.
The problem appears on the Windows when the command line is longer than 64KB. The solution is to set the useexternalfile attribute to true, but there is a bug in the file list generation on the Windows when the path contains space characters. This solution cannot be used until Ant 1.7 where the issue is fixed. See: http://issues.apache.org/bugzilla/show_bug.cgi?id=27814 An workaround which does not fix the problem but makes it less often is to use the packageset rather than the fileset. The list of packages is smaller than the list of files. But this does not work too. The Ant packageset is not able to pass an default package. The issue is related to the Ant, the same problem happens while running an javadoc task of any Ant script when command line is longer than 64 KB on Windows OS.
Known to affect only Windows, not other OSs. Workaround should be to override the -javadoc-build target in build.xml: copy the basic impl from build-impl.xml, but also set useexternalfile="true". Additionally, ensure that the directory in which you are keeping your project's sources does not contain any spaces. If it does, move your project to one that does not. (Generally good advice for Windows users anyway.) Workaround only applies to people using the default platform. People using a specific target JDK will anyway see a quite different -javadoc-build, due to a workaround for an unrelated bug. Not sure what happens in that case, whether they see a similar bug or not.
There were no objections to the waiver. Considered approved for 4.1.
Checking in j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProjectGenerator.java; /cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProjectGenerator.java,v <-- J2SEProjectGenerator.java new revision: 1.41; previous revision: 1.40 done Checking in j2seproject/src/org/netbeans/modules/java/j2seproject/resources/build-impl.xsl; /cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/resources/build-impl.xsl,v <-- build-impl.xsl new revision: 1.63; previous revision: 1.62 done
*** Issue 51372 has been marked as a duplicate of this issue. ***