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 75344 - [cc] Completion of DB based annotations does not work
Summary: [cc] Completion of DB based annotations does not work
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Editor (show other bugs)
Version: 5.x
Hardware: PC All
: P1 blocker (vote)
Assignee: Andrei Badea
URL:
Keywords:
: 76042 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-04-21 14:12 UTC by Jiri Kovalsky
Modified: 2006-05-25 09:05 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Zipped project reproducing not working completion of DB annotations. (23.69 KB, application/x-compressed)
2006-04-21 14:13 UTC, Jiri Kovalsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Kovalsky 2006-04-21 14:12:55 UTC
Development build #200604210200 of NetBeans 5.5
Windows XP, JDK 1.5.0_05 build #05

Description:
============
Code completion of annotations from database based on persistence.xml file does
not work because generation of persistence units has changed and does not comply
with format necessary for code completion.

Steps to reproduce:
===================
1. Register GlassFish application server in Runtime tab.
2. Unzip attached EJBModule2 project and open it.
3. Right click project node and "Resolve Missing Server Problem...".
4. Open "Source Packages|test|Product.java" file in editor.
5. Set your cursor at position 26:16 i.e. @Table(name = "| and press CTRL+Space.
6. "No suggestions" shows up instead of list of database tables.
Comment 1 Jiri Kovalsky 2006-04-21 14:13:49 UTC
Created attachment 29980 [details]
Zipped project reproducing not working completion of DB annotations.
Comment 2 Andrei Badea 2006-05-09 09:21:38 UTC
*** Issue 76042 has been marked as a duplicate of this issue. ***
Comment 3 Andrei Badea 2006-05-09 09:43:11 UTC
P1 to match the priority of duplicate issue 76042.

This is very likely caused by ProviderUtil.getConnection(PersistenceUnit) only
using the persistence unit properties to retrieve the connection properties
(database url etc.). It ignores the jta-data-source and non-jta-data-source
elements.
Comment 4 Andrei Badea 2006-05-09 13:47:09 UTC
Fixed.

Checking in
j2ee/persistence/src/org/netbeans/modules/j2ee/persistence/editor/completion/db/DBCompletionContextResolver.java;
/cvs/j2ee/persistence/src/org/netbeans/modules/j2ee/persistence/editor/completion/db/Attic/DBCompletionContextResolver.java,v
 <--  DBCompletionContextResolver.java
new revision: 1.1.4.23; previous revision: 1.1.4.22
done
Checking in
j2ee/persistence/src/org/netbeans/modules/j2ee/persistence/provider/ProviderUtil.java;
/cvs/j2ee/persistence/src/org/netbeans/modules/j2ee/persistence/provider/Attic/ProviderUtil.java,v
 <--  ProviderUtil.java
new revision: 1.1.2.24; previous revision: 1.1.2.23
done
Comment 5 Jindrich Sedek 2006-05-25 09:05:00 UTC
verified in 20060525-0458

This Issue marks a problem of @Table(name="| that stil doesn't work, but it
works for @Table(name=|  Without ' " ' ! Which is  all right acording the tutorials.