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 181159 - Create Entity from Database Wizard
Summary: Create Entity from Database Wizard
Status: RESOLVED DUPLICATE of bug 182258
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 6.x
Hardware: PC Windows 7 x64
: P3 normal (vote)
Assignee: Sergey Petrov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-24 10:26 UTC by rogerappl
Modified: 2010-04-02 11:03 UTC (History)
0 users

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 rogerappl 2010-02-24 10:26:29 UTC
trying to create the datasource for the EJB fails to create the datasource.  It collects all the info and says - creating datasource - but the datatsource never appears.  No configurations files are created (web.xml, sun-web.xml) the datasource in the sun-resources.xml is created correctly.  This is 6.8 NB with all the latest patches installed.
Comment 1 rogerappl 2010-02-24 12:20:02 UTC
I have verified this issue with Vista x64 using NB 6.8 patch1 - same problem.

I then move to NB 6.7.1 - and it worked fine.  I then took the NB 6.7.1 files and opened them with 6.8 - none of the datasources showed up in the EJBs (using the Create Entity Bean Wizard).  I also had issues with the execution of the EJBs - these may be linked as the EJB error was related to the driver for MySql as well (datasource is MySql in both cases).  I use the same NB6.8 at work with an Oracle database - and it seems to work fine - so I am beginning to suspect the MySql Drivers (or their integration) (Oracle ojdbc6.jar).  I am using the visual web - but the war files seem to be fine.  The issue with the execution is under 181047.

I have also noticed that the interface throws up and error related to the renaming of attributes.xml in the var directory.  The system has full privs to these directories - so not a permissions issue.

My system is an HP dv8t with the quad core (8 virtual - Intel i7) 8 Gb of RAM and 1 Tb of disk space.  I have MySql 5.1.43 x64.  The OS is Windows 7 Pro x64.
Comment 2 rogerappl 2010-02-25 02:18:52 UTC
I spent another hour or so looking into this - the result is this:

Create the datasource in the wizard - it will not be available.  Close the wizard and deploy the application to the web server (make sure the deployment of the descriptors is checked) - it will deploy the descriptors to the web server - after they are deployed - they will be visible in the wizard.  Now you can create the entity beans.

I assume that if I cad used the server admin to create the datasources manually - they would probably have appeared (but what is an IDE for if not to assist in the grunt work)
Comment 3 Sergey Petrov 2010-02-25 04:00:43 UTC
what data collection do you mean? What kind of project have you tried and what server?
If I use Entity from Database Wizard and choose new datasource it ask for name only and database connection? It also is created in sun-web.xml if gf3 is used and project is web project and in sun-resources.xml in case of ejb project.
Comment 4 rogerappl 2010-02-26 02:54:06 UTC
Sergey,
I used glassfish 2.1.1, jdk6_18 and it was a a j2ee application with EJB and Web (Enterprise)  I have the Visual web installed as well.  I have also updated with patch 1.  I was using the default MySql driver and connection to the MySql DB.  I have a lot of strange things going on in windows 7 x64.  Both in EJB and WEB.  I use this with Oracle and it seems fine (I have a huge app in Oracle) - but issues with rowsets and such (missing classes mostly - which I can see in the driver jar).  The jdk and db are both 64 bit.  As I mentioned - if I run this and create the datasources in glassfish - they will appear.  I guess datasource needs defined - jdbc (JNDI)driver and connection pool.
Comment 5 Sergey Petrov 2010-02-26 03:04:25 UTC
ok, may be it's win7-64 specific issue, but need to be verfied with gf2.1 also.
just to make steps more clear, 
- did you use "new datasource" in drop down for datasources in entity from db wizard?
"j2ee application with EJB and
Web (Enterprise)"
- which one was used to invoke "entity from db": j2ee application/ejb/web?
Comment 6 rogerappl 2010-02-26 23:31:18 UTC
I started with an empty app and tried to use the new data source - what happened was that the source was not available.  It was not shown in the list either.  The sun-resources.xml was created and the source was there - when I ran the app - the sources were created in the web server and then they were available in the list.  I also did the same on my Vista machine (both machines are 64 bit OS) - with the same results (I do not trust Windows 7 yet).  It seems to me that the link to the sun-resources.xml is where the problem is likely to be.  Once the source was created in the web server - the problem went away.  I did the same in the war section and it worked fine - only the EJB section had this issue.  I have only tried this with MySql so far.  I may try to download the latest version as a whole - my install was upgraded using the plugin updates.
Comment 7 Sergey Petrov 2010-04-02 11:03:46 UTC
likely is the same as 182258

*** This bug has been marked as a duplicate of bug 182258 ***