Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 985739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T05:12:36+00:00 2026-05-16T05:12:36+00:00

I’m creating a basic Struts2, Maven webApp and getting this error when I deploy

  • 0

I’m creating a basic Struts2, Maven webApp and getting this error when I deploy to Tomcat 6 or Jetty. Has anyone seen this?

  2010-07-29 15:33:38.801::WARN:  failed struts2
    Unable to load bean: type: class:com.opensymphony.xwork2.ObjectFactory - bean - jar:file:/C:/workspaces/test/test/target/work/webapp/WEB-INF/lib/struts2-core-2.1.8.1.jar!/struts-default.xml:29:72
     at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:208)
     at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:101)
     at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:131)
     at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
     at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)
     at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
     at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69)
     at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
     at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
     at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
     at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:589)
     at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
     at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220)
     at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:510)
     at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
     at org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:110)
     at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
     at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
     at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
     at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
     at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
     at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
     at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
     at org.mortbay.jetty.Server.doStart(Server.java:222)
     at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
     at org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServer.java:132)
     at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:357)
     at org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:293)
     at org.mortbay.jetty.plugin.Jetty6RunWar.execute(Jetty6RunWar.java:67)
     at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
     at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
     at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
     at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
     at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
     at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
     at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
     at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
     at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
     at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
     at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:592)
     at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
     at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
     at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
     at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
    Caused by: Bean type class com.opensymphony.xwork2.ObjectFactory with the name xwork has already been loaded by bean - jar:file:/C:/workspaces/ulearn/ulearn/target/work/webapp/WEB-INF/lib/struts2-core-2.0.11.2.jar!/struts-default.xml:30:72 - bean - jar:file:/C:/workspaces/ulearn/ulearn/target/work/webapp/WEB-INF/lib/struts2-core-2.1.8.1.jar!/struts-default.xml:29:72
     at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:193)
 ... 47 more

Using Maven…

  <dependency>
   <groupId>org.apache.struts</groupId>
   <artifactId>struts2-core</artifactId>
   <version>2.1.8.1</version>
  </dependency>

web.xml

 <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>/*</url-pattern>
 </filter-mapping>

Look’s pretty straight forward, I don’t understand why it won’t load. I followed the basic tutorial. I googled for this error message, and was unable to find anything relevant.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T05:12:37+00:00Added an answer on May 16, 2026 at 5:12 am

    Your problem is actually quite clear if you read the stack trace:

    Caused by: Bean type class com.opensymphony.xwork2.ObjectFactory with the 
    name xwork has already been loaded by bean -
    jar:file:/C:/workspaces/ulearn/ulearn/target/work/webapp/WEB-INF/lib/struts2-core-2.0.11.2.jar!/struts-default.xml:30:72
     - bean -
    jar:file:/C:/workspaces/ulearn/ulearn/target/work/webapp/WEB-INF/lib/struts2-core-2.1.8.1.jar!/struts-default.xml:29:72
    

    You have a copy of struts2-core-2.0.11.2.jar and a copy of struts2-core-2.1.8.1.jar in your WEB-INF/lib directories. I think you should only have one of them. Do some cleanup (running a mvn clean might be enough).


    PS: I have no idea why you also have stuff coming from C:/workspace/test as show be the first line:

    jar:file:/C:/workspaces/test/test/target/work/webapp/WEB-INF/lib/struts2-core-2.1.8.1.jar!/struts-default.xml:29:72
    

    There is definitely something weird and messy with your classpath. I don’t have any explanation beyond the one I gave above though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 484k
  • Answers 484k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Yes. If you're simultaneously binding two different objects, then you… May 16, 2026 at 7:24 am
  • Editorial Team
    Editorial Team added an answer In essence the reason it generates a fault is in… May 16, 2026 at 7:24 am
  • Editorial Team
    Editorial Team added an answer Mouse co-ordinates when delivered to a component are given relative… May 16, 2026 at 7:24 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.