引入dubbo依赖 后 项目启动失败 报错:....on JDK 1.5 and higher
2016-12-01 14:09
471 查看
1.先看下 报错提示:
Caused by: java.lang.IllegalStateException: Context namespace element 'component-scan' and its parser class [org.springframework.context.annotation.ComponentScanBeanDefinitionParser] are only available on JDK 1.5 and higher at org.springframework.context.config.ContextNamespaceHandler$1.parse(ContextNamespaceHandler.java:65) at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69) at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1297) at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287) at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)
2.解决方法
原先pom.xml中 引入dubbo依赖:<dependency> <groupId>com.alibaba</groupId> <artifactId>dubbo</artifactId> <version>${dubbo.version}</version> </dependency>
调成为:
<!-- 添加 dubbo依赖 它默认会把spring的2.5.6版本引入--> <dependency> <groupId>com.alibaba</groupId> <artifactId>dubbo</artifactId> <version>${dubbo.version}</version> <!--去除引入的spring--> <exclusions> <exclusion> <groupId>org.springframework</groupId> <artifactId>spring</artifactId> </exclusion> </exclusions> </dependency>
相关文章推荐
- 引入dubbo依赖 后 项目启动失败 报错:....on JDK 1.5 and higher
- [转]Tomcat启动报错:AnnotationConfigBeanDefinitionParser are only available on JDK 1.5 and higher
- 项目引入dubbo后,本地插件启动成功而war启动失败
- AnnotationConfigBeanDefinitionParser are only available on JDK 1.5 and higher
- Spring 注解:element 'annotation-config' and its parser class are only available on JDK 1.5 and higher
- ....are only available on JDK 1.5 and higher
- (crm-bug)Spring/Java error: namespace element 'annotation-config' … on JDK 1.5 and higher
- 项目启动后失败,报Unregistering JMX-exposed beans on shutdown
- idea报错:……are only available on JDK 1.5 and higher
- Context namespace element 'component-scan' its parser class are only available on JDK 1.5 and higher
- Context namespace element 'component-scan' 提示 only available on JDK 1.5 and higher
- springmvc启动项目时报出could not find class that it depends on找不到依赖的问题
- Spring零配置下整合Dubbo项目启动失败BUG修复
- spring2.5.6的‘annotation-config’ and its parser class are only available on JDK 1.5 and higher错误解决
- annotationconfigbeandefinitionparser are only available on jdk 1.5 and higher
- only available on JDK 1.5 and higher
- 使用Spring Boot框架maven项目新建后启动失败, 提示Unregistering JMX-exposed beans on shutdown
- Eclipse 使用svn插件检出maven项目,启动服务时提示依赖注入失败
- IDEA 新建spring Boot 项目新建后启动失败, 提示Unregistering JMX-exposed beans on shutdown
- 项目jdk版本不一致导致Tomcat启动失败解决方案