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.
Summary: | Warn the user if they are using JPA 2.0 with JDK 5 source/binary format | ||
---|---|---|---|
Product: | javaee | Reporter: | Petr Jiricka <pjiricka> |
Component: | Persistence | Assignee: | Sergey Petrov <sj-nb> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | kganfield |
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Petr Jiricka
2010-03-04 09:02:24 UTC
In real even 2.0 version will be used by default user can change it to 1.0 manually in persistence.xml and use only 1.0 features. do you have any suggestion on message? like "For jpa 2.0 it's recommended to have source level set to jdk6, your current level is {0}"? Yes, something like that. How about: "Source level 1.6 is recommended for JPA 2.0 (currently it is set to {0})" Cc'ing Ken as the native speaker - Ken, what do you think? Is this a warning dialog or a message in the wizard? It could say something like this? "Source level 1.6 is recommended for JPA 2.0. The source level for this project is currently {0}." If the message is in the wizard, then maybe the first sentence is enough. If the message is in a dialog, the dialog could also have a sentence that says "You can change the source level in the project's Properties window." I don't see a good way to get source.level from persistence side, especially it may be realized differently in any based and in maven based projects. Is it late to add something like PersistenceProjectPropertiesProvider to j2ee.persistenceapi? (after feature freeze) miss prev comment, it's a message in wizards, will have "warning" view and will not block wizard. > I don't see a good way to get source.level from persistence side
How about SourceLevelQuery in module api.java? Would that help?
Thanks, it should work, not sure why I miss it as it's used by persistence already. Integrated into 'main-golden', will be available in build *201003200200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/6a3f23303539 User: Sergey B. Petrov <sj-nb@netbeans.org> Log: fix #181531 new provider added Integrated into 'main-golden', will be available in build *201003210200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/a3ae01110ac4 User: Sergey B. Petrov <sj-nb@netbeans.org> Log: fix #181531 - part fix, removed unnecessary implementation, also should work in most(all) projects now Integrated into 'main-golden', will be available in build *201003230200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/06accdfa2db2 User: Sergey B. Petrov <sj-nb@netbeans.org> Log: fix #181531 - warning is added to entity from db wizard This error message is only useful for NetBeans gurus. As a reasonably competent developer (and native English speaker) but NetBeans newbie, I have no idea what to do with it. For starters, I have no idea what "Source level 1.6" is supposed to refer to. If you said "JDK 1.6" or "Java EE 6 SDK", I would know what you are talking about. Even once I figure out what it means, I don't know how to fix it. The error message should give some hint of what to do about it. If the desire is to keep the error message terse, a lengthier explanation should be in the help file. Personally, I have JDK 1.6 installed, not JDK 1.5. I suspect, therefore, that this error message is a false alarm. I'm running NetBeans IDE 6.9 Beta in Vista, going through the NetBeans Platform CRUD Application Tutorial. http://platform.netbeans.org/tutorials/nbm-crud.html it's not false alarm as moist projects have 1.5/jdk5 source level by default. but it may have sense to review the message. Right. ekenschaft, the fact is that even if you have JDK 6 installed, you may want to target your application to run on JDK 5, and that's what the IDE does by default when you create a project. (For Maven it is even less, Maven by default targets 1.3.) To change this, go to the project's Properties dialog, Sources category, and change the Source/Binary Format to JDK 6. How would you change the message to be more understandable? Thanks. |