user2538100
user2538100

Reputation:

Error when deploying ear in weblogic 11g

Error in admin console:

Unable to access the selected application
Exception in AppMerge flows' progression
Exception in AppMerge flows' progression
VALIDATION PROBLEMS WERE FOUND problem: cvc-attribute.4: The value '6' does not equal the fixed value '5' of attribute 'version':<null>
VALIDATION PROBLEMS WERE FOUND problem: cvc-attribute.4: The value '6' does not equal the fixed value '5' of attribute 'version':<null>

Application.xml:

<?xml version="1.0" encoding="UTF-8"?>
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:application="http://java.sun.com/xml/ns/javaee/application_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_6.xsd" id="Application_ID" version="6">
  <display-name>weblogic-ear</display-name>
  <module>
    <web>
      <web-uri>weblogic-web.war</web-uri>
      <context-root>/view</context-root>
    </web>
  </module>
  <module>
    <ejb>weblogic-service.jar</ejb>
  </module>
</application>

weblogic-application.xml:

<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-application xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-application"
xmlns:javaee="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-application http://xmlns.oracle.com/weblogic/weblogic-application/1.2/weblogic-application.xsd">
<!-- server-version: 10.3.4 -->

<wls:application-param>
        <wls:param-name>webapp.encoding.default</wls:param-name>
        <wls:param-value>UTF-8</wls:param-value>
    </wls:application-param>

web.xml:

<?xml version="1.0"?>
   <web-app version="3.0" 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/web-app_3_0.xsd">
 <display-name>weblogic-web</display-name>
 <!--
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
  </welcome-file-list>
-->
 <servlet>
  <servlet-name>Faces Servlet</servlet-name>
  <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
  <load-on-startup>1</load-on-startup>
 </servlet>
 <servlet-mapping>
  <servlet-name>Faces Servlet</servlet-name>
  <url-pattern>*.jsf</url-pattern>
 </servlet-mapping>
 <servlet-mapping>
  <servlet-name>Faces Servlet</servlet-name>
  <url-pattern>*.faces</url-pattern>
 </servlet-mapping>
 <servlet-mapping>
  <servlet-name>Faces Servlet</servlet-name>
  <url-pattern>/faces/*</url-pattern>
 </servlet-mapping>
</web-app>

weblogic.xml:

<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-web-app http://www.bea.com/ns/weblogic/weblogic-web-app/1.0/weblogic-web-app.xsd" 
xmlns="http://www.bea.com/ns/weblogic/weblogic-web-app">
<jsp-descriptor>
<keepgenerated>true</keepgenerated>
<debug>true</debug>
</jsp-descriptor>
<context-root>/view</context-root>
<fast-swap>
<enabled>false</enabled>
</fast-swap>
</weblogic-web-app>

Help will be appreciated.

Upvotes: 4

Views: 6405

Answers (2)

Youssef
Youssef

Reputation: 1

Change the Namespace Java version in both web.xml and application.xml for weblogic 12c use version="6" and for weblogic 10 use version="1.4"

Upvotes: 0

Mikko Maunu
Mikko Maunu

Reputation: 42114

Namespace in following claims EE 5, but schema location and version refer to EE 6:

<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:application="http://java.sun.com/xml/ns/javaee/application_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_6.xsd" id="Application_ID" version="6">

WebLogic 11G is not Java EE 6 application server, it is implementation of Java EE 5.

If application does not use concepts available only in Java EE 6, then version 5 should be used consistently, and deploying to WebLogic 11G is fine.

On the other hand, if features available only in Java EE 6 (EJB 3.1 for example) are in use, version 6 and compatible container should be used. For example Weblogic 12 is tested to be compatible.

Upvotes: 2

Related Questions