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 185886 - Javadoc not found when trigger code completion on GeneratedValue annotation on Id of an entity.
Summary: Javadoc not found when trigger code completion on GeneratedValue annotation o...
Status: RESOLVED WORKSFORME
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 6.x
Hardware: PC Other
: P3 normal (vote)
Assignee: Sergey Petrov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-11 09:42 UTC by hantsy
Modified: 2014-07-10 15:32 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
error ocurred. (12.69 KB, image/png)
2010-05-11 09:43 UTC, hantsy
Details
netbeans messalog (380.24 KB, application/octet-stream)
2010-05-11 09:44 UTC, hantsy
Details
in ant project... (26.03 KB, image/png)
2010-05-11 16:43 UTC, hantsy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description hantsy 2010-05-11 09:42:40 UTC
I create a maven based jee 6 project(jpa was added ).
I generated Entity classes from databasetable..
I wanted to modified the id generated strategy.

1. Type @GeneratedValue on the Id field.
2. Press ctrl+space in the "@GeneratedValue(<cursor is here>)", the suggestion was popup, and the errors ocurred.

I think the prolem was caused by the reading the doc of the suggestion. May be the related doc is not in local maven reposity.
Comment 1 hantsy 2010-05-11 09:43:38 UTC
Created attachment 98748 [details]
error ocurred.
Comment 2 hantsy 2010-05-11 09:44:33 UTC
Created attachment 98749 [details]
netbeans messalog
Comment 3 hantsy 2010-05-11 09:48:11 UTC
In my idea, to prevent this error, NetBeans must download the related doc under backgroud (do not show in current screen and do not block user's action) instead of throw an error message to the end user.
Comment 4 Sergey Petrov 2010-05-11 12:28:51 UTC
I'm not sure with downloading but if there is a problem with javadoc opening it's better just to show no javadoc and log something in my opinion.
Comment 5 hantsy 2010-05-11 14:19:50 UTC
For ant project, there is no way to get javadoc automatically. But for maven project, start a task in backgroud and fetch related javadoc is easy. Except user does not want do this explicitly in Options(provide sush a option?). 

If the related api is flexiable enough, I think provide different an eventhandle or exceptionhandler in different enviroment is easy.
Comment 6 Sergey Petrov 2010-05-11 15:23:41 UTC
In real it's not a persistence issue, I see ide tries to access javadoc file and show exception. There is no code from persistence involved, but will try to reproduce first before further evaluation. In this case some base ide/java editor functionality is used. Also persistence itself is base functionality and know nothing about maven specific features, I'm not sure if current realization allow to handle missed javadoc differently for different project.
Do you have the same exception in ant project?
Comment 7 hantsy 2010-05-11 15:44:22 UTC
I know this maybe not a persistence issue...but you can collaborate with the related person to fix this problem.
Comment 8 hantsy 2010-05-11 16:31:55 UTC
I just tried this in an ant project...
There is still no javadoc about persistence. But there is no exception.
The doc windows(panel) display "javadoc not found" information...
Comment 9 hantsy 2010-05-11 16:43:45 UTC
Created attachment 98786 [details]
in ant project...
Comment 10 Sergey Petrov 2010-05-13 12:34:37 UTC
I see two issues, missed javadoc file and exception.
just tried with 6.8 in maven web project and javadoc is shown for me without any exceptions.

may missed javadoc be related to http://netbeans.org/bugzilla/show_bug.cgi?id=178665 ?
Comment 11 Sergey Petrov 2010-05-13 13:27:16 UTC
tried to move 6.8 to new location and dont have exception anyway.
do you have persistence-api-1.0-javadoc.jar somewhere? I can't find it in 6.8 distribution and home, is it your file?
Comment 12 Sergey Petrov 2010-05-13 13:29:08 UTC
also .....\.m2\repository\javax\persistence\persistence-api\1.0\persistence-api-1.0-javadoc.jar doesn't looks like a path to nb home or nb installation dir, do you have customized platform or any java paths?
Comment 13 Sergey Petrov 2010-05-13 13:43:46 UTC
ok, found myself, .m2 is maven repository cache or something similar and I have persistence api jar here, and do not have persistence-api-1.0-javadoc.jar but still see javadoc without exceptions.
Looks like some critical steps are missed to reproduce the issue.
Comment 14 hantsy 2010-05-13 13:49:23 UTC
I installed netbeans from the zip format, and unzipped it into my disk directly(D:/devtools/netbeans).
That is all.
The maven local repository is the default(~/.m2), there is no modifications.
If the maven path is problematic, it can not resovle the maven dependencies(jar files).
Comment 15 Sergey Petrov 2010-05-14 12:28:52 UTC
will try zip on windows 7 then, as it may be dependent.
did you register any servers in nb or/and for your maven project?
Comment 16 Sergey Petrov 2010-05-14 16:29:33 UTC
I'm able to reproduce javadoc not found on full zip distribution on win7 with fresh netbeans user dir and cleaned .m2, and it may be considered as an issue.
But I still have no exception. Will verify in 6.9 also.
Comment 17 Sergey Petrov 2014-07-09 14:59:33 UTC
May be fixed in 8.0.1 but need to test a few days later
Comment 18 Sergey Petrov 2014-07-10 15:32:46 UTC
Unfortunately I didn't specify complete steps I was able to reproduce the issue with. Can't reproduce with latest build (it's likely applicable to 8.0 also).
I'm not sure what changeset fix the issue if it's fixed, worksforme