Re: Getting MDR 4.0 working with TCK

Martin Matula <[email protected]> Sun, 24 Oct 2004 22:47:08 +0200
Newsgroups gmane.comp.java.netbeans.modules.mdr.devel
Message-ID <[email protected]>
Hi Brian,
the instructions on how to run JMI TCK with MDR can be found at 
http://mdr.netbeans.org/jmitck.
Regards,
Martin


Brian Topping wrote:

>Hi Martin & Co.
>
>I'm trying to get the JMI TCK working against the MDR 4.0 sources, but not
>having much luck.  I think I usually get an NPE on all the tests except the
>SignatureTest.  Since MDR still works, I'm guessing it's in the interface to
>the TCK.  I updated it as best I could and attached it here.  It is loading
>the test MOF input files and generating the first dozen or so lines of the
>classes in the output directory but dies on every test as in this stack
>trace:
>
>DEBUG [20 Oct '04 7:09:01] - metamodel=cz.tst.Cluster
>DEBUG [20 Oct '04 7:09:01] - xmi import path=metamodels/cz/tst/Cluster.xml
>ERROR [20 Oct '04 7:09:01] - 
>java.lang.NullPointerException
>	at java.util.Hashtable.get(Hashtable.java:333)
>	at
>org.netbeans.lib.jmi.mapping.GenericMapper.getTypeName(GenericMapper.java:185
>)
>	at
>org.netbeans.lib.jmi.mapping.JavaMapper.structureTemplate(JavaMapper.java:107
>0)
>	at
>org.netbeans.lib.jmi.mapping.GenericMapper.visitRefObject(GenericMapper.java:
>353)
>	at
>org.netbeans.lib.jmi.mapping.GenericMapper.visitRefObject(GenericMapper.java:
>330)
>	at
>org.netbeans.lib.jmi.mapping.GenericMapper.visitRefPackage(GenericMapper.java
>:384)
>	at
>org.netbeans.lib.jmi.mapping.GenericMapper.visitRefBaseObject(GenericMapper.j
>ava:392)
>	at
>org.netbeans.lib.jmi.mapping.JMIMapperImpl.generate(JMIMapperImpl.java:57)
>	at
>org.netbeans.mdr.jmitck.OldNBMDRGenerator.generateJMI(OldNBMDRGenerator.java:
>318)
>	at
>org.netbeans.mdr.jmitck.OldNBMDRGenerator.generate(OldNBMDRGenerator.java:137
>)
>	at
>com.sun.jmitck.MetamodelLoader.loadIfNecessary(MetamodelLoader.java:96)
>	at
>com.sun.jmitck.mapping.JmiMappingTestScript.setupIfNecessary(JmiMappingTestSc
>ript.java:93)
>	at
>com.sun.jmitck.mapping.JmiMappingTestScript.runScript(JmiMappingTestScript.ja
>va:51)
>	at com.sun.jmitck.JmiScript.run(JmiScript.java:70)
>	at com.sun.javatest.Script.run(Script.java:220)
>	at com.sun.javatest.Harness.runTest(Harness.java:648)
>	at com.sun.javatest.Harness.access$800(Harness.java:33)
>	at com.sun.javatest.Harness$2.run(Harness.java:748)
>INFO [20 Oct '04 7:09:01] - === Test Completed
>(mapping/cz/tst/testpackage1/SubclassClass.html/Test48) <<<<
>
>I've attached the Generator I cooked up from what's in the TCK.  Summary of
>changes were to take the generator class out of the loader loop; I think I
>understand the use of MetaInfServicesLookup now and it didn't look compatible
>with the code that was in the Generator.  Otherwise, just went through and
>converted to using the static getInstance interfaces on the four points the
>Generator grabs classes from the MDR classpath.  It seems like it wouldn't be
>loading the MOF if it was really bad, but I'm not sure.
>
>Thanks a bunch for any time you can make for this.
>
>-b
>  
>