Bug 198563 - Generate Javadoc reports success, but no files are produced
Generate Javadoc reports success, but no files are produced
Product: java
Classification: Unclassified
Component: Project
PC Windows XP
: P3 (vote)
: 7.2
Assigned To: Tomas Zezula
Depends on:
  Show dependency treegraph
Reported: 2011-05-12 17:32 UTC by lvskiprof
Modified: 2016-07-07 07:18 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT

Small project with only two modules that fails to generate Javadoc (80.99 KB, application/octet-stream)
2011-12-01 18:09 UTC, lvskiprof
Project with 4 files that fails to build Javadoc files (50.07 KB, application/zip)
2012-02-15 23:29 UTC, lvskiprof
libJava project, which is a dependency of the DOTN_Helper project (14.44 KB, application/zip)
2012-02-16 18:02 UTC, lvskiprof
Ant debug output that was requested (120.87 KB, text/plain)
2012-02-16 18:03 UTC, lvskiprof
Netbeans Options Settings (171.34 KB, application/zip)
2012-02-16 18:07 UTC, lvskiprof

Note You need to log in before you can comment on or make changes to this bug.
Description lvskiprof 2011-05-12 17:32:18 UTC
I have a small application where the majority of the code is in Test Packages.  My projects all reside in "My Documents", which is a network mounted volume.  This sounds very much like an issue I saw reported for a much earlier version of Netbeans where only mapped network drives would work.

Here is what I get for output:

Generating Javadoc
Javadoc execution
Loading source file \\fs-home\home\mriley\NetBeansProjects\NetBeansMaisaraTests\src\netbeansmaisaratests\NetBeansMaisaraTests.java...
Constructing Javadoc information...
Standard Doclet version 1.6.0_24
Building tree for all the packages and classes...
Building index for all the packages and classes...
Building index for all classes...
Browsing: file:////fs-home/home/mriley/NetBeansProjects/NetBeansMaisaraTests/dist/javadoc/index.html
BUILD SUCCESSFUL (total time: 1 second)

There are no files in the directory where it says they should be.  I have tried setting the option for javadoc to "-d c:\JavaDoc", but it seems to ignore it and still tries to generate the files in the same directory as before.

As a second issue it seems to open a tab in my current Firefox browser *and* open a new browser window, but of which have no URL in them - probably because there is no file where it points to.
Comment 1 Jan Becicka 2011-05-13 08:06:43 UTC
javadoc is generated by java/project module. Anyway it works for me on Mac.
Comment 2 lvskiprof 2011-07-15 18:09:52 UTC
I just recently download the Selenium project sources as a project using existing sources and it worked fine for that as well, except for some complaints about how they were using @link and @see, which is probably just some Javadoc command switches.

The code I was using before had a lot of annotations for using TestNG, so maybe that is what was causing my problem.
Comment 3 lvskiprof 2011-11-03 22:54:25 UTC
I am using Netbeans 7.0.1 with JDK 1.6_27 on Windows XP and seeing this problem again, but now I think I can provide a reproducible test case.

As new versions of Selenium come out I create a project to build each one, both Client and Server.  I do this by using the Create Java Project from Exiting Sources selection and it works great.  I keep the sources I pull down (using Subversion in Netbeans) into a directory under NetbeansProjects.  I then create the project referring to the source files in the directory.  This way everything is within the same volume on the disk.  In my case it is a network attached volume under Windows XP, in case that matters.

See http://forums.netbeans.org/topic20537.html&highlight=generate+javadoc for a similar situation, but his solution is what I am already doing.

