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.
Martin wrote: "In the current version of MDR you should get no exception from the generated bytecode directly. Send me the stacktrace if you are unable to track it down." [java] parser exception: java.lang.ClassCastException [java] java.lang.ClassCastException [java] at javax.jmi.model.IsOfType$Impl._add(Unknown Source) [java] [Model, ModelElement, name] [java] [Model, ModelElement] [java] [Model] [java] at org.netbeans.mdr.handlers.InstanceHandler._handleSetR(Instanc eHandler.java:127) [java] at org.netbeans.mdr.handlers.InstanceHandler._setReference(Insta nceHandler.java:55) [java] at org.netbeans.mdr.handlers.InstanceHandler.refSetValue(Instanc eHandler.java:272) [java] at org.brianlsmith.ssm.parser.ModelElementFactory.link(ModelElem entFactory.java:207) [java] at org.brianlsmith.ssm.parser.SsmRepositoryLoader.main(SsmReposi toryLoader.java:22)
Note, that this is very likely an error in my code and I merely reported it because Martin said that no exceptions should ever originate from the generated bytecode. The cause of the exception was code like this: void foo(Attribute attr, MofPackage pkg) { attr.refSetValue("type", pkg); } Obviously, this was an error in my code. But I believe that you need to check for TypeMismatchException before the generated bytecode is called (per Martin's comment quoted above).
You are absolutely right Brian. Thanks.
Should be fixed.