JDK8+spring 3.x报非法参数异常IllegalArgumentException

2015-06-04 01:21:35,306  INFO DefaultListableBeanFactory:577 - Pre-instantiating singletons in org.s[email protected]64616ca2: defining beans [user,userDao]; root of factory hierarchy
2015-06-04 01:21:35,308 DEBUG DefaultListableBeanFactory:215 - Creating shared instance of singleton bean 'user'
2015-06-04 01:21:35,308 DEBUG DefaultListableBeanFactory:435 - Creating instance of bean 'user'
Exception in thread "main" java.lang.IllegalArgumentException
	at org.springframework.asm.ClassReader.<init>(Unknown Source)
	at org.springframework.asm.ClassReader.<init>(Unknown Source)
	at org.springframework.asm.ClassReader.<init>(Unknown Source)
	at org.springframework.core.LocalVariableTableParameterNameDiscoverer.inspectClass(LocalVariableTableParameterNameDiscoverer.java:112)
	at org.springframework.core.LocalVariableTableParameterNameDiscoverer.getParameterNames(LocalVariableTableParameterNameDiscoverer.java:86)
	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:193)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1049)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:953)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:490)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:607)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
	at cn.wxy.test.Test.main(Test.java:10)

异常原因:JDK 8和spring 3.x不匹配,换成spring 4.x就可以了

spring官网跟新后,推荐maven和gradle两种下载方式,直接下载spring framework jar包比较困难,以下链接为spring svn地址。

点我下载(http://repo.springsource.org/libs-release-local/org/springframework/spring/)

版本冲突bug:spring framwork 3.x和JDK 8冲突

时间: 2024-10-12 01:41:29

JDK8+spring 3.x报非法参数异常IllegalArgumentException的相关文章

spring异步执行报异常No qualifying bean of type &#39;org.springframework.core.task.TaskExecutor&#39; available

最近观察项目运行日志的时候突然发现了一个异常, [2018-04-03 10:49:07] 100.0.1.246 http-nio-8080-exec-9 DEBUG org.springframework.scheduling.annotation.AnnotationAsyncExecutionInterceptor---- Could not find default TaskExecutor bean org.springframework.beans.factory.NoSuchBe

Spring 框架——利用HandlerExceptionResolver实现全局异常捕获

https://blog.csdn.net/qq_22172133/article/details/82147630 微信一.需求描述        因为在项目中,我们不可否认的会出现异常,而且这些异常并没有进行捕获.经常出现的bug如空指针异常等等.在之前的项目中,如果我们没有进行任何配置,那么容器会自动打印错误的信息,如果tomcat的404页面,400页面等等.如果我们在web.xml中进行如下配置,就会拦截错误,然后跳转到指定的错误页面. <error-page>    <err

struts2、spring调整, 报java.lang.NoSuchMethodException

struts2.spring整合, 报java.lang.NoSuchMethodException 用spring做为struts2的ObjectFactory,用spring来生成action,并对action的方法加上aop时,不要使Action继承于ActionSupport,否则会出现类似于以下的异常:java.lang.NoSuchMethodException: $Proxy84.executeList()at java.lang.Class.getMethod(Class.jav

登录首页时报错:java.lang.IllegalArgumentException (不合法的参数异常)

今天开发一个小项目,在转到一个jsp页面时显示如下错误 不合法的参数异常,思考问题可能出现文件的语法格式上,找到页面显示错误的文件,果然,问题在于导入时后面添加了一个":",在低版本的tomcat下可能能够行得通,但是在较高版本的tomcat下这个小小的":"导致了运行项目时的报错. 原文地址:https://www.cnblogs.com/interesting-whh/p/9157090.html

Java spring boot 2.0连接mysql异常:The server time zone value &#39;&#214;&#208;&#185;&#250;&#177;&#234;&#215;&#188;&#202;&#177;&#188;&#228;&#39; is unrecognized or represents more than one time zone

解决办法:application.yml提示信息表明数据库驱动com.mysql.jdbc.Driver'已经被弃用了.应当使用新的驱动com.mysql.cj.jdbc.Driver' com.mysql.jdbc.Driver改成com.mysql.cj.jdbc.Driver 我接着运行项目有报错 解决办法: spring: datasource: url: jdbc:mysql://localhost:3306/boot?useUnicode=true&characterEncoding

在使用Linq to SQL并序列化一个数据对象的时候报System.InvalidOperationException异常,序列化类型XXX的对象时检测到循环引用。

在使用Linq to SQL并序列化一个数据对象的时候报System.InvalidOperationException异常,序列化类型 的对象时检测到循环引用. 异常信息(部分): System.Web.Services.Protocols.SoapException: 服务器无法处理请求. ---> System.InvalidOperationException: 生成 XML 文档时出错. ---> System.InvalidOperationException: 序列化类型 Web

引入工程报包导入异常:import javax.servlet.annotation.WebFilter;

引入工程报包导入异常:import javax.servlet.annotation.WebFilter; (2013-02-21 16:38:00)   分类: java 今天上午导入了一个项目,用的是tomcat7.0的,但是我自己是tomcat6.0的,结果项目导入就很郁闷的发现有的类打上了红叉叉,进去一看,import javax.servlet.annotation.WebFilter 不能引入,找不到类,发现是少导入了servlet-api 包的问题,然后就去网上下载了一个包,可是导

Flex获取url参数异常(Error #2060)

解决办法:chrome在服务器上运行才会获取到值,在本地打开会报安全沙箱异常(Error #2060) 1 private function getParameter(name:String):String{ 2 if (ExternalInterface.available) { 3 try{ 4 var query:String = ExternalInterface.call("window.location.search.substring", 1); 5 var pairs:

spring Boot异步操作报错误: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type &#39;com.self.spring.springboot.Jeep&#39; available

我也是最近开始学习Spring Boot,在执行异步操作的时候总是汇报如下的错误: Exception in thread "main" org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.self.spring.springboot.Jeep' available at org.springframework.beans.factory.sup