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.
I had many troubles getting JMI interface generation to work correctly with the existing build scripts, and wound up having to make a number of patches - also to the Ant task. Please check whether all Ant targets are really working as they should, in a fresh checkout of sources, and consider portions of the attached patch to correct problems. Problems I had included at least: - an NPE from MDRManagerImpl.refreshChildren: no layers available - no layers available because no modules had been loaded; module system not initialized (BTW why aren't you using META-INF/services for MDRManager?) - to load module system, need many more JARs - old JAR locations were wrong (after new build layout in the past year) - sample.xml messed up; should default to loading something useful, like the Java model - <instantiate> subtask always failed for me, saying the extent already exists (whatever that means) - need source="1.4" on all <javac> tasks; note that default is 1.5 on JDK 1.5, and your code was not 'enum'-clean
Created attachment 18997 [details] Possible patch (for a bunch of problems together)
Jesse, it is weird you had problems building mdrant and running jmi target in java/javamodel. It works for me. Layers and MDRManagerImpl should never be used since for the mdrant the standalone MDR is used which does not use layers (uses org.netbeans.mdr.NBMDRManager). The sample.xml was probably wrong but I don't know why you had to change other files. Could you please describe what you did exactly?
Sorry, I don't remember exact steps now, I did not write them down as I went. However I remember that getting the layer-based registration *was* required; MDRManagerImpl had a null field otherwise. At least for me. (I think I had the same results both from the command-line and inside the IDE.) If everything works for you using a clean checkout of sources, then I guess this can be closed.
The point is that the MDRManagerImpl from mdr/module should not be used (neither it should be on the classpath). In standalone mode NBMDRManagerImpl should be used. That one does not need layers (it is registered via META-INF/services). However, I've never tried to run the build from the IDE (I'm always building from the commandline) so maybe that does not work. I will try it out.
I am closing all reports in category Java/Unsupported as wontfix. These should be dead issues --- if the reported cases are against some live part of the NetBeans IDE please reopen and we can discuss to which category they belong.