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.

Bug 178898 - J2EE Javadocs (especially Persistence) not showing
Summary: J2EE Javadocs (especially Persistence) not showing
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal with 5 votes (vote)
Assignee: Sergey Petrov
URL:
Keywords:
: 200542 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-12-20 04:05 UTC by fommil
Modified: 2014-07-09 15:05 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
messages.log for clean startup of NB 6.8 (37.85 KB, application/octet-stream)
2009-12-24 07:21 UTC, fommil
Details

Note You need to log in before you can comment on or make changes to this bug.
Description fommil 2009-12-20 04:05:10 UTC
This is a new one for 6.8 for me - the Javadocs for J2EE packages are no longer appearing.

I have a full J2EE install of Netbeans 6.8 (I even clicked the SUN Application Server in Customise install).

I always use shared library descriptors - this may or may not be a factor.

If I create a new project and add a persistence provider - the Persistence library is added to my library path, but I cannot access the Javadocs for things such as @Entity. This can be confirmed by expanding the Libraries folders for the Persistence library in the Project browser.

It is worth noting that doing this will not copy the javadocs to the project folder. Therefore I also have the following additions to the nblibraries.properties file

libs.ejb3-persistence.classpath=\
    ${base}/ejb3-persistence/ejb3-persistence.jar
libs.ejb3-persistence.javadoc=\
    ${base}/ejb3-persistence/ejb3-persistence-javadoc.zip!/
libs.hibernate-persistence.classpath=\
    ${base}/hibernate/hibernate-3.3.1.GA.jar:\
    ${base}/hibernate/hibernate-annotations-3.4.0.GA.jar:\
    ${base}/hibernate/hibernate-commons-annotations.jar:\
    ${base}/hibernate/hibernate-entitymanager-3.4.0.GA.jar:\
    ${base}/hibernate/lib/antlr-2.7.6.jar:\
    ${base}/hibernate/lib/commons-collections-3.1.jar:\
    ${base}/hibernate/lib/dom4j-1.6.1.jar:\
    ${base}/hibernate/lib/javassist-3.4.GA.jar:\
    ${base}/hibernate/lib/jta-1.1.jar:\
    ${base}/slf4j/slf4j-api-1.5.2.jar:\
    ${base}/slf4j/slf4j-jdk14-1.5.2.jar:\
	${base}/hibernate/lib/c3p0-0.9.1.2.jar:\
	${base}/hibernate/lib/ehcache-1.2.3.jar
libs.hibernate-persistence.javadoc=\
   ${base}/ejb3-persistence/ejb3-persistence-javadoc.zip!/:\
   ${base}/hibernate/hibernate-annotations-3.4.0.GA-javadoc.zip!/doc/api/

but the Javadocs STILL do not appear. Note that these javadoc files previously worked for me under Netbeans 6.7.x.

I cannot find any J2EE javadocs bundled with Netbeans 6.8 - an oversight? Or hidden?
Comment 1 Sergey Petrov 2009-12-21 03:54:54 UTC
can you try to rename your nb home dir temporary and start nb with fresh one?
there should be javadoc by default but there is an issue 178665 is it your case?
Comment 2 fommil 2009-12-21 06:45:24 UTC

*** This bug has been marked as a duplicate of bug 178665 ***
Comment 3 Sergey Petrov 2009-12-21 07:23:09 UTC
it may be some problem with scanning, and may be wrong cache is stored, can you try to rename your {nbhome6.8}/var/cache/ dir to see if with new one all will work.
Comment 4 fommil 2009-12-24 06:52:37 UTC
I no longer believe this is a dupe - or if it is, its not localised to "moving the IDE".

@Sergey that didn't help.

Checking build.properties, the following lines existed

libs.ejb3-persistence.classpath=/Applications/NetBeans/NetBeans 6.8.app/Contents/Resources/NetBeans/java3/modules/ext/hibernate/ejb3-persistence.jar
libs.ejb3-persistence.javadoc=
libs.ejb3-persistence.maven-pom=
libs.ejb3-persistence.src=

so naturally I updated this so that the javadoc line read

libs.ejb3-persistence.javadoc=/Applications/NetBeans/NetBeans 6.8.app/Contents/Resources/NetBeans/enterprise6/docs/javaee6-doc-api.zip

and restarted NetBeans with a clean var/cache

Then I noticed that the Javadocs don't start at the top level of the ZIP file - so I tried again with the following

