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 245108 - Failure to follow named query link
Summary: Failure to follow named query link
Status: REOPENED
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal (vote)
Assignee: Sergey Petrov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-17 14:01 UTC by terje7601
Modified: 2016-11-07 10:35 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description terje7601 2014-06-17 14:01:40 UTC
I have 2 maven projects A & B, both opened in NetBeans

Project A contains a JPA entity "Employee" with named query "Employee.findAll"
Project B contains a reference to that named query & has project A defined as a dependency in its pom

When I hold Ctrl & hover over the named query in project B, the actual JPQL query appears in a tooltip. However, upon clicking, I get the following exception:

java.lang.IllegalArgumentException: fileObject == null
	at org.netbeans.api.java.source.JavaSource.forFileObject(JavaSource.java:235)
	at org.netbeans.modules.j2ee.persistence.editor.hyperlink.NamedQueryHyperlinkProvider.goToNQ(NamedQueryHyperlinkProvider.java:174)
	at org.netbeans.modules.j2ee.persistence.editor.hyperlink.NamedQueryHyperlinkProvider.access$000(NamedQueryHyperlinkProvider.java:93)
	at org.netbeans.modules.j2ee.persistence.editor.hyperlink.NamedQueryHyperlinkProvider$1.run(NamedQueryHyperlinkProvider.java:116)
	at org.netbeans.modules.progress.ui.RunOffEDTImpl$1.run(RunOffEDTImpl.java:150)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1423)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
Comment 1 Sergey Petrov 2014-07-07 20:28:33 UTC
jpa model created in nb may contain jpql value, but my not contain reference to project, in this case at least exception shouldn't be thrown.
Comment 2 Sergey Petrov 2014-07-08 13:33:30 UTC
http://hg.netbeans.org/web-main/rev/22146e9e2352 fix exception only
keep the issue for now to reevaluate a bit later if it will be easy to add better navigation support
Comment 3 Quality Engineering 2014-07-09 02:48:54 UTC
Integrated into 'main-silver', will be available in build *201407090001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/22146e9e2352
User: Sergey B. Petrov <sj-nb@netbeans.org>
Log: #245108 do not navigate to entities in another project
Comment 4 Martin Balin 2016-07-07 08:55:11 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
Comment 5 terje7601 2016-11-07 10:35:13 UTC
Still relevant.