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.
Product Version = NetBeans IDE 7.2 (Build 201207171143) Operating System = Windows 7 version 6.1 running on x86 Java; VM; Vendor = 1.7.0_07 Runtime = Java HotSpot(TM) Client VM 23.3-b01 I get an error (the window shows blank, just OK button). Hopefully the log is useful. If needed I can provide the sources I'm using.
Created attachment 126086 [details] IDE log
yes, please provide some detail about entities, either way to create or code itself. it will help both for issue evaluation and for possible fix verification.
or just a link to sql script+which one entity to use. I see com.sun.tools.javac.code.Symbol$CompletionFailure: class file for RiskControlHasRequirement not found in log, is it the one entity to try?
Created attachment 126106 [details] MySQL script RiskControlHasRequirement is one of the ones I had issues with. See the attached SQL file. I was able to create those on build 201210170002
RiskControlHasRequirement is a join table and ide do not generate entity for this table, I can't try to generate jpa controller for RiskControlHasRequirement with attached script, are you sure sql is correct?
Script is correct. Maybe that's part of the issue. It might have showed as an option in the wizard and had trouble at implementation time?
ok, I have similar problem for this schema and it's random for me and happens if generate a lot of controllers at once(for all entities). but I can't reproduce initially reported because IDE do not allow to create RiskControlHasRequirement and it's not listed later in controllers's wizard. How this entity was generated?
can't reproduce in maven.web also as still can't create this entity and it's not shown in jpacontroller wizard as expected for absent entity. may you have this entity somewhere on classpath in your project dependencies? do you have any simple steps from project creation up to controller generation, is it reproducible for you in new projects?
as one more attempt, can you provide full set of steps like 1. create new project {type} {name} with next {options}(frameworks, ee level etc) with next {server}/{no server}, {dependencies} 2. select some {node}, invoke entities from db, select {connection with what options?}?{datasource with what url/options?} 3. select {some}/all entities and step and step, {such} options in a {package} how RiskControlHasRequirement is shown in the wizard/sceenshots. 4. invoke JpaController wizard on a {node} screen of entities selection panel, is there anything interesting, is there RiskControlHasRequirement, is there RiskControlHasRequirement somewhere in the project, 5. select what entities? is RiskControlHasRequirement selected? {package}, other possible ideas? and finish. "the window shows blank," what window? exception dialog or a wizard or? "I was able to create those on build 201210170002" is it about RiskControlHasRequirement entity, was it created even if it was shown as join or it wasn't shown as jin table?
What I meant is that it worked fine with the build 201210170002 without making any changes to the source/project. I'll try to recreate with a new project and provide your requested steps in a bit.
1. create new project Maven Web Application Apache Tomcat Server Java EE 6 Web (Everything else is default) 2. select the default node (based on the values in the wizard), invoke entities from db, select validation manager connection (jdbc:mysql://localhost:3306/validation_manager?zeroDateTimeBehavior=convertToNull [root on Default schema]) as created by the IDE connecting from MySQL server. 3. select all entities, Collection type:List, everything else default (see pictures for details). Click Finish Ran on issue on report 194794, issue 221773 at this point. Unable to proceed. 4. invoke JpaController wizard on the default node (based on the values in the wizard). 5. Select all entities (See pictures for details). Click finish. Will upload pictures in a bit.
Created attachment 127432 [details] Wizard step 1
Created attachment 127433 [details] Wizard step 2
Created attachment 127435 [details] Wizard step 3
I'll try to repeat tomorrow. Time to go home now.
ok, thanks, the only problem if there was issue 221773 in between, it may cause also inconsistent state and other issues, in this case this one isnt independent and may not be an issue as tries to generate code on corrupted entities (may be).
From screenshots I see RiskControlHasRequirement isn't recognized as join table and have 'new' generation option. in this case my comment above about inconsistent state isn't applied to the issue. Can you generate RiskControlHasRequirement separately?
Created attachment 127451 [details] how it shoud be join table - have no class name and grayed. also it have 'new' option but it doesn't matter.
few more questions - - do you use bundled mysql jdbc driver? - what mysql version do you use? - can you create and attach db schema?
(In reply to comment #19) > few more questions - > - do you use bundled mysql jdbc driver? Bundled > - what mysql version do you use? 5.5.27 MySQL COmmunity Server > - can you create and attach db schema? Do you mean a NetBeans schema? If so, I will in a bit. I'm downloading today's build to retry the creation and creating that one alone and see how it goes.
(In reply to comment #18) > Created attachment 127451 [details] > how it should be > > join table - have no class name and grayed. also it have 'new' option but it > doesn't matter. This is what I expected as well.
Corrected NetBeans version.
Created attachment 127480 [details] Requested schema
I was able to create RiskControlHasRequirement on its own.
I see attached sql contain no version for requienment in risk_control_has_requirenment and attached schema contain this part. It's important to have actual data in the issue if sql is obsolete. It may be the issue, also attache schema contain 3 out of 4 columns in promary key for risk_control_has_requirenment, schema may not be solid. It still may be another issue if persistence can or not to generate an entity in this case for this table.
Created attachment 127516 [details] Updated script You were right about the missing version in that table. I looked at the MySQL workbench model and it was missing there as well. (This is a known bug for Workbench I already reported). I fixed that and attached updated script.
with new script still have 'join column' for RiskControlHasRequirement RiskControlHasRequirement, and fk in generated schema are different, in attached above fk do not contain version properly and it's the case when RiskControlHasRequirement can't be considered as join table.
Created attachment 127786 [details] Updated script
Created attachment 127787 [details] Updated script Updated script with that fix. I found another instance with the same type of issue. Hopefully is due to this errors in the design. Should the creation check for this irregularities as well?
Schema validation may be a good option but is not an issue in my opinion(but depends on issues it may cause), currently schema is used as is. Anyway is schema is wrong it's main reason, fail-save behaviour of persistence module is secondary issue and may be db should check consistency too and in first place it's hard to implement complex logic on any client if db allow some irregularity. So what script should I use, tried latest one and still have join table, have you tried it?
have you tried to generate entities from attached schema and jpa controller later? Just tried it, and RiskControlHasRequirement is generated(as expected in my opinion) and also I got JPAController for RiskControlHasRequirement generated without any problems. I'm using latest daily, but it may not be the reason I can't reproduce the problem. Some information may be still missed, script/schema may not match properly or anything else.
I'll update the attachments (script and schema) in a bit, specially obsoleting some of them. I'll get back to you in a bit.
Created attachment 127803 [details] Updated script Tested script.
Created attachment 127804 [details] Schema Schema matching the script. Everything worked fine. Looks like a bad design as input. The class didn't show up so I guess it was processed correctly. Should I open an RFE for the schema check or can you guys do it? Probably you have more technical information due to this investigation.
This one can be turned into rfe and subj may need to be updated as it already have some comments/investigation. Also regarding schema verification, it's better to have specific use-case(not a cmmon words like 'verify schecma support'), what wrong schema case is good to consider as wrong and what to produce in this case, I suppose it shouldn't be blocking behaviour but wizard may warn some relationships/tables are looking suspicious.
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss