maven构建spring报错org.springframework.core.NestedRuntimeException cannot be resolved.

Error:
The type org.springframework.core.NestedRuntimeException cannot be resolved. It is indirectly referenced from required .class files

Story:
It is most common for developers to forget adding the jars to the classpath. I had apparently missed to add the Spring frameworks core jar to the build path. The dependent spring context jar was added but missed the spring core jar. The application hit this error.

Solution:
This error occurs when the spring-core jar is missing or corrupted. Add/replace the new spring-core-4.2.6.RELEASE.jar (version might not be the same for you) to the build path. You might also need the org.springframework.context-4.2.6.jar. The Jars can be downloaded fromhere. You can always use maven dependencies to resolve this error. When using maven, add the dependency to the pom.xml file.

将jar包换到高版本就解决问题了^_^

时间: 2024-08-18 05:09:10

maven构建spring报错org.springframework.core.NestedRuntimeException cannot be resolved.的相关文章

spring+redis 报错 org.springframework.core.serializer.support.DeserializingConverter.<init>(Ljava/lang/ClassLoader;)V

这个问题的原因大概就是spring-data-redis.jar包版本不对 ,下面版本可以正常启动 <dependency> <groupId>org.springframework.data</groupId> <artifactId>spring-data-redis</artifactId> <version>1.6.2.RELEASE</version> </dependency> <depend

spring报错 org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [cn/itcast/b_anno/bean.xml]; nested exception is java.lang.

这次遇到的错是在 使用注解的方式 来使用事务的时候 在配置文件中配置了 但是却没有使用 补充:没有aop相关的包也会报这个错,需要加上aop的包 解决:在配置文件中将事务有关的配置移除了然后就好了          额,看来在配置文件中的东西一定注意啊,需要使用的时候才去进行配置,不要多配置也不要少配置

Maven Web项目 java.lang.NoClassDefFoundError: org/springframework/core/NestedRuntimeException错误

导读 使用Eclipse在从SVN或从git中check out Web项目后,运行可能会出现 java.lang.NoClassDefFoundError:org/springframework/core/NestedRuntimeException错误.检查Maven Dependencies后,发现org.springframework.core.NestedRuntimeException类就在Spring-core jar包里,系统怎么会没发现这个类呢?这时候就要考虑Maven Dep

(待解答)Spring报错:Exception in thread &quot;main&quot; org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named &#39;car&#39; is defined

新建了一个Spring工程,有2个类:HelloWorld.Car.在Main.java文件里获取类时,发现只能获取到HelloWorld类,不能获取到Car类. HelloWorld.java: 1 package com.tt.spring.beans; 2 3 public class HelloWorld { 4 5 private String name; 6 7 public void setName(String name) { 8 System.out.println("hell

Spring报错:Exception in thread &quot;main&quot; java.lang.IllegalArgumentException at org.springframework.asm.ClassReader.&lt;init&gt;(Unknown Source)

简单搭建了一个Spring Maven工程就报错: 看到网上说是JDK 7 和 Spring3.x :JDK编译级别设置成1.7,仍然没有得到解决,采用版本为  3.2.0.RELEASE <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId>

Maven项目下update maven后Eclipse报错:java.lang.ClassNotFoundException: ContextLoaderL

Maven项目下update maven后Eclipse报错:java.lang.ClassNotFoundException: ContextLoaderL     严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener java.lang.ClassNotFoundException: org.springframework.web.co

springboot 报错 org.springframework.beans.factory.NoSuchBeanDefinitionException:No qualifying bean of type &#39;com.example.service.HrService&#39; available: 有没有大佬出个主意,我找了一天,刚入门springboot

话不多说先上图,这是启动类的配置,这里配置了@ComponentScan("我的mapper的接口") 接下来是我的项目结构截图 然后是service 的截图,我在这里加了注解@Service 最后我在测试类里面 的截图 最后附上我的maven的pom 我开始怀疑是这个配置的有问题了 <?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.a

update maven后Eclipse报错:java.lang.ClassNotFoundException: ContextLoaderL

出错:Maven项目下update maven后Eclipse报错:java.lang.ClassNotFoundException: ContextLoaderL 解决方案: 1.右键点击项目--选择Properties 选择Deployment Assembly,在右边点击Add按钮,在弹出的窗口中选择Java Build Path Entries 2.点击Next,选择Maven Dependencies 3.点击Finish,然后可以看到已经把Maven Dependencies添加到W

maven, install 时候报错“编码 gbk 的不可映射字符”的解决方法

myeclipse maven, install 时候报错"编码 gbk 的不可映射字符" 报错的原因是compiler采用了GBK编码,而源代码设置的是utf8编码导致编译的时候无法正确解析源码,解决方法很简单,在pom的compiler插件配置处加入<encoding>utf8</encoding> 即可,如下: <build>        <plugins>            <plugin>