mounika
mounika

Reputation: 31

VALIDATION PROBLEMS WERE FOUND error while trying to deploy war on weblogic 12c

I'm trying to deploy maven project on weblogic 12c. Project is configured in spring 4, (Java 1.8). Below is my 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>

Below is my 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>

The location of these two files are under WEB-INF. I'm successfully able to deploy this on apache tomcat8. But getting below error while trying to deploy war on 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

Upvotes: 3

Views: 24103

Answers (2)

Paramesh Nuchha
Paramesh Nuchha

Reputation: 11

I have deleted entire blow lines and after that application worked with some warning.

<?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">

Upvotes: 1

Trent Bartlem
Trent Bartlem

Reputation: 2253

<web-app> has the wrong xml namespace. Try using xmlns="http://java.sun.com/xml/ns/javaee" instead.

Upvotes: 0

Related Questions