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 225606 - Create New Data Source From Within Sub-Instance Of NetBeans Not Working
Summary: Create New Data Source From Within Sub-Instance Of NetBeans Not Working
Status: RESOLVED WONTFIX
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 7.2.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Sergey Petrov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-31 16:13 UTC by kwrobel
Modified: 2015-09-17 13:10 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Dialog showing the stuck "New Data Source" drop-down list. (37.97 KB, image/png)
2013-01-31 16:13 UTC, kwrobel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kwrobel 2013-01-31 16:13:21 UTC
Created attachment 130898 [details]
Dialog showing the stuck "New Data Source" drop-down list.

NetBeans does not initiate the New Data Source dialog during the "New Entity Classes from Database" wizard while running inside a sub-instance of class, e.g. during debugging or running of a NetBeans Module.

How to reproduce:
1. Create a new "NetBeans Module" project
2. Provide some generic information and follow wizard until module project gets created.
3. Now click on either "Run" or "Debug" buttons (doesn't make a difference which one). NetBeans launches another instance of itself with a user directory pointing to [your module project]/build/testuserdir.
4. Within the new NetBeans instance, create a new "Web Application" project. Simply leave all settings default throughout this wizard. No need to enable CDI or to add any framework. A Web Application (e.g. WebApplication1) is created with GlassFish 3.1.2.2 as its registered app server and a just one file "index.jsp" under Web Pages.
5. Now click on the "New File" button.
6. Choose "Persistence" category.
7. Choose "Entity Classes from Database" File Type.
8. Click Next.
9. The next page "Database Tables" has a Data Source drop-down list. Inside the list, click on "New Data Source..."

Instead of now seeing the "New Data Source" dialog where the user can specify a JNDI name for the GlassFish JDBC Resource and where she can pick from an existing database connection, nothing happens. I checked if the dialog might be hidden by other windows, but that is not the case. This problem only occurs while debugging or running a project module inside another instance of NetBeans, not inside the main IDE. This means that I always have to create a Web Application project first inside the main IDE, then add a New DataSource via the steps above, deploy the fake application to GlassFish which registers the JNDI name and also creates the pool. And then I run my module project to get inside the NetBeans instance (for debugging usually) and from there I have to create another project or open an existing one. This is a hassle.

My O/S Linux Mint 14 on Linux pc9324l 3.5.0-21-generic #32-Ubuntu SMP Tue Dec 11 18:51:59 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux. The JDK is OpenJDK 7 AMD64, but I also tried OpenJDK 6 AMD64 and Oracle's own native JDK 7 SE. In addition, I tried this on an Apple Mac Mini with OSX 10.6 and JDK 6 64-bit installed. Both machines use NetBeans 7.2.1 and I followed the steps as described above on both with the same behaviour.
Comment 1 kwrobel 2013-01-31 16:16:05 UTC
(In reply to comment #0)
> Created attachment 130898 [details]
> Dialog showing the stuck "New Data Source" drop-down list.
> 
> NetBeans does not initiate the New Data Source dialog during the "New Entity
> Classes from Database" wizard while running inside a sub-instance of class,
> e.g. during debugging or running of a NetBeans Module.
I meant to say "inside a sub-instance of NetBeans.
Comment 2 Sergey Petrov 2013-01-31 16:38:05 UTC
I suppose it's target platform configuration issue as there should be no dependency on execution way in general.
Please check your target platform configuration was it modified? Do you use full ide? what is "Provide some generic information"? 
Haven't tried 7.2.1 but with 7.3 I have no problem, datasource list is filled with sample ds and new datasource dialog appears successfully. jdk7u11 is used.
Comment 3 kwrobel 2013-01-31 19:44:16 UTC
Ok. I have to revise my description. It actually matters whether I'm debugging or running the NetBeans Module.

I am prepping a video that you can look at for this purpose.
Comment 4 kwrobel 2013-01-31 20:16:13 UTC
Alright. I have new insights on this. As I was recording my demo video, I found out that the dialog actually does appear, but not the first time around. It takes a second click on the drop down list and a second click on the "New Data Source" link to bring up the dialog. To me this is still a bug, but now it is not a serious anymore since I can actually finish the task inside my second instance of NetBeans (the one I'm debugging my NetBeans Module in).

So severity: low. Still a bug, though. I will post the video once it's done encoding.
Comment 5 kwrobel 2013-01-31 20:45:50 UTC
Video is uploaded to YouTube for your perusal.

http://youtu.be/OthgtkCYvWc

The first, longer part of the video is just to demonstrate that I am working with a pristine NetBeans installation. Jump to 7:15 to get to the point where I believe the bug occurs.
Comment 6 Sergey Petrov 2013-02-01 05:23:55 UTC
will reevaluate with debug
Comment 7 Sergey Petrov 2013-02-13 08:45:37 UTC
I'm not sure why but action listener receive different events when selection works and when it doesn't work.
but I also don't like current behaviour when with open popup if I move selection with arrows selection is handled after each arrow click.
Comment 8 kwrobel 2013-02-13 14:20:59 UTC
That is also something I noticed and found quite annoying as I'm using the keyboard quite a bit. Thanks for noticing that.
Comment 9 Martin Balin 2015-09-17 13:10:11 UTC
Report from old NetBeans version. Due to code changes since it was reported likely not reproducible now. Feel free to reopen if happens in 8.0.2 or 8.1.