Loading [MathJax]/jax/output/CommonHTML/config.js
前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
社区首页 >专栏 >xml文件错误之指令不允许匹配 原

xml文件错误之指令不允许匹配 原

作者头像
云飞扬
发布于 2019-03-13 02:17:55
发布于 2019-03-13 02:17:55
90900
代码可运行
举报
文章被收录于专栏:星汉技术星汉技术
运行总次数:0
代码可运行

问题描述

Eclipsexml文件报出如下错误:

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
The processing instruction target matching "[xX][mM][lL]" is not allowed.

报错的文件是hadoop2.7.1源码中hadoop-common项目中的empty-configuration.xml,此文件存在项目中的目录如下:

文件内容如下:

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
<!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
-->
<?xml version="1.0"?>
<configuration>
</configuration>

问题解析

在网上搜了一下这个错误信息,还真有,内容如下:

xml文件不能被解析,一般出现这样的问题在于xml格式上,并且问题多出现在xml文件的头部。 原因: (1)一般多是因为xml文件头部有了空格或回车导致的。 (2)字母大小写问题。 例如:<?xml version="1.0" encoding="UTF-8"?>不能写成<?XML version="1.0" encoding="UTF-8"?> 结论: <?xml version="1.0" encoding="UTF-8"?>前面不要有任何其他字符,如空格、回车、换行这些否则就会出现上面的异常。

解决方法

本人就将<?xml version="1.0"?>挪到了第一行的位置,错误解决,当本人在去查看hadoop刚解压的文件时,发现确实有这个文件,不是Maven下载导致的,所以本人就很纳闷,Apache不至于出这么大的问题吧?

修改过的内容如下:

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
<?xml version="1.0"?>
<!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
-->
<configuration>
</configuration>

至今仍是疑惑,有知道的朋友可以留言告知,谢谢!

(adsbygoogle = window.adsbygoogle || []).push({});

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2018/08/31 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
暂无评论
推荐阅读
编辑精选文章
换一批
context.xml
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/155657.html原文链接:https://javaforall.cn
全栈程序员站长
2022/09/07
1800
利用apache ftpserver搭建ftp服务器
二、usermanager采用mysql数据库管理用户时,ftpd-mysql.xml示例如下
用户7353950
2022/06/23
1.2K0
利用apache ftpserver搭建ftp服务器
1.1 搭建skywalking需要用到三个镜像
本文为joshua317原创文章,转载请注明:转载自joshua317博客 https://www.joshua317.com/article/264
joshua317
2022/09/08
1.6K0
Centos7安装Guacamole1.0.0以及自定义客户端 原
    Guacamole大致流程如下图所示,本文目的是快速完成安装部署,如需深入了解参阅官方文档或其他博客。
