我正在尝试使用<!--Source JLabel srcLabel-->
JLabel dest = new JLabel();
dest.paint(srcLabel.getGraphics());
panel.add(dest);
dest.validate();
从OpenGL API Registry的RelaxNG架构生成JAXB绑定。它正在抛出一个xjc
:
NullPointerException
我的类路径中是否还缺少其他内容?
我知道RelaxNG支持是实验性的,所以也许它只是破碎了。作为解决方法,我使用Trang将模式转换为XSD:
$ xjc -cp jaxb-extra-osgi-2.2.7.jar -relaxng-compact registry.rnc
parsing a schema...
Exception in thread "main" java.lang.NullPointerException
at com.sun.tools.internal.xjc.reader.Ring.get(Ring.java:82)
at com.sun.tools.internal.xjc.model.CPropertyInfo.<init>(CPropertyInfo.java:110)
at com.sun.tools.internal.xjc.model.CSingleTypePropertyInfo.<init>(CSingleTypePropertyInfo.java:57)
at com.sun.tools.internal.xjc.model.CAttributePropertyInfo.<init>(CAttributePropertyInfo.java:58)
at com.sun.tools.internal.xjc.reader.relaxng.ContentModelBinder.onAttribute(ContentModelBinder.java:119)
at com.sun.tools.internal.xjc.reader.relaxng.ContentModelBinder.onAttribute(ContentModelBinder.java:55)
at com.sun.xml.internal.rngom.digested.DAttributePattern.accept(DAttributePattern.java:58)
at com.sun.xml.internal.rngom.digested.DPatternWalker.onContainer(DPatternWalker.java:66)
at com.sun.xml.internal.rngom.digested.DPatternWalker.onGroup(DPatternWalker.java:87)
at com.sun.xml.internal.rngom.digested.DPatternWalker.onGroup(DPatternWalker.java:51)
at com.sun.xml.internal.rngom.digested.DGroupPattern.accept(DGroupPattern.java:59)
at com.sun.tools.internal.xjc.reader.relaxng.RELAXNGCompiler.bindContentModel(RELAXNGCompiler.java:150)
at com.sun.tools.internal.xjc.reader.relaxng.RELAXNGCompiler.compile(RELAXNGCompiler.java:143)
at com.sun.tools.internal.xjc.reader.relaxng.RELAXNGCompiler.build(RELAXNGCompiler.java:108)
at com.sun.tools.internal.xjc.ModelLoader.loadRELAXNG(ModelLoader.java:592)
at com.sun.tools.internal.xjc.ModelLoader.loadRELAXNGCompact(ModelLoader.java:580)
at com.sun.tools.internal.xjc.ModelLoader.load(ModelLoader.java:151)
at com.sun.tools.internal.xjc.ModelLoader.load(ModelLoader.java:104)
at com.sun.tools.internal.xjc.Driver.run(Driver.java:318)
at com.sun.tools.internal.xjc.Driver.run(Driver.java:185)
at com.sun.tools.internal.xjc.Driver._main(Driver.java:108)
at com.sun.tools.internal.xjc.Driver.access$000(Driver.java:65)
at com.sun.tools.internal.xjc.Driver$1.run(Driver.java:88)