libs.ejb3-persistence.javadoc=/Applications/NetBeans/NetBeans 6.8.app/Contents/Resources/NetBeans/enterprise6/docs/javaee6-doc-api.zip!/docs/api/

To test, I am using a fresh J2EE project with the Persistence library added to the classpath. Javadocs are not appearing.

When I have a J2SE or Web Application project with a dedicated Persistence library (with bundled jar and javadocs), I cannot see the Javadocs either - even though this worked in 6.7.

I also tried with a completely fresh installation of Netbeans 6.8 - I moved my ".netbeans" out of the way - the bug still manifests itself and "libs.ejb3-persistence.javadoc" is not initialised in the build.properties.

This is a serious bug for J2EE support - it means that J2EE Persistence Javadocs are not accessible in Netbeans 6.8 - either from a fresh start or when upgrading from a 6.7 configuration, with bundled Persistence libraries or (existing) shared library descriptors.
Comment 5 Sergey Petrov 2009-12-24 07:12:33 UTC
thanks, unfortunately I can't reproduce locally yet.
do you have any exceptions in message.log(especially on first start with fresh user dir)? can you attach one? what's your platform?
also do you mean changes in
libs.ejb3-persistence.javadoc=/Applications/NetBeans/NetBeans
6.8.app/Contents/Resources/NetBeans/enterprise6/docs/javaee6-doc-api.zip!/docs/api/
solve the problem with javadoc?
the issue seems related to hibernate only as libs.ejb3-persistence.javadoc is used by hibernate library but need to verify, also in 6.7 there was no path to javadoc in libs.ejb3-persistence.javadoc also.
Comment 6 fommil 2009-12-24 07:19:46 UTC
To clarify: nothing I have tried is fixing the problem.

I have installed the J2EE version of Netbeans 6.8 on OS X Snow Leopard, selecting Tomcat and deselecting Groovy and Features on Demand. This may be insignificant.

No relevant messages in the log file, on a clean startup. Attaching soon.
Comment 7 fommil 2009-12-24 07:21:52 UTC
Created attachment 92903 [details]
messages.log for clean startup of NB 6.8
Comment 8 Sergey Petrov 2009-12-24 07:31:28 UTC
was able to reproduce after creation a project with hibernate provider.
Comment 9 fommil 2009-12-30 09:09:50 UTC
This comment documents some ways of setting up a project that do NOT display the bug, and one way that DOES display the bug.

# DISPLAYS BUG

* Any project that has the "Hibernate JPA" Library on the Compile Classpath

# JAVADOCS SHOWN

The following steps work for me on OS X Snow Leopard:

* Move aside all .netbeans settings and start a fresh startup of NetBeans 6.8
* New Project -> Samples -> Java Web -> Web JPA -> (defaults)
* Window -> Other -> Javadoc (to get Javadoc view up)
* Projects -> WebJpa -> Source Packages -> ListPersonServlet
* click on the method portion of the call "emf.createEntityManager()" (line 61)

Observe that the Javadocs for EntityManagerFactory.createEntityManager() are displayed. That is EclipseLink, now for Hibernate:

* Projects -> WebJpa -> Configuration Files -> persistence.xml -> change provider to Hibernate
* Projects -> WebJpa -> Source Packages -> ListPersonServlet
* click on the method portion of the call "emf.createEntityManager()" (line 61)

Observe that the Javadocs for EntityManagerFactory.createEntityManager() are displayed.

Note that under either provider, it is possible to see the Glassfish Javadocs for persistence by going to

* Projects -> WebJpa -> Libraries -> Glassfish v3 Domain -> right click "javax.persistence.jar" -> Show Javadoc

The strange thing is that in build.properties, the property

libs.ejb3-persistence.javadoc

has no value.
Comment 10 charlweed 2010-07-28 17:00:50 UTC
I have the same problem (No jvadocs for J2EE API) but I am not explicitly using Hibernate.
I am using the "Swing Application Framework" which depends on the following libraries:
Toplink Essentials
Derby
derbyclient.jar

I manually added the java6 j2ee javadoc jar to the platform javadocs that made no difference. I also tried adding the j2ee javadoc jar to each of the above "libraries" properties, that did not work either.
Comment 11 mfreire 2010-08-29 18:25:18 UTC
Experiencing same problem after upgrading from 6.8 to 6.9.1. A simple work-around:

