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.

Bug 75033 - Lots of IllegalArgumentException while editing entity classes
Summary: Lots of IllegalArgumentException while editing entity classes
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: EJB (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Marek Fukala
URL:
Keywords:
: 75610 77791 (view as bug list)
Depends on: 74633
Blocks:
  Show dependency tree
 
Reported: 2006-04-13 20:26 UTC by wulgar
Modified: 2006-08-31 14:57 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
messages log (76.35 KB, application/x-compressed)
2006-04-13 20:27 UTC, wulgar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description wulgar 2006-04-13 20:26:35 UTC
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
Comment 1 wulgar 2006-04-13 20:27:40 UTC
Created attachment 29851 [details]
messages log
Comment 2 Marek Fukala 2006-04-26 13:30:58 UTC
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.
Comment 3 Marek Fukala 2006-04-27 13:35:06 UTC
*** Issue 75610 has been marked as a duplicate of this issue. ***
Comment 4 Jan Horvath 2006-05-22 16:48:10 UTC
this issue seems to be already fixed. if you can reproduce it still, feel free to reopen
Comment 5 Martin Adamek 2006-06-15 10:15:19 UTC
*** Issue 77791 has been marked as a duplicate of this issue. ***
Comment 6 Martin Adamek 2006-06-15 10:16:33 UTC
XSDs are updated. This issue is still reproducible. Now the problem is not in
completely missing setCascade method, but in wrong parameter type.
Comment 7 Martin Adamek 2006-06-15 17:36:50 UTC
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
Comment 8 Martin Adamek 2006-06-27 15:23:34 UTC
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
Comment 9 Marek Fukala 2006-06-28 11:08:43 UTC
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.
Comment 10 Marek Fukala 2006-08-31 14:57:20 UTC
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.