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.
Steps to reproduce: 1) mount kawt_midp.zip (http://www.trantor.de/kawt/) 2) browse java.* package (or CompileAll on java package) 3) see an exception Reason: ClassDataObject uses InstanceSupport but there is a special hack in java.lang.ClassLoader which prevents InstanceSupport from working with J2ME classes. ClassLoader throws a SecurityException if someone tries to load classes from packages java.* (all subpackages of java), the exception is propagated to ClassDataObject (I'm not sure if JavaDataObject has the same problem too) and there is not handled. Public API of J2ME (CLDC) is subset of J2SE, but it also contains private (package private) classes which are not part of J2SE (null classloader) but must be loaded from filesystem (NbClassLoader) and it causes the exception. Possible solution: 1) add check for SecurityException into InstanceSupport.findClass and if it has been caused by a class from java. change it to ClassNotFoundException. 2) handle SecurityException in all classes that use InstanceSupport. In such a case it should be documented in InstanceCookie. it is not possible to fix NbClassLoader because ClassLoader.defineClass which causes the exception is final :(((
I'll convert SecurityException -> CNFE in both java & clazz modules. Still may be better if docs for InstanceSupport at least mention such possibility.
Version: 'Dev' -> 3.2
Fixed in 3.2.12 & dev
[release32-23] Verified
Target milestone -> 3.2
Resolved for 3.4.x or earlier, no new info since then -> closing.