[ http://jira.codehaus.org/browse/JIBX-136?page=comments#action_76776 ]
Gerd.Kainz commented on JIBX-136:
---------------------------------
I use eclipse 3.1.2 together with java 1.5. My classes where compiled in
eclipse. The binding tool was called outside the eclipse enviroment.
I used some binding with open mapping of some field of type java.lang.Object. I
wrote some custom Marshaller for java.lang.String.
public class Entry {
....
Object key;
}
<mapping class="model.Entry" name="entry" >
<structure field="key" />
...
</mapping>
<mapping class="java.lang.String" name="string"
marshaller="custom.StringMarshaller"
unmarshaller="custom.StringMarshaller">
</mapping>
My first testcase was to unmarshall some data and to marshall the result again.
...
<entry>
<string>look here</string>
</entry>
....
After some experiments I managed to run the unmarshaller part. However the
marshaller part threw some exception
<entry>
<string>look here</string>
<cache><instance/></cache>
</entry>
java.lang.ClassCastException: java.lang.String
at model.Entry.JiBX_binding_marshal_1_0(Entry.java)
...
Inspection of Entry classcode shows as a possible candidate some thing like:
((IMarshallable)key).marshal(arg);
However the key is the Object field of Entry mentioned above, which was
populated with a String value, an doesn't contain the custom marshaller !
> ClassCastExeption from JIBX_binding_marshal..
> ---------------------------------------------
>
> Key: JIBX-136
> URL: http://jira.codehaus.org/browse/JIBX-136
> Project: JiBX
> Issue Type: Bug
> Reporter: Gerd.Kainz
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs