[Bug 224732] New: Erroneous J2EE hints/warnings when not using J2EE project.

  • From:
  • To:
  • Subject: [Bug 224732] New: Erroneous J2EE hints/warnings when not using J2EE project.
  • Date: Fri, 11 Jan 2013 00:57:49 +0000
  • Auto-submitted: auto-generated

http://netbeans.org/bugzilla/show_bug.cgi?id=224732

             Bug #: 224732
        Issue Type: DEFECT
           Summary: Erroneous J2EE hints/warnings when not using J2EE
                    project.
    Classification: Unclassified
           Product: editor
           Version: 7.2.1
          Platform: PC
        OS/Version: Windows 7
            Status: NEW
          Priority: P3
         Component: Hints & Annotations
        AssignedTo: 

        ReportedBy: 

         QAContact: 



When using the javax.persistence.Entity and javax.persistence.NamedQuery
annotations in a class in a non-J2EE project, the editor produces all sorts of
errors such as:

- The project does not contain a persistence unit

- An entity or Id class should implement the Serializable interface

- The setter method for a persistent attribute should not be private

and so forth.

These warnings should only show in a J2EE project, and I'm not certain that
they are altogether valid even then, in all cases.  However, there seems to be
absolutely no way to disable them, as the IDE provides for every other kind of
hint.   This is extremely frustrating and clutters up the code.  There should
most definitely be an option to disable these.

An example of a valid use case is using Hibernate in a stand-alone application
in which the Hibernate context is set up manually.  There is no persistence
unit ever instantiated - Hibernate just uses these annotations as markers.

Further, recent versions of the very popular Spring framework seem to also be
causing these hints to trigger, as they define their own PU (again,
programatically, behind the scenes, not in the project).

It seems that the hints assume some very rigid things about how your project 
is
set up, complain when your project does not conform to those expectations, and
does not provide a way to disable the hints.

-- 
Configure bugmail: http://netbeans.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.


[Bug 224732] New: Erroneous J2EE hints/warnings when not using J2EE project.

dave . trombley 01/11/2013

[Bug 224732] Erroneous J2EE hints/warnings when not using J2EE project.

jlahoda 01/11/2013

Project Features

About this Project

Editor was started in November 2009, is owned by Martin Ryzl, and has 147 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close