spirng中的asm与jdk不兼容<已解决>
前言
不知道前面对eclipse做了什么,使用maven来创建项目,然后转成web,启动的时候一直报错。我弄了好久,还是无法解决,先记录
正文
错误信息
tomcat启动的时候报了下面的错误
严重: Exception sending context initialized event to listener instance of class com.demo.web.listener.InitApplicationListener
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.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:52)
at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:80)
at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:101)
at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:76)
at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:298)
at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:300)
at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:300)
at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:230)
at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:153)
at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:130)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:285)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:223)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:630)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
at com.demo.web.listener.InitApplicationListener.contextInitialized(InitApplicationListener.java:32)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4729)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5167)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:945)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1768)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
前几天一个项目导入eclipse,jdk为1.8版本,也是这样的错误,我用1.6就可以了,也没有深究。这次,使用maven创建项目,转成web项目的时候又出现了这个错误,之所以没有换jdk,是因为之前都是可以跑起来的,所以这次查阅各种资料,花了很长时间,到最后还是无法解决
这是出现的原因
问题解决
隔了一天,重新看昨天出现的错误,我新建了一个传统的Web项目,部署以后还是出现同样的问题,这次我把tomcat在控制台启动的信息详细的看了一下,里面有一段下面的信息
息: Deploying web application archive D:\workbench\apache-tomcat-8.0.24\webapps\demo-web-0.0.1-SNAPSHOT.war
- 1
原来我在tomcat的webapp目录下面放了一个war包,在tomcat启动的时候会部署这个war包,错误就是发生在这里面的。看来头痛医脚的道理在程序中同样适用。以后看到问题,不能只盯着报错的信息,其他东西也要看看
这个war包出现的错误,如stackoverflow里面大神所讲的,是jdk不兼容。
笔者注:按照博文里的方法,笔者改变了3.2.0.RELEASE改成4.3.8RELEASE然后项目基本就能正常运行了
spirng中的asm与jdk不兼容<已解决>的更多相关文章
- Windows平台下在Emacs中使用plantuml中文乱码问题(已解决)
Windows平台下在Emacs中使用plantuml中文乱码问题(已解决) */--> code {color: #FF0000} pre.src {background-color: #00 ...
- 未能从程序集“mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”中加载类型“System.Runtime.CompilerServices.TuppressIldasmAttribute”。已解决
"/"应用程序中的服务器错误. 未能从程序集"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77 ...
- 启动 Eclipse 弹出“Failed to load the JNI shared library jvm.dll”错误的解决方法!&&在eclipse.ini中为eclipse指定jdk启动
参考:http://blog.csdn.net/zyz511919766/article/details/7442633 http://blog.sina.com.cn/s/blog_028f0c1c ...
- div+css中常见的浏览器兼容性处理-兼容不同浏览器
在网站设计的时候,应该注意css样式兼容不同浏览器问题,特别是对完全使用DIV CSS设计的网,就应该更注意IE6 IE7 FF对CSS样式的兼容,不然,你的网乱可能出去不想出现的效果! div+cs ...
- Delphi代码中嵌入ASM代码
前言 Delphi作为一个快速高效的开发平台,使用的人越来越多,但熟悉在Delphi代码中嵌入ASM代码的程序员我想不多,因为这方面的资料太少了,另一方面,它还需要有基本的汇编语言知识,关於汇编语言的 ...
- Delphi代码中嵌入ASM代码(简单明了)
前言 Delphi作为一个快速高效的开发平台,使用的人越来越多,但熟悉在Delphi代码中嵌入ASM代码的程序员我想不多,因为这方面的资料太少了,另一方面,它还需要有基本的汇编语言知识,关於汇编语言的 ...
- 【翻译自mos文章】11gR2中的asm后台进程
11gR2中的asm后台进程 參考原文: ASM Background Processes in 11.2 (Doc ID 1641678.1) 适用于: Oracle Database - Ente ...
- virtualbox中实施ASM扩容实施记录
实施ASM在线扩容 1. 首先关闭集群 [root@node1 bin]# ./crsctl stop crs [root@node2 bin]# ./crsctl stop crs 关机,halt ...
- Eclipse 中 Maven 项目默认JDK版本为1.5 的解决方法
在 Eclipse 中 Maven project 的默认 JDK 版本是 1.5, 如果不在 settings.xml 或者 pom.xml 中显示的指出 JDK 版本,每次 右键项目--> ...
随机推荐
- JS 实现分页打印
在调用window.print()时,可以实现打印效果,但内容太多时要进行分页打印. 在样式中有规定几个打印的样式 page-break-before和page-break-after CSS属性并不 ...
- [PHP]PHP缓存机制之Output Control
---------------------------------------------------------------------------------------------------- ...
- 第三条博客 你好 Java web!
今天周五了,明天就是周末!第一个周末就这样结束了 今天我学习了MyEclipse开发 Javaweb 程序,学的是最基础的那一部分 首先先创建了自己的项目,展开项目标签,编辑index.jsp. 我还 ...
- JAVA语言 第七周
啊因为来学校了,没有网,昨天的总结今天来写吧. num1=In.next(); student1[number].stuNum=num1; 这个添加的代码,显示添加成功了,但是根本查询不出来,烦 ...
- akka共享内存
Akka共享内存 Akka中的共享内存是基于Actor模型的,Actor模型提倡的是:通过通讯来实现共享内存,而不是用共享内存来实现通讯,这点是跟Java解决共享内存最大的区别,举个例子: 在Java ...
- Html----表单元素
表单元素:用于客户端和服务端进行信息交互的通道 <form></form>:所有的表单元素都应该放在里面 文本输入框: <input type="text&qu ...
- php分割最后一个逗号后面的字符
$str = 'a/b/c/d/e/f'; echo preg_replace('/.*\//','',$str); echo preg_replace('/.*,/','',$str);最后 ...
- springMVC :interceptors
1.配置拦截器 在springMVC.xml配置文件增加: <mvc:interceptors> <!-- 日志拦截器 --> <mvc:interc ...
- socat流量操控
被称为nc++,双向数据流通道工具. 假设有这样一个场景 相互通信 创建服务器端,侦听2222端口 socat - tcp4-listen:2222 查看2222端口是否打开 netstat -pan ...
- JVisual 相关help参数
The launcher has determined that the parent process has a console and will reuse it for its own cons ...