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.
Build: 200604110200 I;m editing entity classes and it is almost impossible to work because of lots of Exceptions: INFORMATIONAL *********** Exception occurred ************ at 9:24 PM on Apr 13, 2006 java.lang.IllegalArgumentException: The bean property doesn't exist (bean= at org.netbeans.modules.j2ee.metadata.NNModelBuilder.setBeanProperties(NNModelBuilder.java:378) at org.netbeans.modules.j2ee.metadata.NNModelBuilder.addNNToModel(NNModelBuilder.java:139) at org.netbeans.modules.j2ee.metadata.NNModelBuilder.addMemberAnnotation(NNModelBuilder.java:73) at org.netbeans.modules.j2ee.metadata.NNListenerManager.memberAnnotationAdded(NNListenerManager.java:217) at org.netbeans.modules.j2ee.metadata.NNMDRPreChangeListener.eventAttributeSet(NNMDRPreChangeListener.java:114) at org.netbeans.modules.j2ee.metadata.NNMDRPreChangeListener.change(NNMDRPreChangeListener.java:58) at org.netbeans.mdr.util.EventNotifier$EventsDelivery.run(EventNotifier.java:270) at java.lang.Thread.run(Thread.java:620) Caused by: java.lang.NoSuchMethodException: org.netbeans.modules.j2ee.persistence.dd.orm.model_1_0.ManyToOne.setCascade(java.lang.String) at java.lang.Class.getMethod(Class.java:1592) at org.netbeans.modules.j2ee.metadata.NNModelBuilder.setBeanProperties(NNModelBuilder.java:374) ... 7 more
Created attachment 29851 [details] messages log
This is partially caused by a bug in the NNModelBuilder, but it also depends on Issue #74633 ... the ORM schema file is obsolete - for @OneToMany(cascade) attribute the schema claims that the attr. value is just a single CascadeStyle value. In spite of that the @OneToMany annotation and the JSR220 spec claims it is an array of CascadeStyle values. I will do some fixes in my code now, but the issue wont be fixed until the #74633 is resolved.
*** Issue 75610 has been marked as a duplicate of this issue. ***
this issue seems to be already fixed. if you can reproduce it still, feel free to reopen
*** Issue 77791 has been marked as a duplicate of this issue. ***
XSDs are updated. This issue is still reproducible. Now the problem is not in completely missing setCascade method, but in wrong parameter type.
I just removed handling of OneToMany.setCascade in NNModelBuilder, because with all those exceptions other logs in console are totally lost. It must rollbacked once this issue is fixed. /cvs/j2ee/metadata/src/org/netbeans/modules/j2ee/metadata/Attic/NNModelBuilder.java,v <-- NNModelBuilder.java new revision: 1.1.2.25; previous revision: 1.1.2.24
I rolled-back last commit and changed error handling for all unsupported methods. http://j2ee.netbeans.org/source/browse/j2ee/metadata/src/org/netbeans/modules/j2ee/metadata/NNModelBuilder.java?r1=1.1.2.26&r2=1.1.2.27
Since Martin has reduced the exceptions just to one line messages printed into console (not lousing up the output so much) and we won't implement all possible annotation to model mappings (which basically means that the messages doesn't imply that something won't work) I am downgrading this to P3. Once I remove all the info messages I'll close this issue entirely.
already fixed - the NNModelBuilder supports setting just of String-type annotation atttributes to the BaseBean-s. If the annotation attribute has a different type the MDR event is ignored. In such case, if any client needs the metadata defined by this annotation attribute a custom NNListener code has to be created for each particullar case.