dubbo 常见错误

1. Caused by: java.lang.reflect.MalformedParameterizedTypeException

启动时报错,原因是dubbo 依赖 spring 2.5.6.SEC03,而我项目中有用spring 3.2.4.RELEASE,所以导致冲突。 在maven中把dubbo中的spring依赖去除就可以了。

如果你们项目中也报这个错,很可能也是因为jar包冲突造成的

1
2
3
4
5
6
7
8
9
10
<dependency>
    <groupId>com.alibaba</groupId>
    <artifactId>dubbo</artifactId>
    <exclusions> 
        <exclusion> 
            <artifactId>spring</artifactId> 
            <groupId>org.springframework</groupId> 
        </exclusion> 
    </exclusions> 
</dependency>

2. 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 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)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)
... 22 more

错误原因:http://stackoverflow.com/questions/23813369/spring-java-error-namespace-element-annotation-config-on-jdk-1-5-and-high

因为使用了 jdk1.8, 而dubbo 依赖 Spring 2.5 ,而Spring2.5仅仅支持 jdk1.5 到 jdk 1.7, 所以jdk 1.8 不被识别,所以报错。

3. Caused by: org.xml.sax.SAXParseException; lineNumber: 9; columnNumber: 46; cvc-complex-type.2.4.c: 通配符的匹配很全面, 但无法找到元素 'dubbo:application' 的声明。

该错误是因为没有引入 dubbo jar包。加上依赖就行了:

1
2
3
4
5
<dependency>
    <groupId>com.alibaba</groupId>
    <artifactId>dubbo</artifactId>
    <exclusions> 
</dependency>

4. Unsupported major.minor version 52.0 (unable to load class

出现该错误是由于class编译器的JDK版本高于运行期的JDK版本。

比如我在运行Tomcat servlet时出现该错误,是由于tomcat运行时是1.7的JDK,Eclipse编译时则是1.8 

修改方法:保证编译器和运行期的JDK版本一致。

springmvc错误集锦-dubbo包含低版本的spring包,依赖的时候应该排除Caused by: java.lang.reflect.MalformedParameterizedTypeException的更多相关文章

  1. dubbo 常见错误 通配符的匹配很全面, 但无法找到元素 'dubbo:application' java.lang.reflect.MalformedParameterizedTypeException 通配符的匹配很全面, 但无法找到元素 'dubbo:application' 的声明。 Unsupported major.minor version 52.0 (unable to l

    dubbo 常见错误 1. Caused by: java.lang.reflect.MalformedParameterizedTypeException 启动时报错,原因是dubbo 依赖 spr ...

  2. Tomcat启动报Error listenerStart错误 | "beans" 必须匹配 DOCTYPE 根 "null" | java.lang.reflect.MalformedParameterizedTypeException

    maven打包发布工程时,发布上去却报错FAIL - Deployed application at context path /ch but context failed to start 在服务器 ...

  3. Spring+Mybatis+Dubbo报错java.lang.reflect.MalformedParameterizedTypeException

    原因是spring的jar文件冲突,排除spring的文件即可 <dependency> <groupId>com.alibaba</groupId> <ar ...

  4. Java 错误提示org.apache.poi.POIXMLException: java.lang.reflect.InvocationTargetException

    java 操作excel文件 发布后报错 org.apache.poi.POIXMLException: java.lang.reflect.InvocationTargetException XSS ...

  5. Caused by: java.lang.ClassCastException: org.springframework.web.SpringServletContainerInitializer cannot be cast to javax.servlet.ServletContainerInitializer错误解决办法

    严重: Failed to initialize end point associated with ProtocolHandler ["http-bio-8080"] java. ...

  6. Caused by: java.lang.ClassNotFoundException: com.alibaba.dubbo.common.Version

    <dependency> <groupId>com.alibaba.boot</groupId> <artifactId>dubbo-spring-bo ...

  7. 错误: java.lang.reflect.InvocationTargetException

    错误: java.lang.reflect.InvocationTargetException    at sun.reflect.NativeMethodAccessorImpl.invoke0(N ...

  8. spring-framework-3.2.4.RELEASE 综合hibernate-release-4.3.5.Final一个错误Caused by: java.lang.NoClassDefFound

    LZ一体化的今天spring-framework-3.2.4.RELEASE 综合hibernate-release-4.3.5.Final一个错误Caused by: java.lang.NoCla ...

  9. 关于java.lang.reflect.InvocationTargetException(jar 包缺少或者冲突)的错误

    我在合肥那边运行了的是湖北石首市的项目没有错 可是回武汉之后 运行这个项目 点击这里的时候 就报错java.lang.reflect.InvocationTargetException   不是数据库 ...

随机推荐

  1. 2017年11月26日 C#流&&窗体对话框

    C#流 在顶端加入using System.IO就可以使用流 StreamReder a = new StreamReder();//读取 前面什么都可以 = sr.ReadToEnd();//用法 ...

  2. JBPM学习第6篇:通过Git导入项目

    1.登记到工作台 切换到目录: $SERVER_HOME/bin/ for Unix environment: ./standalone.shfor Windows environment: ./st ...

  3. Jvm运行时内存解析

    一.jvm的概念 在了解jvm的概念之前,我们先来了解java平台的逻辑结构,图片来自<深入java虚拟机> 从图中我们可以看到jdk包含了jre,java语言和java开发工具和Api, ...

  4. pyhton中list的基本操作

    list:可以按规则,按顺序,存取大量数据 1.增 append() 在列表尾部追加元素 insert() 按照列表索引添加元素 extend() 迭代添加元素,一次添加多个元素 2.删 pop() ...

  5. side Effect

    副作用 side Effect 副作用是在计算结果的过程中,系统状态的一种变化,或者与外部世界进行的可观察的交互. 副作用可能包含,但不限于: 1.更改文件系统 2.往数据库里插入数据 3.发送一个h ...

  6. JS之捕获冒泡和事件委托

    一.事件流(捕获,冒泡)   事件流:指从页面中接收事件的顺序,有冒泡流和捕获流. 当页面中发生某种事件(比如鼠标点击,鼠标滑过等)时,毫无疑问子元素和父元素都会接收到该事件,可具体顺序是怎样的呢?冒 ...

  7. CSS基础-CSS三大特性

    继承性 层叠性 优先级 优先级权重 !important

  8. csharp: using OleDb Getting the identity of the most recently added record

    /// <summary> /// 执行SQL语句,返回影响的记录数 /// </summary> /// <param name="SQLString&quo ...

  9. 【代码笔记】Java常识性基础补充(三)——Java的API及Object类、正则表达式、getTime()方法、DateFormat类、Calendar类

    1.0 Java 的API(API: Application(应用) Programming(程序) Interface(接口)) 2.0 Java API就是JDK中提供给我们使用的类,这些类将底层 ...

  10. VS2013 C++ 动态链接库的生成

    原文:http://www.cnblogs.com/djiankuo/p/5092025.html 这个东西搞了好几天,现在终于没有问题了,其实现在想来还是微软做的东西好用啊,在这里点个赞!!! LL ...