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 156379 - "Entity Classes from Database" always asks to create connection
Summary: "Entity Classes from Database" always asks to create connection
Status: RESOLVED INCOMPLETE
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Sergey Petrov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-06 20:41 UTC by gholmer
Modified: 2009-09-28 14:33 UTC (History)
1 user (show)

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 gholmer 2009-01-06 20:41:13 UTC
0) create a test database
1) create new project as EJB module, specify Glassfish as server
2) create JDBC connection pool and JNDI resource in GlassFish (e.g. jdbc/ejbtest)
3) set up persistence unit in EJB module, specifying resource from 2)
4) New / Entity Classes from Database, select resource from 2) as data source
This pops up a dialog labeled "New Database Connection", which requires user to
enter the connection information already entered in 2)
5) add a table to the database, restart GlassFish
6) Repeat step 4. 
New Database Connection dialog appears again, and this time shows "Unable to add
connection. Connection already exists." When error dialog is dismissed, new table
appears in Available Tables.
7) Subsequent attempts do not get past the error dialog in 6).
Comment 1 Sergey Petrov 2009-09-28 14:33:00 UTC
tried and there was no connecion information on step 2, just resource selection.
but I got connection dialog on step 4, it may be wrong but may be something like confirmation as I just press finish and
all works it should be at most P4 without next fail (or it was my miss with datasource setup)
I have added new table and restart gf (without nb restart)
and tried to repeat step 4 on the same project, I got no new connection dialog and was able to generate Entity for new
table.
did I miss something or it's just not reproducible in nb 6.7 wih gf 2.1 and mysql datasource?

after nb restart I got login dialog on test datasource but no "New Database Connection"