Win a copy of Functional Design and Architecture this week in the Functional programming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

migration struts 2.3 to 2.5

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I have updated my project of Struts 2.3 to 2.5, but I when compile my solution occurs this error.

<27/11/2019 12:05:05,941 PM CST> <Error> <HTTP> <BEA-101165> <Could not load user defined filter in web.xml: org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.
java.lang.AbstractMethodError: org.apache.struts2.config.StrutsXmlConfigurationProvider$1.type()Ljava/lang/Class;
at com.opensymphony.xwork2.inject.ContainerBuilder$4.type(ContainerBuilder.java:167)
at com.opensymphony.xwork2.inject.InitializableFactory.wrapIfNeeded(InitializableFactory.java:35)
at com.opensymphony.xwork2.inject.Scope$1.scopeFactory(Scope.java:36)
at com.opensymphony.xwork2.inject.ContainerBuilder.factory(ContainerBuilder.java:100)
at com.opensymphony.xwork2.inject.ContainerBuilder.factory(ContainerBuilder.java:180)
Truncated. see log file for complete stacktrace

 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What do your web.xml and weblogic.xml files look like?
 
Cristian Gomez
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Joe Ess wrote:What do your web.xml and weblogic.xml files look like?



web.xml

<web-app xmlns="http://java.sun.com/xml/ns/javaee" <br />        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <br />         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" <br />         version="2.5">
   <description>Empty web.xml file for Web Application</description>
   <listener>
       <listener-class>com.coopeande1.banking.servlets.SessionListener</listener-class>
   </listener>
   <listener>
       <listener-class>com.coopeande1.banking.servlets.CoopeandeContextListener</listener-class>
   </listener>
   <filter>
       <filter-name>noCacheFilter</filter-name>
       <filter-class>com.coopeande1.banking.filters.NoCacheFilter</filter-class>
   </filter>
   <filter-mapping>
       <filter-name>noCacheFilter</filter-name>
       <url-pattern>/*</url-pattern>
   </filter-mapping>
  <filter>
       <filter-name>struts2</filter-name>
       <filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter</filter-class>
   </filter>
   <filter-mapping>
       <filter-name>struts2</filter-name>
       <url-pattern>/*</url-pattern>
   </filter-mapping>
   <servlet>
       <servlet-name>InitWsServlet</servlet-name>
       <servlet-class>com.coopeande1.banking.servlets.InitServlet</servlet-class>
       <load-on-startup>1</load-on-startup>
   </servlet>

weblogic.xml

<?xml version = '1.0' encoding = 'UTF-8'?>
<weblogic-web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <br />                  xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.1/weblogic-web-app.xsd" <br />                  xmlns="http://xmlns.oracle.com/weblogic/weblogic-web-app">
   <!--<jsp-descriptor> <br />        <debug>true</debug> <br />        <working-dir>/F:/Coopeande/Trunk/Vista/classes/.wlsjsps/</working-dir> <br />        <keepgenerated>false</keepgenerated> <br />    </jsp-descriptor>-->
   <context-root>coopeande</context-root>
</weblogic-web-app>
 
Joe Ess
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Wow, it's been a while!  Good to see you again.
I don't see any obvious issues with your files. Did you upgrade your application's dependencies?  
 
Cristian Gomez
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Joe Ess wrote:Wow, it's been a while!  Good to see you again.
Did you upgrade your application's dependencies?  



Hi thanks. yes I´m back.

Yes. I upgrade the dependecies

struts-core 2.5.26
Ognl 3.2.18
log4j-core-2.14.0
xwork-core-2.3.37
commons-lang3-3.8.1
 
Joe Ess
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
They got rid of the separate Xwork jar file in 2.5.  There are some other things missing or have different versions than Struts expects.  Look at our FAQ on how to resolve Struts dependencies.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic