java.lang.ClassNotFoundException error using enum as a key in Map
Posted
by
LCYSoft
on Stack Overflow
See other posts from Stack Overflow
or by LCYSoft
Published on 2013-10-26T00:56:47Z
Indexed on
2013/10/26
3:54 UTC
Read the original article
Hit count: 176
<util:map id="myMap" key-type="com.myClass.Foo.myEnum" value-type="com.myClass.Foo">
<entry>
<key>
<value type="com.myClass.Foo.myEnum">ONE</value>
</key>
<ref bean="myObj"/>
</entry>
</util:map>
package com.myClass
public class Foo {
public enum myEnum {ONE, TWO;}
}
I am trying to create a map from Spriong 2.5.
Map<myEnum, Foo> myMap;
I am getting
nested exception is java.lang.ClassNotFoundException:com.myClass.Foo.myEnum
I definitely have com.myClass.Foo.myEnum
in com.myClass.Foo
I don't know why I am getting java.lang.ClassNotFoundException
Thanks in advance
© Stack Overflow or respective owner