0

enter image description here

I have Struts 2 (2.3.32) project which was running successfully in local but when I deployed to Weblogic 12c it is giving following error (in screenshot )

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

Also I have upgraded this struts application from Struts 2.1 to Struts 2.3.32

I already tried changes in web.xml but its not working.

web.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>
Pankaj K
  • 1
  • 1

1 Answers1

0

In web.xml i replaced following with

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

It is working for me .

Now , I am able to deploy application to 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" />
Pankaj K
  • 1
  • 1