2012-10-15 164 views
0

我正在使用GlassFish服務器的Java項目。項目中沒有錯誤,但是當我嘗試運行它時,它顯示此error_部署描述符文件中的無效部署描述符文件中的WEB-INF/web.xml

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

您是否嘗試使用schema/dtd驗證您的web.xml? – shyam

+0

對不起,先生,但它在哪裏? –

回答

7

根據javaeedescription標籤應該是第一個標籤不是最後一個

+0

當我在Eclipse中使用這個項目時,它顯示錯誤像這樣__ _無法解析JRE:mustang(標準虛擬機)_當我去項目> >屬性>>庫 –

+0

這是相關的同一個問題? – shyam

+0

是的,當我使用netBeans它在運行時顯示上述錯誤,並在Eclipse中顯示此無法解析JRE:mustang(標準虛擬機) –