4
我正在使用JiBX來編組一些類。它工作得很好,直到我碰到一個IllegalStateException
jibx:缺少所需的對象異常
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
在此先感謝
弗洛裏安·胡貝爾,如果
我有相同的問題和解決方案(設置非空引用「所需」字段)。謝謝@itshorty –