Приложение Struts2, которое успешно работает, выдает ошибку при развертывании в weblogic 12 c

введите здесь описание изображения

У меня есть проект Struts 2 (2.3.32), который успешно работал локально, но когда я развернул его в Weblogic 12c, он выдает следующую ошибку (на снимке экрана)

HTTP:101064, cvc-complex-type.2.4b .....

Также я обновил это приложение Struts с Struts 2.1 до Struts 2.3.32.

Я уже пробовал вносить изменения в web.xml, но это не работает.

веб.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jsp="http://java.sun.com/xml/ns/javaee/jsp" xmlns:web="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    <display-name>Moo Web Application</display-name>

    <listener>
        <listener-class>com.pg.moo.listener.WdpStartupListener</listener-class>
    </listener>

    <listener>
        <listener-class>org.apache.struts2.tiles.StrutsTilesListener</listener-class>
    </listener>

    <listener> 
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>

<!-- Comment while connecting to local  
    <login-config>
        <auth-method>BASIC</auth-method>
        <realm-name>myrealm</realm-name>
    </login-config>

    <security-constraint>
        <web-resource-collection>
            <web-resource-name>wdpsap</web-resource-name>
            <url-pattern>/*</url-pattern>
        </web-resource-collection>   
        <auth-constraint>
            <role-name>GLO-PG</role-name>
            <role-name>WDPG-Admin</role-name>
        </auth-constraint>  
        <user-data-constraint>
            <transport-guarantee>NONE</transport-guarantee>
        </user-data-constraint>
    </security-constraint>

    <security-role>
        <role-name>GLO-PG</role-name>
    </security-role>

    <security-role>
        <role-name>WDPG-Admin</role-name>
    </security-role>     

--> 
    <!-- Uncomment when using localhost at P&G -->
    <context-param>
        <param-name>hibernateCfg</param-name>
        <param-value>pghibernate.cfg.xml</param-value>
    </context-param> 


    <!-- Set to false when using localhost at P&G -->
    <context-param>
        <param-name>sapConnectionAvailable</param-name>
            <param-value>false</param-value>
    </context-param>

    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>classpath*:spring/applicationContext.xml</param-value>
    </context-param>

    <resource-ref>
        <res-ref-name>jdbc/WDPDB</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
    </resource-ref>

    <filter>
        <filter-name>struts2</filter-name>
        <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>   
    </filter>

    <filter-mapping>
        <filter-name>struts2</filter-name>
        <url-pattern>/home/*</url-pattern>
    </filter-mapping>

    <session-config>
      <session-timeout>60</session-timeout>
    </session-config>
</web-app>

person Pankaj K    schedule 20.10.2017    source источник
comment
попробуйте ‹версия веб-приложения = 2.5 xmlns=java.sun.com/xml/ns/javaee xmlns:xsi=w3.org/2001/XMLSchema-instance xsi: schemaLocation=java.sun.com/xml/ns/javaee java.sun.com/xml/ns/javaee/web-app_2_5.xsd  -  person want2learn    schedule 20.10.2017
comment
Пробовал это изменение, все та же ошибка. Я пробовал различные изменения в web.xml, но выдавал ту же ошибку.   -  person Pankaj K    schedule 23.10.2017


Ответы (1)


В web.xml я заменил следующее на

<web-app>
<!---Added only this part instead of following-->

Это работает для меня.

Теперь я могу развернуть приложение на Weblogic Server.

<web-app xmlns:jsp="http://java.sun.com/xml/ns/javaee/jsp" xmlns:web="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://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" />

person Pankaj K    schedule 24.10.2017