I was just doing repairs on the Javadoc comments for 2.9.0 so I can contribute them back.  The client project worked great and had no problems.  The server project I was able to eliminate every single Javadoc warning or error and it says it builds it fine, but there are no files under dist/javadoc at all (while I still have 6 for the client project that I can't resolve due to a Catch-22 situation)!  It brings up the preview in the browser, but it is blank since there are no files.  I am wondering if it is putting them elsewhere.

I was able to build the 2.7.0 server Javadocs just fine, but I never did try it for 2.8.0.  So I did that just now and it fails in the same way as 2.9.0.  So just for grins I built the 2.7.0 one as well, and it failed too!  Sort of...

With the 2.9.0 and 2.8.0 versions I see the dist/javadoc directory, but it is empty.  With the 2.7.0 it is not empty, but here is how it failed:

It tried to open:

But when I edit that to:

Now it displays the documentation that was built!

My home directory is mapped to H:, but for some reason it is defaulting to the actual share address.  That explains why I don't see it immediately for the 2.7.0 build, but it fails to explain why 2.8.0 and higher are not building (or at least not copying) the files into the dist/javadoc directory at all.

I can attach the project and source files I use to build the project if you wish me to, but even as a Zip file it is about 55MB in size, and I am not sure if that will break this application or not.

Here is the output for build:

Generating Javadoc
Javadoc execution
Loading source file \\fs-home\home\mriley\NetBeansProjects\selenium-2.9.0\trunk\java\server\src\cybervillains\ca\CertificateCreator.java...

... Deleted long list because it exceeded 64K ...

Loading source file \\fs-home\home\mriley\NetBeansProjects\selenium-2.9.0\trunk\java\server\src\org\openqa\selenium\server\log\TerseFormatter.java...
Constructing Javadoc information...
Standard Doclet version 1.6.0_26
Building tree for all the packages and classes...
Building index for all the packages and classes...
Building index for all classes...
Browsing: file:////fs-home/home/mriley/NetBeansProjects/Selenium-Server-2.9.0/dist/javadoc/index.html
BUILD SUCCESSFUL (total time: 1 minute 45 seconds)
Comment 4 lvskiprof 2011-12-01 18:09:07 UTC
Created attachment 113721 [details]
Small project with only two modules that fails to generate Javadoc

I am attaching a small application project that is only two source files.  This is a Project directory from Netbeans 7.0.1, so you should basically be able to load it into Netbeans.

I have included all the internal jar files being used in the dist/lib directory, so if you change the library definitions to include all those files it would even build for you, but it will only run properly within our local network.  You would have to add the Selenium jar files to it for it to build (currently I am using the 2.12.0 version), because keeping them in made the file too big.

This is one of dozens of projects that I have and is one of the few where the Javadoc is not produced.  I originally reported the issue with a particular version of Selenium, but the very next version of Selenium worked fine.  I am hoping this much smaller case will help in locating the problem.
Comment 5 lvskiprof 2012-02-15 23:29:21 UTC
Created attachment 115782 [details]
Project with 4 files that fails to build Javadoc files

This is similar to the project I had submitted before, but up until changes I just made today (which were very minor) this was building the Javadoc files just fine.  I have not updated Netbeans (7.0.1) or my JDK since the last time I built the Javadoc for this project.

I need this to be able to produce Javadoc that is current for work, so this is urgent!
Comment 6 Tomas Zezula 2012-02-16 16:31:07 UTC
Unfortunately I am not able to reproduce it as it's Win specific.
The problem seems to be in the UNC path (\\fs-home\).
I will need to borrow some win box to test it.
The workaround and maybe the only solution is not to use UNC path. Map the \\fs-home\ to some drive.
Comment 7 Tomas Zezula 2012-02-16 16:36:04 UTC
Can you attach ant debug output of the javadoc build?
You can turn it on in Tools/Options/Miscellaneous/Ant/Verbosity Level = Debug
Comment 8 lvskiprof 2012-02-16 17:57:21 UTC
I sure can.  It also occurred to me that you might want to see my option settings, which has my library definitions, because this project requires that you have Selenium present.  It is currently set up to use Selenium 2.14.0, with the "-2.14.0" removed from the name for the selenium-java-2.14.0.jar file.  It also depends on another project, so I will attach that as well.

The output was too large to put here, so I will have to attach it as a text file.
Comment 9 lvskiprof 2012-02-16 18:02:15 UTC
Created attachment 115840 [details]
libJava project, which is a dependency of the DOTN_Helper project

Place the contents of this project in a libJava directory where you keep your Netbeans Projects.  It is a dependency of the DOTN_Helper project I attached earlier.
Comment 10 lvskiprof 2012-02-16 18:03:45 UTC
Created attachment 115841 [details]
Ant debug output that was requested

Here is the Ant debug output.
Comment 11 lvskiprof 2012-02-16 18:07:21 UTC
Created attachment 115842 [details]
Netbeans Options Settings

Here are the Netbeans Options setting I am using.  It should have the library definitions in it.  You would need to change the Selenium-libs and Selenium-Java-Client library definitions to use locations on your system.  Then you should match what I have here for building the DOTN_Helper project Javadoc.
Comment 12 Jesse Glick 2012-02-17 15:50:10 UTC
Sorry, but Javadoc simply does not work on UNC mounts. If you want to build Javadoc you must map to a drive letter and open your project using that mapped drive.

(Easily reproduced on a trivial Java project. Reporter - when filing a bug it is polite to supply a minimized test case, so the evaluator does not need to spend time setting up a complex environment and determining whether there is a bug in the test case itself.)

*** This bug has been marked as a duplicate of bug 146948 ***
Comment 13 lvskiprof 2012-02-17 17:34:51 UTC
Sorry, but that explanation does not quite explain what is going on here.  I believe that it is using UNC paths, because I see them in the debug output, now that you mentioned them.

The problem is that no UNC paths are being provided by me.  There are no UNC paths in any of the properties files or the XML files for the project.  None of the libraries being used have a UNC path defined in them.  Everything I can find in the files and via the IDE is using a drive letter.

Now the drive letters H: and V: do map to UNC paths within Windows, but something in ANT or within the IDE environment is converting those drive letters to UNC paths, because they are not provided by me.

This is using the 7.0.1 version of the IDE with all the current patches.  I would be willing to consider upgrading to the latest 7.1 version if I knew it would fix it, but this is an issue in the IDE and not how I defined the project, so I am reopening this bug.
Comment 14 lvskiprof 2012-02-17 19:40:53 UTC
Jesse was able to help me figure this out.  He asked me in a private E-mail exchange:

> what needs to be determined is why the UNC paths are showing up. After I sent you the direct E-mail I
> did more investigation and everything provided in the various properties and XML files for the project uses a drive letter. Similarly, everything I can see i[n] the IDE is
> specified via a drive letter.

Including the project location itself, as displayed in a tooltip in the Projects tab on the project's node? That is probably the only thing that matters in this case,
since it controls the -d parameter passed to javadoc. Check the path you used in the dialog from File > Open Project.


I hadn't noticed that tooltip before, but he was correct, it does show as \\fs-home in the tooltip.

So I closed the project and went to reopen it, and sure enough it was defaulting to opening it in the UNC path!  So I switched to H:, which is where that path maps to, and opened it.  Now the tooltip showed it as being in H: and it produced the Javadoc just fine.  I then went into Open Project again and it was defaulting to H:, so it does remember that path, although I am not sure it would across Netbeans being closed and reopened or not.

I think a bug fix would be to prevent Netbeans from allowing a UNC path to be used to open a project then.  A simple warning dialog should suffice to prevent people from doing it accidentally.

Thanks to Jesse for helping me figure this out.  Hopefully a simple fix can be made that will prevent this from happening to others as it did to me.  At least now I know what to look out for.
Comment 15 Tomas Zezula 2012-02-17 20:06:25 UTC
Thanks Jesse for help.
The warning sounds reasonable to me.
Comment 16 Tomas Zezula 2012-02-17 20:19:23 UTC
The warning can be either non modal dialog shown when at least one of the projects being opened is located on UNC (similar to broken references dialog). or we can just mark the project as broken and provide more details in project properties or project tooltip. The first is more visible but dialog may be irritating.
Comment 17 Jesse Glick 2012-02-18 00:02:53 UTC
Opening a project on a UNC path is permitted, and required by some users, it is just more prone to bugs like this one. (There are new problems in NB 7.2 development builds we are working on.) At a minimum the Generate Javadoc action on Ant-based project types should show a warning dialog in case the project is located on a UNC path, noting that it does not work with current JDKs.
Comment 18 Martin Balin 2016-07-07 07:18:50 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo