Error 404
Error 404

Reputation: 107

Fail to deploy JSF into Weblogic 12.1.1(failed to load java type corresponding to e=web-app@http://xmlns.jcp.org/xml/ns/javaee)

I try to deploy the hello1 jsf tutorial example on Weblogic 12.1.1, but it fail with errors. Is something need to be changed on the web.xml?

enter image description here

web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.1" 
         xmlns="http://xmlns.jcp.org/xml/ns/javaee"
         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">
    <context-param>
        <param-name>javax.faces.PROJECT_STAGE</param-name>
        <param-value>Development</param-value>
    </context-param>
    <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>*.xhtml</url-pattern>
    </servlet-mapping>
    <session-config>
        <session-timeout>
            30
        </session-timeout>
    </session-config>
    <welcome-file-list>
        <welcome-file>index.xhtml</welcome-file>
    </welcome-file-list>
</web-app>

Upvotes: 2

Views: 5562

Answers (1)

Steve C
Steve C

Reputation: 19445

WebLogic 12.1.1 is a Java EE 6 application server (Fusion Middleware What's New in Oracle WebLogic Server).

The Java EE 6 specification specifies that it support Java Servlet Specification Version 3.0.

You are attempting to use a Servlet 3.1 deployment descriptor in your web.xml file.

Your application should deploy if you change the opening web-app element to:

 <web-app 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"
     version="3.0">

Upvotes: 4

Related Questions