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.
Build: NetBeans IDE Dev (Build 080728) VM: Java HotSpot(TM) Client VM, 11.0-b13, Java(TM) SE Runtime Environment, 1.6.0_10-rc-b26 OS: Windows XP, 5.1, x86 User Comments: 1. Connect to MySQL server. 2. Rightclick it's node and choose "Create Database...". 3. Select some database and click "OK". Result: DatabaseException arises. Stacktrace: org.netbeans.api.db.explorer.DatabaseException: The connection is not open at org.netbeans.modules.db.api.sql.execute.SQLExecutor.execute(SQLExecutor.java:87) at org.netbeans.modules.db.mysql.impl.BaseSampleProvider.create(BaseSampleProvider.java:98) at org.netbeans.modules.db.mysql.impl.SampleManager.createSample(SampleManager.java:121) at org.netbeans.modules.db.mysql.ui.CreateDatabasePanel$1.run(CreateDatabasePanel.java:153) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
Sample databases can't be created. Feature doesn't work.
Yes, I just saw this too. I had encountered this during my testing prior to going on vacation and thought I had fixed it, but it appears to have reared it's ugly head again.
*** Issue 141796 has been marked as a duplicate of this issue. ***
Andrei backed out the change I made for Issue 138072 to fix the regression I created for Issue 137811 (thanks, Andrei. Next time send me an email so I know what happened :)). I have to think about what to do here - the DB Explorer relies on two ConnectionNodeInfos being equal because their names are the same, but this causes problems for the Node ChildFactory implementation because it requires that the data used to compare two nodes be immutable - see Issue 137811 for more details. This wasn't a problem until I rewrote the DB Explorer to use ChildFactory rather than it's old ugly broken way of doing things. So, this means I am going to have to rework how the DB Explorer sets up a connection as connected. Yuck, this is hairy code.
Sorry for not sending an e-mail, but I didn't know I was reverting an intentional change. I expected ConnectionNodeInfo was not fixed as part of the changeset in 137811 desc9.
I found a solution - when refreshing the connection node list, I re-associate the opened connection with the new node info that gets created as part of the refresh. Change set b8fce80970ea.
Verified with build 080731.
Integrated into 'main-golden', available in build *200807311401* on http://bits.netbeans.org/dev/nightly/ Changeset: http://hg.netbeans.org/main/rev/65f95aa97eb9 User: David Van Couvering <davidvc@netbeans.org> Log: #142036: Connection is closed when trying to create sample database for MySQL Caused by an accidental backing out of my fix for Issue 138072