SpringMVC中的java.lang.ClassNotFoundException: org.aspectj.weaver.BCException 调试过程记录
报错原因 |
上文本描述 |
java.lang.NoClassDefFoundError: org/aspectj/weaver/BCException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2531)
at java.lang.Class.getDeclaredMethods(Class.java:1855)
at org.springframework.core.type.StandardAnnotationMetadata.hasAnnotatedMethods(StandardAnnotationMetadata.java:136)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.checkConfigurationClassCandidate(ConfigurationClassBeanDefinitionReader.java:320)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:157)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:132)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:584)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:405)
at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:84)
at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:1)
at org.springframework.test.context.TestContext.loadApplicationContext(TestContext.java:280)
at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:304)
at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:109)
at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:75)
at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:333)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:220)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:301)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:303)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:44)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180)
at org.junit.runner.JUnitCore.run(JUnitCore.java:159)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:119)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Caused by: java.lang.ClassNotFoundException: org.aspectj.weaver.BCException
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 41 more
网上搜索的解决方案 |
但是我的POM里面已经包含了该jar的依赖,见下图 |
没办法,只能继续寻找 |
找到的资料都是一样的,说jar包
缺失,aspectjweaver
换成1.8.8
,问题好像解决了
aspectjweaver 换成1.8.8 之后问题解决了 |
反思,我要换成1.6.2再试试 |
如上图,换成1.6.2之后,还是可以运行 |
不要说我之前没有把
maven
的依赖包下载,我已经下载了,还是出那个问题,换成1.8.8
,折腾一下之后,问题才得到解决。
无论怎么,报错的原因都和aspectjweaver
有关。
SpringMVC中的java.lang.ClassNotFoundException: org.aspectj.weaver.BCException 调试过程记录的更多相关文章
- Spring.之.报错:Caused by: java.lang.ClassNotFoundException: org.aspectj.weaver.reflect.ReflectionWorld$ReflectionWorldException
Caused by: java.lang.ClassNotFoundException: org.aspectj.weaver.reflect.ReflectionWorld$ReflectionWo ...
- Caused by: java.lang.ClassNotFoundException: org.aspectj.weaver.reflect.ReflectionWorld$ReflectionWo
1.错误描述 usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -help ...
- Spring3.x错误----java.lang.ClassNotFoundException:org.aspectj.weaver.reflect.ReflectionWorld$ReflectionWorldException
Spring3.x错误: 解决方法: 缺少aspectjweaver.jar包 下载地址: https://cn.jarfire.org/aspectjweaver.html
- could not find class that it depends on; nested exception is java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException
© 版权声明:本文为博主原创文章,转载请注明出处 1.问题描述 搭建SSH框架启动报错如下: 六月 07, 2017 2:34:34 下午 org.springframework.web.contex ...
- SpringMVC集成AOP错误:java lang classnotfoundexception org aspectj lang joinpoint
记录自己出现的问题,Spring AOP 使用测试类测试没问题,在SpringMVC启动服务器时出现java lang classnotfoundexception org aspectj lang ...
- Caused by: java.lang.ClassNotFoundException: org.aspectj.lang.annotation.Around
1.错误描述 INFO:2015-05-01 11:12:15[localhost-startStop-1] - Root WebApplicationContext: initialization ...
- Spring系列: 使用aop报错:nested exception is java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$Refle
写了个最简单的aop例子 配置文件如下 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns ...
- java.lang.NoClassDefFoundError: org/aspectj/weaver/tools/PointcutPrimitive
问题:使用Spring时,报错:java.lang.NoClassDefFoundError: org/aspectj/weaver/tools/PointcutPrimitive问题原因: 少了as ...
- spring问题:java.lang.NoClassDefFoundError: org/aspectj/weaver/tools/PointcutPrimitive
问题描述: spring的:java.lang.NoClassDefFoundError: org/aspectj/weaver/tools/PointcutPrimitive 解决方案: 缺少jar ...
随机推荐
- D3.js-坐标轴生成测试SVG
Bottom top Bottom top // =0) return "translate("+margin+","+i*offset+")&q ...
- 使用SevenZipSharp出现“Can not load 7-zip library or internal COM error! Message: DLL file does not exist.”的解决方案
如果你是从nuget上下载安装的SevenZipSharp库,当你写好相应代码,兴冲冲的启动程序进行测试时,以下画面会让你受到当头一棒: 究其原因,是因为SevenZipSharp只是native 7 ...
- hive 动态分区数设置
当对hive分区未做设置时,报错如下: Caused by: org.apache.hadoop.hive.ql.metadata.HiveFatalException: [Error 20004]: ...
- EDP转接IC NCS8805:RGB/LVDS转EDP芯片,带Scaler
RGB/LVDS-to-eDP Converter w/ Scaler1 FeaturesEmbedded-DisplayPort (eDP) Output1/2/4-lane eDP @ 1.62/ ...
- Linux工具XFTP、Xshell(centos配置java环境 工具篇 总结一)
♣Xmanager5是什么? ♣安装XFTP ♣安装Xshell 1.Xmanager5(官网:https://www.netsarang.com/download/software.html)是全新 ...
- Windows入门基础:2.vs2013中Icon显示
第一:系统小图标的显示 wndclass.hIcon = LoadIcon(NULL,IDI_WARNING); //LoadIcon函数的第一的参数要为0,第二个参数是系统自定义的ID号: IDI_ ...
- 如何做到机器学习竞赛Kaggle排名前2%
原创文章,同步首发自作者个人博客 .转载请务必在文章开头显眼处注明出处 摘要 本文详述了如何通过数据预览,探索式数据分析,缺失数据填补,删除关联特征以及派生新特征等方法,在Kaggle的Titanic ...
- 关于下拉框列表不可选择相同值的设置一:当前DOM不可选
<!DOCTYPE html><html><head lang="en"> <meta charset="UTF-8" ...
- 监听器的小示例:利用HttpSessionListener和HttpServletContextListener实现定时销毁HttpSession
1.创建MyServletContextListener实现HttpServletContextListener接口 @Override public void contextDestroyed(Se ...
- 基于jquery 的分页插件,前端实现假分页效果
上次分享了一款jquery插件,现在依旧分享这个插件,不过上一次分享主要是用于regular框件,且每一页数据都是从后端获取过来的,这一次的分享主要是讲一次性获取完数据 然后手动进行分页.此需求基本上 ...