Thursday, 1 September 2016

XmlBeans - ClassCastException ~ gniithelp

problem
while creating bean instance .it will throw
Exception in thread "main" java.lang.ClassCastException: com.javaorigin.xmlBean.SampleBean at com.javaorigin.xmlBean.SampleBean.SampleComplexBean.Factory.newInstance(Unknown Source)

Problem Root
This is java major and minor version problem .if you are using xmlbean 2.2.0 with jdk1.4.x
then it will happen

Solution
use latest jdk for compiling scemas (ex: use xmlBean2.2.0 with jdk1.5 )

No comments:

Post a Comment