File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Error in struts 2. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Error in struts 2." Watch "Error in struts 2." New topic

Error in struts 2.

stephan babu

Joined: Apr 23, 2012
Posts: 13
I have create a sample project in struts2.

I found error while i am running this project that,

May 22, 2012 1:25:24 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter struts2
java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(
at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(
at org.apache.struts2.dispatcher.Dispatcher.init(
at org.apache.struts2.dispatcher.FilterDispatcher.init(
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(
at org.apache.catalina.core.ApplicationFilterConfig.<init>(
at org.apache.catalina.core.StandardContext.filterStart(
at org.apache.catalina.core.StandardContext$
at org.apache.catalina.core.StandardContext$
at java.util.concurrent.FutureTask$Sync.innerRun(
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
at java.util.concurrent.ThreadPoolExecutor$
Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang3.StringUtils
at org.apache.catalina.loader.WebappClassLoader.loadClass(
at org.apache.catalina.loader.WebappClassLoader.loadClass(
at java.lang.ClassLoader.loadClassInternal(
... 19 more

Could any one please solve this.
Joe Ess

Joined: Oct 29, 2001
Posts: 9189

Struts has a number of dependencies. You need to include those dependencies in your build. The easiest thing to do is start with the "blank" struts application that is included in the Struts distribution.

[How To Ask Questions On JavaRanch]
Mohana Rao Sv
Ranch Hand

Joined: Aug 01, 2007
Posts: 485

Add apache-lang commons jar file

ocjp 6 — Feeding a person with food is a great thing in this world. Feeding the same person by transferring the knowledge is far more better thing. The reason is the amount of satisfaction which we get through food is of only one minute or two. But the satisfaction which we can get through the knowledge is of life long.
Suresh Pritmani

Joined: May 24, 2009
Posts: 8
Hi Stephan,

It seems, commons-lang3-XXX.jar file is missing in your class path. You can resolve it by adding the jar to your lib folder.

I agree. Here's the link:
subject: Error in struts 2.
It's not a secret anymore!