开发者

jibx: Missing required object exception

I'm useing JiBX to marshall some Classes. It works well, until i get a 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)

The xml output stops at an other (further) position (maybe it get's not flushed):

...         
<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]

Is it a problem with usage="optional" not set? Is JiBX expecting a field with doesn't exist? I'm missing debug output on JiBX but this is already reported as a bug in their JIRA.

if anybody has an idea what's wrong, or how I can find out whats wrong, please!

开发者_如何学Python

Here my binding0.xml binding0.xml pastebin

Thanks in advance

Florian Huber


The IllegalArgumentException occours if a field is null, if it has (XML-)Subelements.

I doublechecked the code and I found the bug.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