XML格式错误

卡勒尔·奥马尔(Kallel Omar)

我正在尝试运行tomcat7 Liferay服务器。但是控制台显示此错误:

org.xml.sax.SAXParseException; systemId: file:.../liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/conf/context.xml; lineNumber: 35; columnNumber: 2; The markup in the document following the root element must be well-formed.

我不知道context.html页面出了什么问题。我的context.html页面如下:

<?xml version="1.0" encoding="UTF-8"?>
<!--
  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.
--><!-- The contents of this file will be loaded for each web application --><Context>

    <!-- Default set of monitored resources -->
    <WatchedResource>WEB-INF/web.xml</WatchedResource>

    <!-- Uncomment this to disable session persistence across Tomcat restarts -->
    <!--
    <Manager pathname="" />
    -->

    <!-- Uncomment this to enable Comet connection tacking (provides events
         on session expiration as well as webapp lifecycle) -->
    <!--
    <Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
    -->

</Context>

<Resource name="jdbc/aperte-workflow-ds" auth="Container"type="javax.sql.DataSource"
username="liferay_user" password="abc123" driverClassName="com.mysql.jdbc.Driver"
url="jdbc: mysql://localhost:8081/aperte-workflow-data" maxActive="10" maxIdle="3" maxWait="10000"/>

有谁可以帮助我吗?

帕特里克·奥尔兹伯格

Resource标签应该是里面Context的标签。

...

<Context>

    ...

    <Resource name="jdbc/aperte-workflow-ds" auth="Container"type="javax.sql.DataSource"
    username="liferay_user" password="abc123" driverClassName="com.mysql.jdbc.Driver"
    url="jdbc: mysql://localhost:8081/aperte-workflow-data" maxActive="10" maxIdle="3" maxWait="10000"/>

</Context>

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

xml格式的Odoo错误

XML解析错误:格式错误

识别格式错误的XML文件

在格式错误的 xml 中转义额外的引号

Android Studio 3.2.1,XML错误缩进格式

XML解析错误:格式不正确

使用Java修复格式错误的XML

错误#1090:XML解析器失败:元素格式错误

strings.xml:这是什么格式错误的?

尺寸xml,无法生成“错误:'float | fraction'是无效的格式”。

XML代码的浏览器错误:“格式不正确”

为什么此XML产生“ ...必须格式正确”的验证错误?

属性错误:尝试以xml格式编写时

缺少属性引号的SQL Server解析(格式错误)XML

如何解析Java中格式错误的XML?

解析格式错误/不完整/无效的XML文件

Gradle在Central Maven中格式错误的pom.xml失败

Android XML解析错误(无效令牌,格式不正确)

打开xml错误:不支持给定路径的格式

无法创建应用:格式错误的config.xml

使用 C# 解析格式错误的 XML-SOAP

由于 xml 格式错误,QuickBooks CustomerAdd 请求失败?

从URL访问的XML文件解析的Nokogiri格式错误?

错误解析XML:格式不正确(无效令牌)

从XML在SQL Server中解析错误的日期格式

XML文件错误-Android(解析XML错误:格式不正确(无效的令牌))

PhoneGap 构建格式错误的 Config.xml 错误 -- 使用 XML 验证器

在strings.xml中使用长值时,Lint给出“格式格式错误”

Git svn clone:是否可以在错误后恢复XML格式错误:找不到元素?