存档中部署描述符文件WEB-INF / web.xml中的无效部署描述符

时间:2012-10-15 10:26:38

标签: java glassfish glassfish-3

我正在使用GlassFish服务器的Java项目。项目中没有错误但是当我试图运行它时,它显示此错误_

SEVERE: DPL8015: Invalid Deployment Descriptors in Deployment descriptor file WEB-INF/web.xml in archive [web]. 
Line 9 Column 22 -- cvc-complex-type.2.4.d: Invalid content was found starting with element 'description'. No child element is expected at this point.
SEVERE: DPL8005: Deployment Descriptor parsing failure : cvc-complex-type.2.4.d: Invalid content was found starting with element 'description'. No child element is expected at this point.
SEVERE: Exception while deploying the app
java.io.IOException: org.xml.sax.SAXParseException: cvc-complex-type.2.4.d: Invalid content was found starting with element 'description'. No child element is expected at this point.
    at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:170)
    at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:79)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:612)
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.d: Invalid content was found starting with element 'description'. No child element is expected at this point.
    at com.sun.enterprise.deployment.io.DeploymentDescriptorFile.read(DeploymentDescriptorFile.java:304)
    at com.sun.enterprise.deployment.io.DeploymentDescriptorFile.read(DeploymentDescriptorFile.java:225)
    at com.sun.enterprise.deployment.archivist.Archivist.readStandardDeploymentDescriptor(Archivist.java:614)
    at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:366)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:238)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:247)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:208)
    at com.sun.enterprise.deployment.archivist.ApplicationFactory.openArchive(ApplicationFactory.java:148)

什么是错的,是否有人面临这个问题?

Discriptor
<context-param>
    <param-name>tiles-definitions</param-name>
    <param-value>/WEB-INF/tiles.xml</param-value>
    <description> Tiles configuration definition files and a listener need to be defined. the
        listener will initialize JspTilesViewHandlerImpl with tiles definitions. 
    </description>
</context-param>

1 个答案:

答案 0 :(得分:7)

根据javaee description标记应该是第一个标记而不是最后一个标记