bean validator issue in jdk 6
Hi to all,
I'm using spring-modules-validation (0.7) BeanValidator with annotations
and I have a strange problem. If I deploy my web application to Tomcat
running with jdk 5 everything goes well, but if I switch to jdk 6 I get
a java.lang.NoClassDefFoundError.
This is my configuration:
* linux;
* jdk 6;
* tomcat 5.5.20;
* spring 2.0.2;
* springmodules 0.7;
* maven 2.0.5 (I use the ibiblio springmodules jar);
This is a snippet of the configuration file of my web app:
Code:
<!-- This is the annotation validator -->
<bean id="validator"
class="org.springmodules.validation.bean.BeanValidator">
<property name="configurationLoader" ref="configurationLoader"/>
</bean>
<bean id="configurationLoader"
class="org.springmodules.validation.bean.conf.loader.annotation.AnnotationBeanValidationConfigurationLoader"
/>
<!-- Abstract Controller -->
<bean id="abstractController" abstract="true">
<property name="conf">
<ref bean="conf"/>
</property>
<property name="validators">
<ref bean="validator"/>
</property>
<lookup-method name="dao" bean="daos"/>
<lookup-method name="blo" bean="blos"/>
</bean>
and this is the exception:
Code:
Instantiation of bean failed; nested exception is
org.springframework.beans.BeanInstantiationException: Could not
instantiate bean class
[org.springmodules.validation.bean.BeanValidator]: Constructor threw
exception; nested exception is java.lang.NoClassDefFoundError: Could not
initialize class org.springmodules.validation.util.LibraryUtils
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:253)
I found the same problem if I use winxp: jdk5 works and jdk6 fails.
Anyone having the same issue?
Thanks in advance
gtrev
PS.: excuse me for crossposting from users@springmodules.dev.java.net ...
org.apache.commons.lang.SystemUtils
SystemUtils class is present in the common lang jar -
org.apache.commons.lang.SystemUtils