Wednesday, 18 September 2013

Spring Java Conversion exception

Spring Java Conversion exception

I am trying to store an EnumSet object into my neo4j db. However, I get
this exception:
org.springframework.core.convert.ConversionFailedException: Failed to
convert from type java.util.LinkedHashSet<?> to type java.util.EnumSet<?>
for value '[READ, WRITE, OPTIONAL]'; nested exception is
java.lang.IllegalArgumentException: Could not instantiate Collection type:
java.util.EnumSet
Is there some way to substitute the the EnumSet with something else? Or,
does anyone know a work around?
I've tried making the set as a HashSet, but I lose the methods that
EnumSet gives me, such as noneOf().

No comments:

Post a Comment