2013年9月11日星期三

java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils error exception

2013-4-28 13:17:57 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter struts2
java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:211)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:226)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:429)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:473)
at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4072)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4726)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
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:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang3.StringUtils
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 35 more


this problem , depressed for a long time , with a variety of methods online Great God , are not resolved.

Then I deleted the struts2 project actually appeared the same run-time exception , really feel this exception is very egg pain

original when there is no error , that is, when the last few days to do hibernate ,

seeking brightest Great God help me either Weapon abnormal , or direct me to completely remove

I appreciate it !



------ Solution ------------------------------------ --------
org/apache/commons/lang3/StringUtils

look at your commons-lang 's jar, there is no StringUtils this class
------ Solution ------------------- -------------------------
/ lang3/StringUtil, you need to upgrade to a new version of commons-lang.jar
- ---- Solution -------------------------------------------- < br> Reply to: 2013-04-28 14:43:37
/ lang3/StringUtil, you need to upgrade to a new version of commons-lang.jar
------ Solution ------------------- -------------------------
Tomcat clean look.
------ Solution ---------------------------------------- ----
missing wrapped up,
Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang3.StringUtils

Do you have a way to use this method !

clean look to try , as well as to the Task Manager to see if there two javaw running, were shut reopen try
------ For reference only ---- -----------------------------------
I deleted this project is still there this anomaly is how the matter ? ?
------ For reference only -------------------------------------- -
Oo own solution , I made ​​a mistake

So this is a problem with the filter also made ​​me think that the project has an exception.

decisively changed the web.xml file under


and Google the next, I'm using struts2 higher version struts2.3.4, this version has its own xwork This package contains decisively put xwork-2.0.4.jar deleted

solved the problem immediately

what is my jar package


------ For reference only ---------------------------------- -----

------ For reference only ---------------------------------------
楼上的commons-fileupload-1.2.1.jar  应该改成 commons-fileupload-1.2.2.jar 
     freemarker-2.3.15.jar应改成 freemarker-2.3.19.jar




http://blog.csdn.net/jeffyu328/article/details/7721022

------ For reference only --------------------------------------- < br> I encountered the same problem, I imported commons-lang3-3.1.jar package, starts normally, buttoned ! ! !
------ For reference only -------------------------------------- -


positive solution !
------ For reference only -------------------------------------- -
I use the 2.3 version of the lang pack. Do not want to use the 3.1 version of the.
But why is the 3.1 version of the package will go to it .
------ For reference only -------------------------------------- -
good , thank you Lou !
------ For reference only -------------------------------------- -
I press myswwy method is feasible
------ For reference only ------------------------- --------------
missing package , paste came like
------ For reference only ------------- --------------------------
commons-lang3-3.1.jar, stick around , ok.
------ For reference only -------------------------------------- -
I encountered the same problem, I imported commons-lang3-3.1.jar package , start normal
------ For reference only ------------- --------------------------
latest commons-lang3-3.1.jar no org.apache.commons.lang.StringUtils

------ For reference only ---------------------------------- -----
really useful to ah. . Thank you

没有评论:

发表评论