Title: Message
Basically I have
a object which has HashMap of dbColumns and HAshMap of
tableProperties.
My binding.xml
is as follows. The data.xml is also attached.
When I try to
run the TestRoundTrip I get the following error
runbindings:
[jar] Building jar: C:\jibx\lib\runtimebindings.jar
runTest16:
[java]
org.jibx.runtime.JiBXException: Expected start tag, found end tag
"e
ntry" (line 14, col 48)
[java] at
org.jibx.runtime.impl.UnmarshallingContext.toStart(Unmarshall
ingContext.java:489)
[java] at
org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(U
nmarshallingContext.java:2561)
[java] at
org.jibx.custombindings.HashMapper.unmarshal(HashMapper.java:
157)
[java] at
example16.DBTable.JiBX_jibx_tutorial_example16_binding_unmars
hal_1_0(DBTable.java)
[java] at
example16.JiBX_jibx_tutorial_example16_bindingDBTable_access.
unmarshal()
[java] at
org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(U
nmarshallingContext.java:2568)
[java] at
org.jibx.custombindings.HashMapper.unmarshal(HashMapper.java:
157)
[java] at
example16.DBModel.JiBX_jibx_tutorial_example16_binding_unmars
hal_1_0(DBModel.java)
[java] at
example16.JiBX_jibx_tutorial_example16_bindingDBModel_access.
unmarshal()
[java] at
org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(U
nmarshallingContext.java:2568)
[java] at
org.jibx.runtime.impl.UnmarshallingContext.unmarshalDocument(
UnmarshallingContext.java:2736)
[java] at
org.jibx.extras.TestRoundtrip.runTest(TestRoundtrip.java:86)
[java] at
org.jibx.extras.TestRoundtrip.main(TestRoundtrip.java:140)
[java] Error round-tripping class:
example16.DBModel
[java] with input file
example16/data.xml and output compared to
example16
/data.xml
[java] Saved output
document file path C:\jibx\tutorial\temp.xml
BUILD
FAILED
file:C:/jibx/tutorial/build.xml:346: Java returned:
1
Any inputs or
suggestions ?
Thanks in
Advance
Sudhi
<!--
This document acts as bindings document for marshalling and unmarshalling StcdbDatabaseModel
@version :$Revision: $
@author Sudhi Seshachala
-->
<binding>
<mapping class="java.util.HashMap" name="map"
marshaller="org.jibx.custombindings.HashMapper" unmarshaller="org.jibx.custombindings.HashMapper"/>
<mapping name="stcdbDatabaseModel" class="com.stc.stcdbeway.repository.impl.StcdbDatabaseModelImpl">
<value style="attribute" name="name" field="name"/>
<value style="attribute" name="description" field="description"/>
<!--
sourceOtd is of type RepositoryObject
How do we store this ? We could store as refid,
whenever we want repository, we might get the
active repository and get the relevant repositoryobject. But I am not really sure about this one
-->
<!-- <value style="attribute" name="sourceOtd" field="sourceOtd"/> -->
<!-- <structure field="tables" name= "map"
marshaller="org.jibx.custombindings.HashMapper" unmarshaller="org.jibx.custombindings.HashMapper"/> -->
<structure field="tables" />
</mapping>
<mapping name="stcdbTable" class="com.stc.stcdbeway.repository.impl.StcdbDBTableImpl">
<value style="attribute" name="name" field="name"/>
<value style="attribute" name="javaName" field="javaName"/>
<!--
We need to handle this
<value style="attribute" name="parent" field="parent"/>
-->
<structure field="columns" />
<!-- <structure field="columns" name= "map" item-type="com.stc.stcdbeway.repository.impl.StcdbDBColumnImpl"
marshaller="org.jibx.custombindings.HashMapper" unmarshaller="org.jibx.custombindings.HashMapper"/>
<structure field="tableProperties" name="map" item-type="java.lang.String"
marshaller="org.jibx.custombindings.HashMapper" unmarshaller="org.jibx.custombindings.HashMapper"/> -->
</mapping>
<mapping name="stcdbColumn" class="com.stc.stcdbeway.repository.impl.StcdbDBColumnImpl">
<value style="attribute" name="name" field="name"/>
<value style="attribute" name="type" field="jdbcType"/>
<value style="attribute" name="scale" field="scale"/>
<value style="attribute" name="precision" field="precision"/>
<value style="attribute" name="cardinalPosition" field="cardinalPosition"/>
<value style="attribute" name="isPrimaryKey" field="pkFlag"/>
<value style="attribute" name="isForeignKey" field="fkFlag"/>
<value style="attribute" name="indexed" field="indexed"/>
<value style="attribute" name="nullable" field="nullable"/>
<!--<structure field="columnProperties" name="map" item-type="java.lang.String"
marshaller="org.jibx.custombindings.HashMapper" unmarshaller="org.jibx.custombindings.HashMapper"/> -->
</mapping>
</binding><stcdbDatabaseModel name="fdff" description="source">
<map size="2">
<entry key="TEST1_CSV">
<stcdbTable name="TEST1_CSV" javaName="Test1Csv">
<map size="2">
<entry key="NAME">
<stcdbColumn name="NAME" type="12" scale="0" precision="25" cardinalPosition="2" isPrimaryKey="false" isForeignKey="false" indexed="false" nullable="true" />
</entry>
<entry key="ID">
<stcdbColumn name="ID" type="12" scale="0" precision="4" cardinalPosition="1" isPrimaryKey="false" isForeignKey="false" indexed="false" nullable="true" />
</entry>
</map>
<attr name="RecordDelimiter" type="java.lang.String" value="slashn"/>
<attr name="FieldCount" type="java.lang.String" value="5"/>
</stcdbTable>
</entry>
<entry key="TEST2_CSV">
<stcdbTable name="TEST2_CSV" javaName="Test2Csv">
<map size="2">
<entry key="NAME">
<stcdbColumn name="NAME" type="12" scale="0" precision="25" cardinalPosition="2" isPrimaryKey="false" isForeignKey="false" indexed="false" nullable="true" />
</entry>
<entry key="ID">
<stcdbColumn name="ID" type="12" scale="0" precision="4" cardinalPosition="1" isPrimaryKey="false" isForeignKey="false" indexed="false" nullable="true" />
</entry>
</map>
</stcdbTable>
</entry>
</map>
</stcdbDatabaseModel>