在搭建maven项目的时候,有时候会报这样的问题. The type org.springframework.context.ConfigurableApplicationContext cannot be resolved. It is indirectly referenced from required .class files - The method run(Object, String...) from thae type SpringApplication refers to th…
The type org.springframework.context.ConfigurableApplicationContext cannot be resolved. eclipse导入maven的spring boot项目时,DemoApplication.java出现的错误. 解决方法: 1,在命令行中转到项目目录. 确保您的POM.xml与您的命令行在同一个目录中 运行命令 mvn dependency:purge-local-repository 如果您收到构建成功的消息,表示错…
在 myeclipse中,使用 jdk6和7,并使用 spring-framework-5.0.2.RELEASE 时,编写代码: import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; public class MainApp { public static void main(String[…
Cannot access org.springframework.context.ConfigurableApplicationContext 需要将有问题的模块  删除 后重新导入 即可 IDEA导入module和导入project…
在调用JmsTemplate的send方法时,一直报编译时异常.如下: 异常提示是无法解析org.SpringFrawork.jms.JmsException类型.如下: The type org.springframework.jms.JmsException cannot be resolved. It is indirectly referenced from required .class files 使用了一个简单粗暴的做法: 1.删掉maven下面的所有包 2.重现maven->up…
使用spring框架提供的JDBC模板操作数据库时,提示错误 解决方案:导入事务管理jar包spring-tx-4.2.4.RELEASE.jar…
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 ad…
Caused by: java.lang.NoClassDefFoundError: org/springframework/context/event/GenericApplicationListener From the above error, application is unable to find the class defined from the jar dependencies. GenericApplicationListener is added from spring v…
问题描述: 项目中需要配置多个视图解析器,所以使用ContentNegotiatingViewResolver来处理,在其内部设置了FreeMarkerViewResolver .InternalResourceViewResolver两个视图解析器,同时还有一个默认的defaultViews. 在测试类中,想要获取InternalResourceViewResolver类,会报错说没有定义InternalResourceViewResolver这个bean,找不到. 直接上图上代码: appl…
1.错误描述 usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -help | start | stop } 2014-7-12 0:25:53 org.apache.catalina.core.AprLifecycleListener init 信息: Loaded APR based Apache Tomcat Native library 1.1.29 using…
最近观察项目运行日志的时候突然发现了一个异常, [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…
错误: Description: Field jdbcTemplate in com.gwd.dao.impl.IUserDaoImpl required a bean of type 'org.springframework.jdbc.core.JdbcTemplate' that could not be found.- Bean method 'jdbcTemplate' not loaded because @ConditionalOnSingleCandidate (types: ja…
http://www.cnblogs.com/softidea/p/6064091.html Caused by: java.lang.NoClassDefFoundError: org/springframework/context/event/GenericApplicationListener From the above error, application is unable to find the class defined from the jar dependencies. Ge…
Springboot将accessToke写入Redisk 缓存,springboot集成Redis出现报错 No qualifying bean of type 'org.springframework.data.redis.connection.RedisConnectionFactory' 原因:我们在pom.xml中引入了spring-boot-starter-data-redis却没有引入redis.client 解决方式:增加redis client依赖即可 <dependency>…
错误如下: ERROR 31473 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPLICATION FAILED TO START *************************** Description: Field restTemplate in org.springframework.cloud.zookeeper.discovery.dependency.Dep…
最近项目里面,用了spring的定时任务,一直以来,项目运行的不错.定时器也能正常使用.可是,今天启动项目测试的时候,盯着启动Log看了一阵子,突然间发现,启动的Log中居然有一个异常,虽然一闪而过,但是那熟悉的异常格式还是让我浑身一颤.这个项目一直运行的很好啊,没发现有什么问题,怎么会出现异常呢? 于是我仔细的翻啊翻啊,查啊找啊,嘿,还真的找到了两个异常: [2016-10-12 22:49:10,184] [DEBUG] (ScheduledAnnotationBeanPostProcess…
网关配置好后启动报错如下: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'servletEndpoint…
2019-07-22 17:59:30,966 [DEBUG] [localhost-startStop-1] [ScheduledAnnotationBeanPostProcessor.java : 245] Could not find default TaskScheduler bean org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.sprin…
https://www.cnblogs.com/EasonJim/p/7546136.html 错误如下: ERROR 31473 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPLICATION FAILED TO START *************************** Description: Field restTemplate in org.springfr…
一.这个接口有什么用? 当一个类实现了这个接口(ApplicationContextAware)之后,这个类就可以方便获得ApplicationContext中的所有bean.换句话说,就是这个类可以直接获取spring配置文件中,所有有引用到的bean对象. 二.怎么用? 举个例子吧: 例如我有一个方法类AppUtil,这个方法类中需要使用到的ApplicationContext中的某个bean(companyService). 1.因为spring要建立属于自己的容器,就必须要加载自己的配置…
org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'configController' for bean class [net.mingyang.modules.system.ConfigController] conflicts with existing, non-compatible bean definition of same…
***************************错误提示************************************************ SEVERE: A child container failed during start java.util.concurrent.ExecutionException:org.apache.catalina.LifecycleException: Failed to start component[StandardEngine[Cat…
在一个业务类有下列属性 private SchedulerFactoryBeanscheduler; public SchedulerFactory BeangetScheduler() { return scheduler; } public void setScheduler(SchedulerFactoryBean scheduler) { this.scheduler = scheduler; } 用spring 进行装配: <property name="scheduler&qu…
private Collection<ApplicationListener<?>> retrieveApplicationListeners(ResolvableType eventType, Class<?> sourceType, AbstractApplicationEventMulticaster.ListenerRetriever retriever) { LinkedList allListeners = new LinkedList(); Object…
使用IntelliJ IDEA开发工具解决方案: 总结原因,解决方案: 1,在使用messageSource.getMessage方法时,参数1的键名跟属性文件中键名不一致,比如Controller中是name ,而配置文件中却是names 2,因为使用springMvc提供了MessageSource类,所有也顺带给我们配置好了bean,我们只需注入(按名称注入)就行,但是要去总配置文件,也就是application,properties配置中添加 #为了spring找到资源文件spring.…
Springboot通过application启动报错 2019-01-25 14:02:33.810 ERROR [restartedMain] org.springframework.boot.SpringApplication - Application startup failed org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exce…
SpringBoot启动时的异常信息如下: "C:\Program Files\Java\jdk1.8.0_161\bin\java" ......... com.fangxing.javalearning.annotationlearning.ComponentScanApp hello world . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \…
今天尝试运行一个古老的工程,配置好之后编译通过,结果运行时报错: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [applicationContext.xml]; nested exception is java.lang.IllegalStateException: Context…
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [annotation.xml]; nested exception is java.lang.IllegalStateException: Context namespace element 'component-scan' and i…
在运行一个第三方公司交付的项目的时候, 出现: Caused by: java.lang.IllegalStateException: Context namespace element 'annotation-config' and its parser class [org.springframework.context.annotation.AnnotationConfigBeanDefinitionParser] are only available on JDK 1.5 and hig…