You need to log in before you can comment on or make changes to this bug.
Using trunk Web build from 12/22 1) After installing, change the userdir in etc/netbeans.conf to a folder other than dev 2) Start NetBeans and create a new Web Application 3) Wizard says that Java EE is not activated, so I clicked the Activate button 4) Next the new Database Connection dialog opens and I fill in the connection information for the sample database Result - error A connection for the sample database already exists. Is the v3 plugin trying to register Java DB also? Because it shouldn't register Java DB
The point should not be the connection already exists, but the new database connection dialog shouldn't even open
Sorry, looking at the stack trace more carefully, it appears that for some reason Hibernate is posting the new connection dialog.
Created an attachment (id=75255) [details] stack trace in messages.log
Posting new Database connection dialog is new, kind of a regression
in the original description, you don't have to change the userdir location, just make sure you start NetBeans with a new userdir
John, Can you please explain in detail on the step 3 ? 1. For me the wizard says 'No Java EE' servers registered and asked me to click 'Add Server' button and allowed me to select glashfish server. 2. When selected to install Glashfish V3, it downloaded and installed the server. 3. After that, in the new connection dialog, I do not see JavaDB driver pre-registered. (I see only JDBC-ODBC, MySQL and PostgreSQL) 4. When I selected the existing MySQL driver then, the new web application is created without any exceptions. Please clarify.. (This is on Windows XP with MySQL 5.0 preinstalled) -Vadiraj. -Vadiraj.
vadirajvd, as shown in the attached messages.log, NetBeans is running JDK 1.6, so NetBeans uses Java DB from JDK 1.6. But, all you really need to look at is the stack trace in the attached messages.log. I looked at HibernateConfigurationPanel and it appears and cmbDbConnection listens for an event fired when selecting an item which causes the Connection dialog to open. The connection dialog shouldn't open, should it? at org.netbeans.api.db.explorer.ConnectionManager.showAddConnectionDialog(ConnectionManager.java:229) at org.netbeans.api.db.explorer.support.DatabaseExplorerUIs$ConnectionDataComboBoxModel.newItemActionPerformed(DatabaseExplorerUIs.java:112) at org.netbeans.modules.db.util.DataComboBoxSupport$ItemActionListener.actionPerformed(DataComboBoxSupport.java:245) at javax.swing.JComboBox.fireActionEvent(JComboBox.java:1240) at javax.swing.JComboBox.setSelectedItem(JComboBox.java:567) at javax.swing.JComboBox.setSelectedIndex(JComboBox.java:603) at org.netbeans.modules.hibernateweb.framework.HibernateConfigurationPanel.fillPanel(HibernateConfigurationPanel.java:84) at org.netbeans.modules.hibernateweb.framework.HibernateConfigurationPanel.<init>(HibernateConfigurationPanel.java:72) at org.netbeans.modules.hibernateweb.framework.HibernateWebModuleExtender.<init>(HibernateWebModuleExtender.java:91) at org.netbeans.modules.hibernateweb.framework.HibernateFrameworkProvider.createWebModuleExtender(HibernateFrameworkProvider.java:8
I noticed that a db connection dialog opens when I am creating a web app, too. The db connection dialog appears between the wizard step where I associate the project with a server and the page where the frameworks appear. It looks like the creation of the Hibernate configuration panel is triggering this dialog that interrupts the completion of the wizard.
This issue creates an annoyance during every new web project creation when running on J2SE 1.6.*. The root cause is calling cmbDbConnection.setSelectedIndex(1) after connecting the drop-down box to db api connection manager : DatabaseExplorerUIs.connect(cmbDbConnection, ConnectionManager.getDefault()); Looking further...
For me, this looks like a db explorer module issue. When there is only one db connection registered in the IDE and when we connect a drop down box to the DatabaseExplorer (DatabaseExplorerUIs.connect()) and calling drop down box.setSelectedIndex(1) results in New Database connection dialog being shown. Looking further...
Its Hibernate module issue... Hibernate wizard is calling cbDbConnection.setSelectedIndex(1) when there are one or than one db connections available. When there's only one db connection available, the drop down box contains the db connection entry and the 'New Database Connection' entry in that order.. So setting the selected index to 1 is invoking the New database connection dialog, which is in fact in-correct. Setting the selected index to 0 (zero, first element) would be the right fix.. But Hibernate module does not handle the case where there are no db connections available in the IDE. In this case, the 'Finish' button is enabled on the wizard of New Web Project wizard and clicking on it results in NPE.. 'hibernate.cfg.xml' is in-complete because, there are no db connection details to fill in from... Fixing this problem along with this issue fix..
Fixed as per the previous description on this issue report. http://hg.netbeans.org/main/rev/29e24ab2ab91
I think someone from QE should verify this
Honza, can u please verify this ?
The error of enabling 'Finish' button on the new file wizard when there are no database connection configured also applies to Hibernate Configuration wizard. Fixing the same. http://hg.netbeans.org/main/rev/fecb6bd1a02b