我正在使用 JiBX 来编组一些类。它运作良好,直到我得到一个IllegalStateException
java.lang.IllegalStateException: Missing required object
at org.jibx.runtime.impl.MarshallingContext.pushObject(MarshallingContext.java:1181)
at com.dreipplus.profiler.importer.binding.trans.JiBX_binding0MungeAdapter.JiBX_binding0_marshalAttr_1_18()
at com.dreipplus.profiler.importer.binding.trans.JiBX_binding0RoomProductVO_access.marshal()
at com.dreipplus.profiler.importer.binding.trans.LibRoomObjectImport.JiBX_binding0_marshal_3_0(LibRoomObjectImport.java)
at com.dreipplus.profiler.importer.binding.trans.JiBX_binding0LibRoomObjectImport_access.marshal()
at com.dreipplus.profiler.importer.binding.trans.LibRoomObjectImport.marshal(LibRoomObjectImport.java)
at com.dreipplus.profiler.importer.binding.trans.JiBX_binding0MungeAdapter.JiBX_binding0_marshal_1_3()
at com.dreipplus.profiler.importer.binding.trans.LibraryImport.JiBX_binding0_marshal_2_0(LibraryImport.java)
at com.dreipplus.profiler.importer.binding.trans.JiBX_binding0LibraryImport_access.marshal()
at com.dreipplus.profiler.importer.binding.trans.LibraryImport.marshal(LibraryImport.java)
at com.dreipplus.profiler.importer.binding.trans.JiBX_binding0MungeAdapter.JiBX_binding0_marshal_1_0()
at com.dreipplus.profiler.importer.binding.trans.Libraries.JiBX_binding0_marshal_2_0(Libraries.java)
at com.dreipplus.profiler.importer.binding.trans.JiBX_binding0Libraries_access.marshal()
at com.dreipplus.profiler.importer.binding.trans.Libraries.marshal(Libraries.java)
at org.jibx.runtime.impl.MarshallingContext.marshalRoot(MarshallingContext.java:1021)
at org.jibx.runtime.impl.MarshallingContext.marshalDocument(MarshallingContext.java:1083)
at com.dreipplus.profiler.library.LibraryTest.testExportLibrary(LibraryTest.java:186)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:70)
xml 输出停止在另一个(更远的)位置(也许它没有被刷新):
...
<objectsmaterial>
<material>
<name>
<localizedtext size="1">
<entry key="de_AT">Furnier Kanadische Ahorn</entry>
</localizedtext>
</name>
<longtext>
<localizedtext size="1">
<entry key="de_AT">
[EOF]
usage="optional"
没有设置有问题吗?JiBX 是否期望一个不存在的字段?我在 JiBX 上缺少调试输出,但这已经被报告为他们的 JIRA 中的一个错误。
如果有人知道出了什么问题,或者我如何找出问题所在,请!
这里我的 binding0.xml binding0.xml pastebin
提前致谢
弗洛里安·胡贝尔