我试图在weblogic 12c上部署maven项目。项目在春季4(Java 1.8)中配置。下面是我的WebLogic.xml
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app xmlns="http://xmlns.oracle.com/weblogic/weblogic-web-app" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.0/weblogic-web-app.xsd">
<jsp-descriptor>
<keepgenerated>true</keepgenerated>
<debug>true</debug>
</jsp-descriptor>
<context-root>/FileCompare</context-root>
<fast-swap>
<enabled>false</enabled>
</fast-swap>
</weblogic-web-app>
下面是我的web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1">
<display-name>FileCompare</display-name>
<welcome-file-list>
<welcome-file>login.jsp</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>
这两个文件的位置在WEB-INF下。我已经成功地在apache tomcat8上部署了这个。但是在尝试在weblogic 12c上部署战争时遇到错误
Message icon - Error Unable to access the selected application.
Message icon - Error VALIDATION PROBLEMS WERE FOUND <3:5> problem: cvc-complex-type.2.4a: Expected elements 'module-name@http://java.sun.com/xml/ns/javaee description@http://java.sun.com/xml/ns/javaee display-name@http://java.sun.com/xml/ns/javaee icon@http://java.sun.com/xml/ns/javaee distributable@http://java.sun.com/xml/ns/javaee context-param@http://java.sun.com/xml/ns/javaee filter@http://java.sun.com/xml/ns/javaee filter-mapping@http://java.sun.com/xml/ns/javaee listener@http://java.sun.com/xml/ns/javaee servlet@http://java.sun.com/xml/ns/javaee servlet-mapping@http://java.sun.com/xml/ns/javaee session-config@http://java.sun.com/xml/ns/javaee mime-mapping@http://java.sun.com/xml/ns/javaee welcome-file-list@http://java.sun.com/xml/ns/javaee problem-page@http://java.sun.com/xml/ns/javaee jsp-config@http://java.sun.com/xml/ns/javaee security-constraint@http://java.sun.com/xml/ns/javaee login-config@http://java.sun.com/xml/ns/javaee security-role@http://java.sun.com/xml/ns/javaee env-entry@http://java.sun.com/xml/ns/javaee ejb-ref@http://java.sun.com/xml/ns/javaee ejb-local-ref@http://java.sun.com/xml/ns/javaee service-ref@http://java.sun.com/xml/ns/javaee resource-ref@http://java.sun.com/xml/ns/javaee resource-env-ref@http://java.sun.com/xml/ns/javaee message-destination-ref@http://java.sun.com/xml/ns/javaee persistence-context-ref@http://java.sun.com/xml/ns/javaee persistence-unit-ref@http://java.sun.com/xml/ns/javaee post-construct@http://java.sun.com/xml/ns/javaee pre-destroy@http://java.sun.com/xml/ns/javaee data-source@http://java.sun.com/xml/ns/javaee message-destination@http://java.sun.com/xml/ns/javaee locale-encoding-mapping-list@http://java.sun.com/xml/ns/javaee absolute-ordering@http://java.sun.com/xml/ns/javaee' instead of 'display-name@http://xmlns.jcp.org/xml/ns/javaee' here in element web-app@http://java.sun.com/xml/ns/javaee <5:7> problem: cvc-complex-type.2.4a: Expected element 'welcome-file@http://java.sun.com/xml/ns/javaee' instead of 'welcome-file@http://xmlns.jcp.org/xml/ns/javaee' here in element welcome-file-list@http://java.sun.com/xml/ns/javaee <6:7> problem: cvc-complex-type.2.4a: Expected element 'welcome-file@http://java.sun.com/xml/ns/javaee' instead of 'welcome-file@http://xmlns.jcp.org/xml/ns/javaee' here in element welcome-file-list@http://java.sun.com/xml/ns/javaee <7:7> problem: cvc-complex-type.2.4a: Expected element 'welcome-file@http://java.sun.com/xml/ns/javaee' instead of 'welcome-file@http://xmlns.jcp.org/xml/ns/javaee' here in element welcome-file-list@http://java.sun.com/xml/ns/javaee <8:7> problem: cvc-complex-type.2.4a: Expected element 'welcome-file@http://java.sun.com/xml/ns/javaee' instead of 'welcome-file@http://xmlns.jcp.org/xml/ns/javaee' here in element welcome-file-list@http://java.sun.com/xml/ns/javaee <9:7> problem: cvc-complex-type.2.4a: Expected element 'welcome-file@http://java.sun.com/xml/ns/javaee' instead of 'welcome-file@http://xmlns.jcp.org/xml/ns/javaee' here in element welcome-file-list@http://java.sun.com/xml/ns/javaee <10:7> problem: cvc-complex-type.2.4a: Expected element 'welcome-file@http://java.sun.com/xml/ns/javaee' instead of 'welcome-file@http://xmlns.jcp.org/xml/ns/javaee' here in element welcome-file-list@http://java.sun.com/xml/ns/javaee <4:5> problem: cvc-complex-type.2.4c: Expected element 'welcome-file@http://java.sun.com/xml/ns/javaee' before the end of the content in element welcome-file-list@http://java.sun.com/xml/ns/javaee
Message icon - Error VALIDATION PROBLEMS WERE FOUND <3:5> problem: cvc-complex-type.2.4a: Expected elements 'module-name@http://java.sun.com/xml/ns/javaee description@http://java.sun.com/xml/ns/javaee display-name@http://java.sun.com/xml/ns/javaee icon@http://java.sun.com/xml/ns/javaee distributable@http://java.sun.com/xml/ns/javaee context-param@http://java.sun.com/xml/ns/javaee filter@http://java.sun.com/xml/ns/javaee filter-mapping@http://java.sun.com/xml/ns/javaee listener@http://java.sun.com/xml/ns/javaee servlet@http://java.sun.com/xml/ns/javaee servlet-mapping@http://java.sun.com/xml/ns/javaee session-config@http://java.sun.com/xml/ns/javaee mime-mapping@http://java.sun.com/xml/ns/javaee welcome-file-list@http://java.sun.com/xml/ns/javaee problem-page@http://java.sun.com/xml/ns/javaee jsp-config@http://java.sun.com/xml/ns/javaee security-constraint@http://java.sun.com/xml/ns/javaee login-config@http://java.sun.com/xml/ns/javaee security-role@http://java.sun.com/xml/ns/javaee env-entry@http://java.sun.com/xml/ns/javaee ejb-ref@http://java.sun.com/xml/ns/javaee ejb-local-ref@http://java.sun.com/xml/ns/javaee service-ref@http://java.sun.com/xml/ns/javaee resource-ref@http://java.sun.com/xml/ns/javaee resource-env-ref@http://java.sun.com/xml/ns/javaee message-destination-ref@http://java.sun.com/xml/ns/javaee persistence-context-ref@http://java.sun.com/xml/ns/javaee persistence-unit-ref@http://java.sun.com/xml/ns/javaee post-construct@http://java.sun.com/xml/ns/javaee pre-destroy@http://java.sun.com/xml/ns/javaee data-source@http://java.sun.com/xml/ns/javaee message-destination@http://java.sun.com/xml/ns/javaee locale-encoding-mapping-list@http://java.sun.com/xml/ns/javaee absolute-ordering@http://java.sun.com/xml/ns/javaee' instead of 'display-name@http://xmlns.jcp.org/xml/ns/javaee' here in element web-app@http://java.sun.com/xml/ns/javaee <5:7> problem: cvc-complex-type.2.4a: Expected element 'welcome-file@http://java.sun.com/xml/ns/javaee' instead of 'welcome-file@http://xmlns.jcp.org/xml/ns/javaee' here in element welcome-file-list@http://java.sun.com/xml/ns/javaee <6:7> problem: cvc-complex-type.2.4a: Expected element 'welcome-file@http://java.sun.com/xml/ns/javaee' instead of 'welcome-file@http://xmlns.jcp.org/xml/ns/javaee' here in element welcome-file-list@http://java.sun.com/xml/ns/javaee <7:7> problem: cvc-complex-type.2.4a: Expected element 'welcome-file@http://java.sun.com/xml/ns/javaee' instead of 'welcome-file@http://xmlns.jcp.org/xml/ns/javaee' here in element welcome-file-list@http://java.sun.com/xml/ns/javaee <8:7> problem: cvc-complex-type.2.4a: Expected element 'welcome-file@http://java.sun.com/xml/ns/javaee' instead of 'welcome-file@http://xmlns.jcp.org/xml/ns/javaee' here in element welcome-file-list@http://java.sun.com/xml/ns/javaee <9:7> problem: cvc-complex-type.2.4a: Expected element 'welcome-file@http://java.sun.com/xml/ns/javaee' instead of 'welcome-file@http://xmlns.jcp.org/xml/ns/javaee' here in element welcome-file-list@http://java.sun.com/xml/ns/javaee <10:7> problem: cvc-complex-type.2.4a: Expected element 'welcome-file@http://java.sun.com/xml/ns/javaee' instead of 'welcome-file@http://xmlns.jcp.org/xml/ns/javaee' here in element welcome-file-list@http://java.sun.com/xml/ns/javaee <4:5> problem: cvc-complex-type.2.4c: Expected element 'welcome-file@http://java.sun.com/xml/ns/javaee' before the end of the content in element welcome-file-list@http://java.sun.com/xml/ns/javaee
答案 0 :(得分:0)
我删除了整个吹线,并在该应用程序发出一些警告之后。
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1">