1
我正在使用maven構建耳朵,並在使用java 1.6創建後,我試圖在Websphere 6.1上進行部署。一旦部署它給這個警告,然後在下面的錯誤:由於XSD,無法讀取application.xml
> +++ Warning +++: Sun Feb 12 10:17:03 AST 2012 org.xml.sax.SAXParseException: schema_reference.4: Failed to read
> schema document 'http://java.sun.com/xml/ns/javaee/application_6.xsd',
> because 1) could not find the document; 2) the document could not be
> read; 3) the root element of the document is not <xsd:schema>.
錯誤:
> org.eclipse.jst.j2ee.commonarchivecore.internal.
> exception.DeploymentDescriptorLoadException: META-INF/application.xml
> Stack trace of nested exception:
> org.eclipse.jst.j2ee.commonarchivecore.internal.exception.ResourceLoadException:
> IWAE0007E Could not load resource "META-INF/application.xml" in
> archive "D:\IBM\SDP70\runtimes\base_v61\profiles\AppSrv
> 01\wstemp\0\upload\finapp-ear-1.0-SNAPSHOT.ear" Stack trace of nested
> exception: Wrapped exception org.xml.sax.SAXParseException: cvc-elt.1:
> **Cannot find the declaration of element 'application'.** at
> org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
> Source)
我試圖尋找在論壇和谷歌,但真的不能找到任何關於它的混凝土。
我甚至試圖把application_6.xsd放在{WAS_HOME}/runtimes/base_61/properties/schemas/
但是無濟於事。
application.xml
實際上是由maven製作的,所以我不認爲它應該有任何問題。這就是它的樣子:
<?xml version="1.0" encoding="UTF-8" ?>
<application 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/application_6.xsd" version="6">
誰能告訴我這裏有什麼問題嗎?