news 2026/5/12 12:12:13

nested exception is org.springframework.beans.factory.parsing.BeanDefinitionParsingException

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
nested exception is org.springframework.beans.factory.parsing.BeanDefinitionParsingException

记一次启动tomcat时,遇到的无法加载[spring/dubbo-service.xml][spring/spring-context.xml]问题。

今天在生产环境部署一个dubbo项目,遇到如下报错:

2022-03-23 17:12:24.553 ERROR TraceId[] From[] To[] org.springframework.web.context.ContextLoader - Context initialization failed org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from relative location [dubbo-service.xml] Offending resource: class path resource [spring/spring-context.xml]; nested exception is org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from relative location [dubbo-consumer.xml] Offending resource: class path resource [spring/dubbo-service.xml]; nested exception is org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 6 in XML document from class path resource [spring/dubbo-consumer.xml] is invalid; nested exception is org.xml.sax.SAXParseException; systemId: http://code.alibabatech.com/schema/dubbo/dubbo.xsd; lineNumber: 6; columnNumber: 68; TargetNamespace.1: Expecting namespace 'http://code.alibabatech.com/schema/dubbo', but the target namespace of the schema document is 'http://dubbo.apache.org/schema/dubbo'. at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:70) at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85) at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:76)

Expecting namespace ‘http://code.alibabatech.com/schema/dubbo’, but the target namespace of the schema document is ‘http://dubbo.apache.org/schema/dubbo’.

问题原因:

dubbo 版本冲突!!!

找到lib目录里的dubbo包,删掉低版本的即可,问题解决

版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/5/7 20:12:59

AI如何助力棋牌游戏开发:从代码生成到智能优化

快速体验 打开 InsCode(快马)平台 https://www.inscode.net输入框内输入如下内容: 创建一个基于元开棋牌送6体验金币官网的棋牌游戏项目,包含以下功能:1. 用户注册登录系统;2. 金币赠送和消耗逻辑;3. 多种棋牌游戏玩…

作者头像 李华
网站建设 2026/5/9 4:48:04

Nginx 的 proxy_pass 使用简介

文章目录 1. 基本概念 1.1 proxy_pass 概述1.2 语法1.3 使用场景 2. 基本用法 2.1 HTTP 代理 2.1.1 基本示例2.1.2 绝对根路径 vs 相对路径 2.2 Stream 代理 3. 高级用法 3.1 正则匹配3.2 变量使用3.3 重定向3.4 精确匹配3.5 if 语句3.6 limit_except 4. 实际案例 4.1 转发到多…

作者头像 李华
网站建设 2026/5/1 1:50:51

Nginx 生成、配置SSL证书让浏览器信任证书

文章目录 1.生成SSL证书 1.1生成自签名证书(生成证书方式一)1.2.模拟CA机构方式生成证书(生成证书方式二,推荐) 3.1 生成 CA 的私钥ca.key和自签名证书ca.crt:3.2 生成服务器私钥 server.key:3.3 生成服务器证书请求文件server.csr&#xff…

作者头像 李华
网站建设 2026/5/2 21:09:02

如何查看电脑上是ros1还是ros2呢?

问题描述:如何查看电脑上是ros1还是ros2呢?问题解答:要查看你的电脑上安装的是 ROS 1 还是 ROS 2,可以通过以下几种方式来确认:1. 检查环境变量ROS 通常会在环境变量中设置一些标识,可以通过查看终端中的环…

作者头像 李华
网站建设 2026/5/11 2:11:38

net.sf.jsqlparser.statement.select.Select.getSelectBody()

1、问题原因 发生这个问题就是因为Pagehelper中jsqlparser和Mybatis-puls中jsqlparser冲突,以我的项目来说,我项目中的Pagehelper中jsqlparser版本为4.2而Mybatis-puls中jsqlparser的版本为4.9,就导致版本兼容问题 2、解决方法 如果你想以…

作者头像 李华
网站建设 2026/5/2 20:07:03

Nginx 安装及配置教程(Windows)【安装】

文章目录 一、 Nginx 下载 1. 官网下载2. 其它渠道 二、 Nginx 安装三、 配置四、 验证五、 其它问题 1. 常用命令2. 跨域问题 软件 / 环境安装及配置目录 一、 Nginx 下载 1. 官网下载 安装地址:https://nginx.org/en/download.html 打开浏览器输入网址 htt…

作者头像 李华