- find the location of your javaee6-doc-api.zip file
- go to the Library Manager, and add that file to the "javadoc" tab of the hibernate JPA library.
Comment 12 Jan Becicka 2011-08-01 09:34:05 UTC
*** Bug 200542 has been marked as a duplicate of this bug. ***
Comment 13 m_jaggard 2011-08-01 09:49:30 UTC
I have the javadoc to the J2EE platform installed (and extracted) on my hard
disk and I can view it by searching on the Help menu by selecting "Javadoc
Index Search" and then entering a class name. I have got the directory that
I've extracted the content to under javadoc for the Java platform and the
Server that I'm using, however I can't make it appear. I have also cleared the
cache under .netbeans/7.0/var/cache and restarted Netbeans but to no avail.
There are LOADS of people with very similar complaints around on the internet
but none of the solutions have worked for me. When I had the same problem with
the Google App Engine javadoc a few weeks ago, it started working when I added
it to the Platform instead of the Server, but it hasn't helped this time.

Any ideas why and what can be done about it - I'm hoping for more of a
permanent fix (since this is such a common issue) than just suggestions for me.

I am not using Hibernate at all.
Comment 14 m_jaggard 2011-08-01 09:51:10 UTC
(In reply to comment #11)
> Experiencing same problem after upgrading from 6.8 to 6.9.1. A simple
> work-around:
> 
> - find the location of your javaee6-doc-api.zip file
> - go to the Library Manager, and add that file to the "javadoc" tab of the
> hibernate JPA library.

This has not worked for me (for a start I'm not using Hibernate, but also adding the javadoc to the library doesn't help).
Comment 15 Sergey Petrov 2011-08-01 10:40:03 UTC
Have you tried to add javadoc to the library you are using?
Comment 16 m_jaggard 2011-08-01 10:44:20 UTC
I've added it to the Server (Google App Engine) and to the Platform (JDK 1.6) but I'm not using any other libraries.
Comment 17 Sergey Petrov 2011-08-01 14:45:05 UTC
this issue is under hibernate category and may be the same for jpa category/libraries, why you expect jee javadoc to be accessible with libraries you said?
Comment 18 m_jaggard 2011-08-01 14:58:50 UTC
Two comments.

Firstly my original bug was closed as a duplicate of this one, that's why I'm posting here.

Secondly, I expect Javadoc to work when it's added to the project, however that happens. In this case, I've tried via the Server and via the Platform (please note that the Platform Javadoc and the Server Javadoc are working, just not the Java EE Javadoc).

There are such an abundance of posts around the internet regarding Javadoc, I really think the implementation is buggy. If nothing else, any Javadoc that's available to the IDE should be shown, even if a warning is shown to say that it may be for a different version (I'm assuming here that Netbeans only shows Javadoc if the actual classes are being provided by the same entity - Server, Platform, Library). In my case however, I've attached the Javadoc to the same entity that's providing the API (the Server) so I'd expect it to work regardless.
Comment 19 Sergey Petrov 2011-08-01 20:40:49 UTC
ok, thanks for explanations, yet it may be a separate issue and not initial one 178898 at least in my opinion and isn't related to specific area like hibernate/persistence etc.
Comment 20 JEick 2013-05-08 15:31:32 UTC
This issue is still present in Netbeans 7.3 when using Eclipselink. Is there any hope that this can end up in the next release as it is very annoying. Thanks.
Comment 21 Sergey Petrov 2013-05-08 16:21:33 UTC
I'm a bit mixed with the issue now,
can you describe your setup?
This issue seems to contain severla use cases.
Also in 7.3 it's quite easy to register new javadoc in my opinion.
Comment 22 JEick 2013-05-08 19:08:20 UTC
The use case is simple. Install Netbeans 7.3, create a project, add an EntityManager object to your main and then try to pull up the javadoc for that EntityManager object's methods. You get a javadoc not found error.

Yes it is easy to add libraries, however I cannot determine where I need to add the javadoc and which javadoc to add. Also, why not include all of the javadoc's for all of the included libraries out of the box?
Comment 23 JEick 2013-05-29 19:49:40 UTC
Any update on this issue? Any idea on when it will be resolved?
Comment 24 Sergey Petrov 2014-07-09 13:38:43 UTC
http://hg.netbeans.org/web-main/rev/79297e0c8ae1
jpa javadoc is provided for bundled eclipselink/hibernate separately from javaee javadoc now, I don't know if it resolve all mentioned above issues, but some are resolved occording to brief test. If some issues are not resolved it's better to file new issue with exact steps:
distribution (java/javee/etc zip/installer)
project type
library used
sample code