Dubbo Common Errors
1. Caused by: java. lang. reflect. MalformedParameterizedTypeException
Startup error,The cause is that dubbo depends on spring 2.5.6.SEC03, and spring 3.2.4.RELEASE is used in my project, which causes a conflict.. Remove the spring dependency in dubbo in maven.
If this error is reported in your project, it may also be caused by jar package conflicts.
<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
Error cause: http://stackoverflow.com/questions/23813369/spring-java-error-namespace-element-annotation-config-on-jdk-1-5-and-high
Jdk1.8 is used, while dubbo depends on Spring 2.5. Spring2.5 only supports jdk 1.7 to jdk 1.8. Therefore, jdk is not identified and an error is returned.
3. caused by: org. xml. sax. SAXParseException; lineNumber: 9; columnNumber: 46; cvc-complex-type.2.4.c: wildcard matching is comprehensive, but the declaration of the element 'dubbo: application' cannot be found.
This error is because the dubbo jar package is not introduced. Add the dependency:
<dependency><groupId>com.alibaba</groupId><artifactId>dubbo</artifactId><exclusions> </dependency>
4. Unsupported major. minor version 52.0 (unable to load class
This error occurs because the JDK version of the class compiler is later than the JDK version of the runtime.
For example, this error occurs when I run the Tomcat servlet, because the tomcat Runtime is JDK 1.7, And the Eclipse compilation is 1.8.
Modification Method: ensure that the JDK version of the compiler is consistent with that of the runtime.