-
Unable to locate Spring NamespaceHandler
for XML
schema namespace
问题的解决
被这个问题折磨着很久:参考:
/blog/1340777
(
cfx
与
spring
整
合的时候出现的问<
/p>
题
:finiti
onParsingE
xception: Configuration problem: Unable to
locate Spring NamespaceHandler for XML
schema
namespace [/jaxws]Offending
resource: ServletContext resource
[/WEB-INF/]
)
Key WordsSpring
3.0Apache CXF 2.X.X
昨日,
在原本应用
中添加了关于
webService
的
调用,使用了
Apache CXF
框
架,并将其集成到了
Spring
中。
当时集成时,使用了如下
的
jar
包(
)
这就是导致出现
Unable to
locate Spring NamespaceHandler for XML
schema
namespace
的问题。
接下来,你可以参考
/questi
ons/3650252/problem-starti
ng-spring-
application-from-java
你可以选择手工合并所有
的
rs
与
s,
或者和我一样换回到
Spring 2.5,
并将<
/p>
中的这两个文件重新命名,
然后
不使用
Spring
集成,先让程序跑起来不影
响业务。
参考
/browse/SP
R-8368
这里面说的
更加详细一些
With the splitting of Spring Framework
into
multiple jar files in v3.0, there
are now several files named
normal servlet
container, but poses problems when e.g.
creating an executable JAR file from a
webapp using an
embedded web server
such as Jetty, or running GWT in
The
workaround is to construct your own
these three files, merging all the
copies into one like
so://IOUtils and
FileUtils come from Apache Commons
IOfor(String s : new String[]
{
e =
ssLoader().g
etResources(
s);StringBuilder out = new
StringBuilder();while(eElements()) {
URL u =
(URL) ement();
(ng(ream())).append(
; }File
outf = new File(s);tringToFile(outf,
ng(),
to use a different
file-name for each instance of the
schemas/handlers/tooling files. For
example, inside
you would
find
I'm not sufficiently
up-to-speed with the Spring code-base
to give you a patch to do this, however
a brief investigation
shows that
specified in
bleSchema
Resolver and
DefaultNamespaceHandlerResolver, and
that constructors exist for specifying
different locations for
these files. I
hope you find this information useful.
或许这
个已经在新版本里面已经
fixed
了,
我已经下了最新的版本,
还没有来得及测试。
如果你也遇到这个问题,
首先恭喜你。
其次,你可以按照以上的方式做一个
“your own
version of these
three files”,使用
//IOUtils
and FileUtils
come from Apache Commons
IOfor(String s : new String[]
{
{
Enumeration<?> e =
ssLoader().getResources(
s);
StringBuilder out = new
-
-
-
-
-
-
-
-
-
上一篇:通知书之紧急通知英文翻译
下一篇:实验二 红外测距传感器实验