- 浏览: 966690 次
- 性别:
- 来自: 江西上饶
-
文章分类
- 全部博客 (460)
- p.spring (56)
- p.maven (20)
- p.ant (17)
- p.jee (18)
- p.jse (33)
- p.ofbiz (31)
- p.软件工程 (8)
- p.struts2 (5)
- p.hibernate (5)
- linux (25)
- 设计模式 (2)
- p.javascript (11)
- 硬件 (1)
- p.jsp (2)
- p.windows批处理 (1)
- 操作系统问题 (5)
- 算法 (1)
- p.mysql (7)
- p.sql (5)
- p.c (1)
- google产品 (0)
- 内存 (1)
- p.struts (1)
- p.freemarker (7)
- p.css (4)
- p.log4j (10)
- p.html (3)
- 淘宝产品 (0)
- 其他 (3)
- 编译器 (0)
- svn (4)
- p.spring.security (11)
- 图形 (0)
- p.xml (1)
- p.ssh (0)
- p.jquery (4)
- p.jdbc (3)
- p.flex (0)
- p.c++ (0)
- p.c#Net (0)
- p.assembly (0)
- p.sqlserver (0)
- p.其他 (3)
- p.webwork (21)
- p.wap (12)
- p.cglib (1)
- p.jee服务器 (11)
- windows (2)
- p.iphone (1)
- p.java.分布式与集群 (2)
- p.ibatis (16)
- p.eclipse (5)
- 架构 (2)
- http协议 (5)
- 我的个人标准 (2)
- 多线程 (1)
- 奇怪问题 (5)
- p.jira (13)
- p.httpclient (1)
- 服务器.apache (11)
- 安全防范 (1)
- p.PODAM (1)
- p.junit (16)
- fop (2)
- 硬盘安装 (1)
- powerdesigner (0)
- 单元测试 (1)
- apache commons (4)
- tomcat+apache集群 (10)
- 各类诡辩 (1)
- 安卓 (8)
- qvod (1)
- java编程基础知识考试考点及答案 (0)
- 工作总结 (4)
- oracle (0)
- spring的util工具 (3)
- json (2)
- maven (3)
- jms (19)
- p.bat (3)
- hadoop (2)
- git (3)
- nginx (1)
- p.移动开发 (1)
- shiro (3)
- 游戏破解 (1)
- react-native (7)
- ios开发 (1)
- webmagic (6)
- socks5 (1)
最新评论
-
weituotian:
说的不好,没人看的
公司系统中的菜单功能和权限功能 -
石不易:
非常详细的注解~
绑定端口和IP,Listen 与VirtualHost指令 -
spring_springmvc:
spring mvc demo教程源代码下载,地址:http: ...
spring mvc -
liyixing1:
PandaDONG 写道谢谢你啊,我已经下下来了,只是还有很多 ...
jira war安装 -
liyixing1:
PandaDONG 写道谢谢你啊,我已经下下来了,只是还有很多 ...
jira war安装
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Config
uration problem: Unable to locate Spring NamespaceHandler for XML schema namespa
ce [http://www.springframework.org/schema/tx]
原因是因为在使用没有把jar包引进来!(org.springframework.transaction-.jar)。
mvn install assembly:assembly -X,需要显示引入jar。
还有就是头部的
这里的xmlns和schemaLocation要按照jar文件中提供的路径和版本写。
还需注意的是spring对xml的schema的描述文件都是spring.handlers spring.schemas spring.tooling
所以引入了多个spring的依赖包,他们都有META-INF/,如果他们的META-INF下面有同名文件,打包插件只会处理第一个。
该BUG具体
https://issues.apache.org/jira/browse/MASSEMBLY-360
以一般推荐使用另外的一个插件来进行打包,插件名称为:maven-shade-plugin,shade插件打包时在对spring.schemas文件处理上,它能够将所有jar里的spring.schemas文件进行合并,在最终生成的单一jar包里,spring.schemas包含了所有出现过的版本的集合,要使用shade插件,必须在pom进行如下配置:
上面配置文件中有一段定义:
上面这段配置意思是把spring.handlers和spring.schemas文件以append方式加入到构建的jar包中,这样就不会存在出现xsd找不到的情况。
调用mvn clean install命令进行构建,构建成功后打开工程target目录,发现生成了2个jar
original开头的是不包含依赖包的
uration problem: Unable to locate Spring NamespaceHandler for XML schema namespa
ce [http://www.springframework.org/schema/tx]
原因是因为在使用没有把jar包引进来!(org.springframework.transaction-.jar)。
mvn install assembly:assembly -X,需要显示引入jar。
<dependency> <groupId>org.springframework</groupId> <artifactId>spring-tx</artifactId> <version>4.0.0.RELEASE</version> </dependency>
还有就是头部的
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">
这里的xmlns和schemaLocation要按照jar文件中提供的路径和版本写。
还需注意的是spring对xml的schema的描述文件都是spring.handlers spring.schemas spring.tooling
所以引入了多个spring的依赖包,他们都有META-INF/,如果他们的META-INF下面有同名文件,打包插件只会处理第一个。
该BUG具体
https://issues.apache.org/jira/browse/MASSEMBLY-360
以一般推荐使用另外的一个插件来进行打包,插件名称为:maven-shade-plugin,shade插件打包时在对spring.schemas文件处理上,它能够将所有jar里的spring.schemas文件进行合并,在最终生成的单一jar包里,spring.schemas包含了所有出现过的版本的集合,要使用shade插件,必须在pom进行如下配置:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>1.4</version> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <transformers> <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"> <resource>META-INF/spring.handlers</resource> </transformer> <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> <mainClass>com.chenzhou.examples.Main</mainClass> </transformer> <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"> <resource>META-INF/spring.schemas</resource> </transformer> </transformers> </configuration> </execution> </executions> </plugin>
上面配置文件中有一段定义:
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"> <resource>META-INF/spring.schemas</resource> </transformer>
上面这段配置意思是把spring.handlers和spring.schemas文件以append方式加入到构建的jar包中,这样就不会存在出现xsd找不到的情况。
调用mvn clean install命令进行构建,构建成功后打开工程target目录,发现生成了2个jar
original开头的是不包含依赖包的
发表评论
-
Spring 定时任务,cron表达式,@Scheduled cron表达式
2016-04-25 15:48 5312一个cron表达式有至少6 ... -
spring mvc list
2015-12-14 10:28 1297我使用这样无法传入 @requestMapping(" ... -
Invalid signature file digest for Manifest main attributes
2015-09-23 14:26 8353java.lang.SecurityException: In ... -
关于使用s.url jstl的上下文
2015-08-16 13:28 932比如 [@s.url '/'/]index.html?cote ... -
Spring 属性占位符配置器 PropertyPlaceholderConfigurer
2015-08-02 12:43 2098<!-- 属性配置文件读 ... -
利用maven的filter和profile实现不同环境使用不同的配制
2015-07-30 12:54 727通过命令行模式 https://liyixing1.itey ... -
Nexus 仓库管理器
2015-04-02 11:15 1143简介 仓库管理器有两个 ... -
Profile
2015-03-30 11:55 640Profile是可以在指定环境通过指定指令或者自动触发,用来 ... -
settings.xml
2014-12-31 10:41 761settings.xml文件可以放在两个地方 • Maven安 ... -
项目依赖
2014-12-30 22:19 658依赖具有范围,默认为全局范围 也可以指定依赖范围 Maven ... -
属性 自定义属性 资源过滤
2014-12-30 21:57 1262通过${}访问属性 。Mave ... -
版本号规范,镜像版本SNAPSHOT,LATEST 和 RELEASE 版本
2014-12-30 16:46 6165如果版本号不遵守maven规范,那么maven在对版本进行排序 ... -
依赖传递分析 dependency 插件
2014-12-30 15:29 986基本分析: mvn dependency:analyze 可 ... -
多模块项目
2014-12-29 17:02 520多模块首先需要创建一个父项目,父项目负责对子项目的管理,按照规 ... -
archetype
2014-12-28 21:15 778网址 该插件为maven原型插件,该插件平台上存储了多种常见的 ... -
打包插件 assembly
2014-12-27 14:14 796http://maven.apache.org/plugins ... -
测试插件,surefire-plugin
2014-12-27 13:41 890主页 完整参数 maven默认配置已经加载过该插件 相当于 ... -
插件,插件目标,生命周期,坐标,仓库,依赖管理
2014-12-25 16:07 498插件与目标(Plugins and g ... -
help插件
2014-12-24 15:56 748Maven Help 插件有四个目标。前三个目标是—— act ... -
pom.xml
2014-12-24 13:57 747每个maven文件都需要一 ...
相关推荐
使用assembly插件打包jar后启动时,总是出现Unable to locate Spring NamespaceHandler for XML schema....错误,网上找了各种方法都没有用,在尝试了100+失败后,解决了这个问题,在打包的jar中,META-INF目录下,...
在搭建spring项目时通常需要这些jar包 ...org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace ...
Exception in thread "main" org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace ...
在“spring-batch-example”这个压缩包中,我们很可能会找到一些示例代码或配置文件,展示如何在实际项目中利用Spring Batch的临时存储特性。这些示例可能包含如何设置JobRepository,如何定义分片策略,以及如何...
selenium+firefox在定位时遇到selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: 由于是js加载页面,想确认是否是js的原因,随后进行多次调试时发现“//div”竟然也出现了...
在Linux系统中,GCC(GNU Compiler Collection)是一个关键的开源工具链,用于编译C、C++、Fortran、Objective-C等编程语言的源代码。它不仅包括了编译器,还包括预处理器、链接器和其他相关工具。...
lingo0.9破解版
在本文中,我们将深入探讨如何在Ubuntu 12.04(64位)服务器上安装Oracle 11G数据库,以及解决可能遇到的最新问题。在开始之前,请确保你的系统是最新版本,通过运行以下命令进行更新和升级: ...
1、Unable to locate provider for protocol: smtp –>缺少依赖造成的 <groupId>javax.mail <artifactId>mail <version>1.4 <groupId>javax.activation <artifactId>activation</artifactId>
Unable to locate decompressor to decompress video stream 此时即可利用此软件进行转换,转为'Cinepak'压缩格式的avi视频…… 转化完成后,利用aviinfo即可看到转化后avi视频的压缩格式…… 然后就可以...
Mingw32(Minimalist GNU for Windows 32-bit)是一种流行的交叉编译工具链,它可以用来在非 Windows 平台(如 Linux 或 Unix)上编译出可以在 Windows 上运行的程序。本文将详细介绍如何在 Ubuntu 系统中搭建一个...
在文档中提到的“Linux System Administration 1 Study Guide for Labwork for LPI 101”是一个针对Linux专业人士认证(Linux Professional Institute Certification)第一级别(LPI 101)的学习指南。LPI是一个全球...
软件介绍: 如果你的系统因各种原因出现开机不能引导,引导文件损坏不能进系统,不需要重新系统,先使用本工具进行修复,将系统引导修复工具BootRepair放到带有PE启动的U盘中,使用U盘来引导系统,运行Boot...
主要介绍了Python3 venv搭建轻量级虚拟环境的步骤(图文),文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
Implemented ability to add Ribbon Galleries to the dialogs (see screenshot). The new class CBCGPRibbonGalleryCtrl may be used for this purpose. Please take a look at BCGPMSOffice2007Demo example ...
BCGControlBarPro.v12.00完整源代码(含资源汉化帮助文件和VS2008中文向导)第三部分 使用方法: ... ...2、双击导入注册表C:\Program Files\BCGSoft\BCGControlBarPro\bcgcontrolbarpro.12.00.reg;...
在Linux系统中,`lib64stdc++6_6.2.0-5ubuntu12_i386.tar.gz`是一个重要的库文件,用于支持C++编程语言的运行环境。这个压缩包包含了`libstdc++.so.6.0.22`,这是一个动态链接库,是GNU C++标准库的组成部分,对于...
在使用Qt进行串行通信开发时,可能会遇到一个与Qt Serialbus模块相关的错误,提示“dropping older ADU fragments due to larger than 3.5 char”。这个错误通常出现在处理CAN(Controller Area Network)协议的数据...
在本篇文章里小编给大家分享的是关于docker容器调用yum报错的解决办法,有兴趣的朋友们可以参考下。