0

我尝试将 portlets 应用程序部署到 Liferay 门户(我是维护者,而不是作者)。

但我得到一个例外:

08:08:48,060 ERROR [AutoDeployDir:197] com.liferay.portal.kernel.deploy.auto.Aut
oDeployException: com.liferay.portal.kernel.xml.DocumentException: Invalid syste
m id classpath:/com/sun/faces/web-facesconfig_2_0.xsd Nested exception: Invalid
system id classpath:/com/sun/faces/web-facesconfig_2_0.xsd
com.liferay.portal.kernel.deploy.auto.AutoDeployException: com.liferay.portal.ke
rnel.xml.DocumentException: Invalid system id classpath:/com/sun/faces/web-faces
config_2_0.xsd Nested exception: Invalid system id classpath:/com/sun/faces/web-
facesconfig_2_0.xsd
        at com.liferay.portal.deploy.auto.PortletAutoDeployer.autoDeploy(Portlet
AutoDeployer.java:99)
        at com.liferay.portal.deploy.auto.PortletAutoDeployListener.deploy(Portl
etAutoDeployListener.java:78)
        at com.liferay.portal.kernel.deploy.auto.AutoDeployDir.processFile(AutoD
eployDir.java:180)
        at com.liferay.portal.kernel.deploy.auto.AutoDeployDir.scanDirectory(Aut
oDeployDir.java:222)
        at com.liferay.portal.kernel.deploy.auto.AutoDeployScanner.run(AutoDeplo
yScanner.java:50)
Caused by: com.liferay.portal.kernel.xml.DocumentException: Invalid system id cl
asspath:/com/sun/faces/web-facesconfig_2_0.xsd Nested exception: Invalid system
id classpath:/com/sun/faces/web-facesconfig_2_0.xsd
        at com.liferay.portal.xml.SAXReaderImpl.read(SAXReaderImpl.java:339)
        at com.liferay.portal.kernel.xml.SAXReaderUtil.read(SAXReaderUtil.java:1
27)
        at com.liferay.portal.tools.deploy.PortletDeployer.setupJSF(PortletDeplo
yer.java:429)
        at com.liferay.portal.tools.deploy.PortletDeployer.getExtraContent(Portl
etDeployer.java:146)
        at com.liferay.portal.tools.deploy.BaseDeployer.updateWebXml(BaseDeploye
r.java:1789)
        at com.liferay.portal.tools.deploy.BaseDeployer.deployDirectory(BaseDepl
oyer.java:530)
        at com.liferay.portal.tools.deploy.BaseDeployer.deployFile(BaseDeployer.
java:889)
        at com.liferay.portal.tools.deploy.BaseDeployer.deployFile(BaseDeployer.
java:819)
        at com.liferay.portal.deploy.auto.PortletAutoDeployer.autoDeploy(Portlet
AutoDeployer.java:96)
        ... 4 more
Caused by: org.dom4j.DocumentException: Invalid system id classpath:/com/sun/fac
es/web-facesconfig_2_0.xsd Nested exception: Invalid system id classpath:/com/su
n/faces/web-facesconfig_2_0.xsd
        at org.dom4j.io.SAXReader.read(SAXReader.java:484)
        at org.dom4j.io.SAXReader.read(SAXReader.java:264)
        at com.liferay.portal.xml.SAXReaderImpl.read(SAXReaderImpl.java:336)
        ... 12 more

因为它不在我的代码中,所以我不知道出了什么问题:(任何帮助表示赞赏。

4

1 回答 1

1
Caused by: org.dom4j.DocumentException: Invalid system id classpath:/com/sun/faces/web-facesconfig_2_0.xsd

此异常表明您有一个faces-config.xml文件由于某种原因被错误地声明为

<?xml version="1.0" encoding="UTF-8"?>
<faces-config
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee /com/sun/faces/web-facesconfig_2_0.xsd"
    version="2.0">
</faces-config>

代替

<?xml version="1.0" encoding="UTF-8"?>
<faces-config
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
    version="2.0">
</faces-config>
于 2012-04-10T13:59:09.337 回答