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 number: 200405251800 MDR : Standalone Platform : Windows 2003 Java : JDK 1.4.2 (Sun) My highly multithreaded application on top of a single repository suffers from random NPE thrown by MDR when 2 or more threads access the model to read data. Each thread starts its own transaction. The first thread reading objects doesn't encouter any problem, but at some point, the following threads tend to report random NPE when accessing both atttributes and references. MDR also fails to retrieve objects using their MOF ID and returns a null reference as for a non existing object. hence, an attribute, a reference or a Classifier may not be found also it clearly exists. For example, when requesting an attribute's type, MDR will sometimes returns null. Or, even, this attributes may not be found by MDR. This doesn't happen when opening the MDR for update as my application holds in this case a Write lock. I've managed to avoid those NPE by protecting MDR sections with a mutex which forces serialized accesses to MDR. And as I'm protecting each MDR call with a mutex, I'm having less and less NPE or null objects returned. Here are some NPE (or DebugException) and stacktraces that are thrown without protecting MDR with a mutex : Caused by: org.netbeans.mdr.util.DebugException at org.netbeans.mdr.storagemodel.StorableAssociation. checkType(StorableAssociation.java:361) at org.netbeans.mdr.handlers.InstanceHandler._handleG etR(InstanceHandler.java:110) at javax.jmi.model.AssociationEnd$Impl.getContainer (Unknown Source) at org.netbeans.jmiimpl.mof.model.AssociationEndImpl. otherEnd(AssociationEndImpl.java:35) at javax.jmi.model.AssociationEnd$Impl.otherEnd (Unknown Source) at org.netbeans.jmiimpl.mof.model.ExposesImpl.getExpo sedEnd(ExposesImpl.java:62) at javax.jmi.model.Exposes$Impl.getExposedEnd (Unknown Source) at javax.jmi.model.Exposes$Impl._query (Unknown Source) at org.netbeans.mdr.handlers.InstanceHandler._handleG etR(InstanceHandler.java:106) at javax.jmi.model.Reference$Impl.getExposedEnd (Unknown Source) Caused by: java.lang.NullPointerException at org.netbeans.jmiimpl.mof.model.AssociationEndImpl. otherEnd(AssociationEndImpl.java:35) at javax.jmi.model.AssociationEnd$Impl.otherEnd (Unknown Source) at org.netbeans.jmiimpl.mof.model.ExposesImpl.getExpo sedEnd(ExposesImpl.java:62) at javax.jmi.model.Exposes$Impl.getExposedEnd (Unknown Source) at javax.jmi.model.Exposes$Impl._query (Unknown Source) at org.netbeans.mdr.handlers.InstanceHandler._handleG etR(InstanceHandler.java:106) at javax.jmi.model.Reference$Impl.getExposedEnd (Unknown Source)
Should be fixed. Added missing implicit read transactions to query operations implementation.