我正在开发一个控制器的简单弹簧mvc应用程序。当我部署战争文件时,我遇到下面的异常。Spring 3.1 web应用程序问题
java.lang.IllegalAccessError: tried to access class org.springframework.core.convert.support.StringToBooleanConverter from class org.springframework.core.convert.support.DefaultConversionService
at org.springframework.core.convert.support.DefaultConversionService.addScalarConverters(DefaultConversionService.java:61)
at org.springframework.core.convert.support.DefaultConversionService.addDefaultConverters(DefaultConversionService.java:53)
at org.springframework.core.convert.support.DefaultConversionService.<init>(DefaultConversionService.java:42)
at org.springframework.core.env.AbstractPropertyResolver.<init>(AbstractPropertyResolver.java:44)
at org.springframework.core.env.PropertySourcesPropertyResolver.<init>(PropertySourcesPropertyResolver.java:42)
at org.springframework.core.env.AbstractEnvironment.<init>(AbstractEnvironment.java:95)
at org.springframework.core.env.StandardEnvironment.<init>(StandardEnvironment.java:54)
at org.springframework.web.context.support.StandardServletEnvironment.<init>(StandardServletEnvironment.java:43)
at org.springframework.web.servlet.HttpServletBean.<init>(HttpServletBean.java:90)
at org.springframework.web.servlet.FrameworkServlet.<init>(FrameworkServlet.java:211)
at org.springframework.web.servlet.DispatcherServlet.<init>(DispatcherServlet.java:303)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
你可以仔细检查你所有的Spring JAR是否有相同的版本? – 2012-02-20 19:08:27
是的,我所有的弹簧罐都是3.1.0版。 – user509755 2012-02-20 19:13:41
我注意到的另外一件事是,如果我将3.1.0的spring版本更改为3.0.7,那么一切正常。所以这与春天的最新版本有关。 – user509755 2012-02-20 19:17:36