Hi Alberto,

This doesn't tell us much about the circumstances of the error, but I'd 
suspect what's going on is that you're unmarshalling data into a HashSet 
and trying to use it with the HibernateCode, which expects a 
PersistentSet. If that's the case you may be able to avoid the problem 
by setting create-type="org.hibernate.collection.PersistentSet" in the 
binding, to tell JiBX to use an instance of this class for the collection.

However, Hibernate may also be expecting this to be tied into other 
parts of its data representation. You can always work around these 
issues by hooking JiBX in to the appropriate get/set methods, but it can 
require a detailed understanding of how Hibernate is structuring the 
data (including the relationships Hibernate maintains internally). So 
try the create-type change first and hope that works. :-)

  - Dennis

Dennis M. Sosnoski
SOA and Web Services in Java
Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117



Alberto Ivo wrote:
> Hello all,
>
> Anyone pass through this error:
>
> [ConditionalEventPump] Exception occurred during event dispatching:
> java.lang.ClassCastException: java.util.HashSet cannot be cast to 
> org.hibernate.collection.PersistentSet
>
>
> I have a HashSet that want to put in a XML file, but I'm getting the 
> values from a hibernate connection. the hibernate transforms the SET 
> in a PersistenceSet, and I want to visualize a HashSet. So, What can I do?
>
> please, any help is welcome.
>
> thanks in advance.
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> ------------------------------------------------------------------------
>
> _______________________________________________
> jibx-users mailing list
> jibx-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jibx-users
>   


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to