Tomasz Slota's Weblog
« November 2009
MonTueWedThuFriSatSun
      
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
      
Today

XML

the links

Skype Me™!
View Tomasz Slota's profile on LinkedIn



All | NetBeans | Personal | Sun

20060309 Thursday March 09, 2006

Java EE 5 verification in Netbeans 5.5 I can eventually show off with a self-implemented piece of NB functionality: Java EE 5 Verification - a framework for finding & solving problems in Java code that uses EJB 3.0, Persistence API and JAX-WS 2.0 annotations. Similary to java syntax errors, the JEE 5 problems are detected and highlighted as you type. There are 'quick-fix actions' (hints) available for many of them. Just as in case of ordinary java errors, those actions can be accessed by clicking the bulb icon that pops up when the cursor position is within the line that contains error. Together with advanced code completion, online help and wizards this facility should make NetBeans 5.5 a terrific learning tool for folks starting up with Java EE 5.

Assertions implemented as of build 'release55_20060309':

Persistence API (JSR 220)

AssertionHints
InconsistentAccessTypeInEntityUnify property access, Unify property access
EntityHasNoSuitableAccessorEncapsulate field...
Missing Enity IDCreate Entity ID...
EntityHasPublicField (warning)
FinalClassAsEntity
NonPublicClassAsEntity
FinalMemberInEntity
NoSuitableConstructorInEntity
SetterMethodsAnnotatedInEntityMove persistence annotations from setter to getter
InvisiblePropertyAccessorInEntity

JAX-WS 2.0

AssertionHints
the serviceName attribute is not allowed on interfacesRemove serviceName attribute
the endpointInterface attribute is not allowed on interfacesRemove serviceName attribute
it is not possible to annotate a method with the @Oneway annotation without corresponding @WebMethod annotationAdd @WebMethod annotation, Remove @Oneway annotation
an operation marked @Oneway may not have a return valueRemove @Oneway annotation
an operation marked @Oneway may not have out/in-out parametersRemove @Oneway annotation
an operation marked @Oneway must not declare any exceptionsRemove @Oneway annotation
it is not allowed to combine @HandlerChain annotation with @SOAPMessageHandlers annotationRemove @HandlerChain annotation, Remove @SOAPMessageHandlers annotation
None of the EJB3-specific checks has been implemented so far, however the final list of assertions and hints in all the three areas is to be substantially expanded by the final NB 5.5 release. Posted by tomslot ( Mar 09 2006, 07:55:40 PM CET ) Permalink Comments [4]

Trackback URL: http://blogs.sun.com/tomslot/entry/java_ee_5_verification_in
Comments:

Could you please also add checks for JSF errors, such as
  • undefined bean names in EL expressions
  • bean property errors in EL expressions
  • wrong bean types or property setters in faces-config.xml
Thank you, Cay Horstmann

Posted by Cay Horstmann on March 11, 2006 at 04:54 PM CET #

Hi, thanks for your feedback! I don't think we will be able to implement JSF checks for the 5.5 release, but I'll forward your request to the feature-planning team and it will be hopefully included in the future.

Posted by tomslot on March 13, 2006 at 10:34 AM CET #

Does it make sense to have some hint to prevent this deploy-time error:

The attribute [myAttribute] from the entity class [class org.myOrg.MyClass] does not specify a temporal type. A temporal type must be specified for persistent fields or properties of type java.util.Date and java.util.Calendar.

thanks,
-Alexis

Posted by Alexis MP on March 23, 2006 at 06:03 PM CET #

Hi, can you say me, bug "A temporal type must be specified for persistent fields or properties of type java.util.Date and java.util.Calendar"
has been resolved?

Posted by David Medina on July 09, 2009 at 12:18 AM CEST #

Post a Comment:

Name:
E-Mail:
URL:

Your Comment:

HTML Syntax: NOT allowed