尚浩宇
2019/08/18
3.4K0
windows系统Tomcat启动过程中找不到JAVA_HOME解决方法
在winserver上明明已经安装了JDK1.6并设置好了JAVA_HOME,可偏偏Tomcat在启动过程中找不到。
zhangdd
2018/08/01
7730
lucene(全文搜索)_luceneweb例子
http://apache.dataguru.cn/lucene/java/2.9.4/
Hongten
2018/09/13
1K0
lucene(全文搜索)_luceneweb例子
【Spring Boot】012-Shiro入门
Shiro是一个强大且易于使用的 Java 安全框架,它执行身份验证、授权、加密和会话管理。有了 Shiro 的易于理解的 API,你可以快速而轻松地保护任何应用程序——从最小的移动应用程序到最大的 web 和企业应用程序;
訾博ZiBo
2025/01/06
940
【Spring Boot】012-Shiro入门
spring-gateway跨域坑
阿超
2023/12/30
1980
docker 部署 kafka zookeeper
为了使用异步的功能,为项目引入kafka组件,提供高可用的mq服务 本次使用单点的方式为例子,集群同理
用户9347382
2022/01/10
4920
Java Web JDBC数据源
在tomcat中配置数据库连接池 在tomcat中的conf文件下:context.xml配置文件中配置 代码: <?xml version='1.0' encoding='utf-8'?> <!--
Hongten
2018/09/13
4570
struts标签 checkboxlist 换行解决办法
struts标签 checkboxlist 默认是不换行的,显示列表会非常丑,百度了一圈解决办法就是要修改源文件
西门呀在吹雪
2020/11/09
6450
struts标签 checkboxlist 换行解决办法
Spring Cloud Alibaba(四):Nacos服务注册与发现
微服务的起点就是服务注册与发现,Spring Cloud Alibaba系列将使用Nacos作为服务注册与发现。
冯文议
2021/04/28
5290
Spring Cloud Alibaba(四):Nacos服务注册与发现
Tomcat的Manager显示403 Access Denied的解决办法
管理tomcat的时候遇到了以下问题:   1.刚开始需要用户名密码,不知道用户名和密码是什么,但是输入什么都不正确。   解决办法:   自己在tomcat-users.xml中按格式添加用户 conf文件夹里面   默认是注释掉了的,这主要是考虑到服务器的安全,如果是本地测试,去掉以下这段注释,然后重启动服务器,再输入    <role rolename="tomcat"/>     <role rolename="role1"/>     <user username="tomcat" password="tomcat" roles="tomcat"/>     <user username="both" password="tomcat" roles="tomcat,role1"/>     <user username="role1" password="tomcat" roles="role1"/>   用户和密码都一目了然了。    2.进入manager界面之后,显示的是403 Access Denied。   解决办法:   在conf/tomcat-users.xml文件中看到这么一段话:   NOTE:  By default, no user is included in the "manager-gui" role required     to operate the "/manager/html" web application.  If you wish to use this app,     you must define such a user - the username and password are arbitrary.   也就是说,为了考虑安全,tomcat默认还是没有manager-gui的管理权限的,如果想要使用manager   的话,需要自行加入管理权限(角色)。   需要加一个这样的权限(角色)   <role rolename="manager-gui"/>   然后再加到需要的用户名中去   <user username="tomcat" password="tomcat" roles="tomcat,manager-gui"/>   这样OK了。
星哥玩云
2022/06/30
1.5K0
修改mybatis-plus更新策略
https://github.com/apache/incubator-streampark/pull/3615
阿超
2024/04/05
2970
聊聊flink的logback配置
flink-release-1.7.1/flink-dist/src/main/flink-bin/bin/flink-daemon.sh
code4it
2019/02/14
2.4K0
聊聊flink的logback配置
ActiveMQ几个重要的配置文件
version:5.10,在5.8以后增加了levelDB的方式进行集群配置 ①.wrapper.conf: # ------------------------------------------------------------------------ # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file di
用户1215919
2018/02/27
4K1
spring获取AliasFor增强的注解
此处是关于issue:https://gitee.com/dromara/stream-query/issues/I7BSNV
阿超
2023/06/23
2270
为shenyu的PortUtils.findPort添加单元测试
今天为shenyu的shenyu-client-core模块下添加了PortUtils.findPort的test case:
阿超
2023/05/11
1400
为shenyu的PortUtils.findPort添加单元测试
如何禁止ambari-server.log中显示cloudera地址异常栈的解决方案分享
是的,今天就来说一下 ambari-server.log 日志中出现上述错误的原因及解决办法。
create17
2023/02/13
6380
如何禁止ambari-server.log中显示cloudera地址异常栈的解决方案分享
开发dubbo应用程序(一)入门demo详解
https://github.com/apache/dubbo-samples/tree/2.6.x
Dream城堡
2019/08/07
1.1K0
开发dubbo应用程序(一)入门demo详解
相关推荐
context.xml
更多 >
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档
本文部分代码块支持一键运行,欢迎体验
本文部分代码块支持一键运行,欢迎体验