Hello! I have an Enum class:
/** * Holds tag enumeration */ public enum DiffTag { Replace("replace"), Insert("insert"), Delete("delete"), Equal("equal"); private final String textForm; DiffTag(String textForm) { this.textForm = textForm; } /** * @see java.lang.Enum#toString() */ @Override public String toString() { return textForm; } } and when I marshalling some document which has property of that enum class, it is marshalled successfully, however when I trying to unmarshall the SAME document which was marshalled before, I'm getting this exception: java.lang.IllegalArgumentException: No enum const class entity.DiffTag.equal at java.lang.Enum.valueOf(Enum.java:192) at DiffTag.valueOf(DiffTag.java:6) I tried to uppercase constant values - and it doesn't work. generated XML looks like this: <?xml version="1.0" encoding="utf-8"?> <diff_structure> <diff_parts> <diffpart tag="equal" left_tag_start="0" left_tag_end="6" right_tag_start="0" right_tag_end="6"/> <diffpart tag="replace" left_tag_start="7" left_tag_end="11" right_tag_start="6" right_tag_end="17"/> <diffpart tag="equal" left_tag_start="12" left_tag_end="18" right_tag_start="18" right_tag_end="24"/> <diffpart tag="replace" left_tag_start="19" left_tag_end="19" right_tag_start="25" right_tag_end="27"/> <diffpart tag="equal" left_tag_start="20" left_tag_end="20" right_tag_start="28" right_tag_end="28"/> <diffpart tag="replace" left_tag_start="21" left_tag_end="21" right_tag_start="29" right_tag_end="29"/> <diffpart tag="equal" left_tag_start="22" left_tag_end="25" right_tag_start="30" right_tag_end="33"/> </diff_parts> </diff_structure> and mapping definition is : <binding> <mapping name="diffpart" class="DiffPartStub"> <value name="tag" field="tag" type="DiffTag" style="attribute" /> <value name="left_tag_start" field="leftStart" type="int" style="attribute" /> <value name="left_tag_end" field="leftEnd" type="int" style="attribute" /> <value name="right_tag_start" field="rightStart" type="int" style="attribute" /> <value name="right_tag_end" field="rightEnd" type="int" style="attribute" /> </mapping> <mapping name='diff_structure' ordered='false' class='DiffStructureStub' > <collection name="diff_parts" field='diffParts' type='java.util.LinkedList' usage='optional' item-type='DiffPartStub'/> </mapping> </binding> Could somebody please help me with this issue? Thank you in advance! -- Eugene N Dzhurinsky ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users