Error loading class [org.apache.struts2.views.velocity.StrutsResourceLoader]

2015 二月 04 21:04:58 ERROR [com.opensymphony.xwork2.util.finder.ClassFinder] - <Error loading class [org.apache.struts2.views.velocity.StrutsResourceLoader]>

java.lang.NoClassDefFoundError: org/apache/velocity/runtime/resource/loader/ClasspathResourceLoader

at java.lang.ClassLoader.defineClass1(Native Method)

at java.lang.ClassLoader.defineClass(ClassLoader.java:621)

at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)

at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1850)

at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:890)

at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1354)

at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)

at com.opensymphony.xwork2.util.finder.ClassLoaderInterfaceDelegate.loadClass(ClassLoaderInterfaceDelegate.java:34)

at com.opensymphony.xwork2.util.finder.ClassFinder$ClassInfo.get(ClassFinder.java:625)

at org.apache.struts2.convention.PackageBasedActionConfigBuilder$2.test(PackageBasedActionConfigBuilder.java:555)

at org.apache.struts2.convention.PackageBasedActionConfigBuilder$2.test(PackageBasedActionConfigBuilder.java:542)

at com.opensymphony.xwork2.util.finder.ClassFinder.findClasses(ClassFinder.java:395)

at org.apache.struts2.convention.PackageBasedActionConfigBuilder.findActions(PackageBasedActionConfigBuilder.java:380)

at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildActionConfigs(PackageBasedActionConfigBuilder.java:335)

at org.apache.struts2.convention.ClasspathPackageProvider.loadPackages(ClasspathPackageProvider.java:53)

at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:215)

at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)

at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:371)

at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:415)

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.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)

at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)

at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)

at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3800)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:4450)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)

at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:987)

at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:909)

at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:495)

at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)

at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)

at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)

at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)

at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)

at org.apache.catalina.core.StandardService.start(StandardService.java:516)

at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)

at org.apache.catalina.startup.Catalina.start(Catalina.java:583)

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:288)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

Caused by: java.lang.ClassNotFoundException: org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader

at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)

at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)

at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)

... 48 more

启动的时候报这个错误,网上搜索一堆,然后对比了一下以前的项目jar包,缺了

commons-jci-fam-1.0.jar 
velocity-1.6.4.jar

借鉴参考博客 http://bdk82924.iteye.com/blog/1844261

时间: 2024-10-28 16:27:22

Error loading class [org.apache.struts2.views.velocity.StrutsResourceLoader]的相关文章

报org.apache.struts2.json.JSONException: org.apache.struts2.json.JSONException:的错误

HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.struts2.json.JSONException: org.apache.struts2.json.JSONException: java.lang.

solr定时更新索引遇到的问题(SolrDataImportProperties Error loading DataImportScheduler properties java.lang.NullPointerException)

问题描述 报如下错误,很显然,问题原因:空指针异常: ERROR (localhost-startStop-1) [   ] o.a.s.h.d.s.SolrDataImportProperties Error loading DataImportScheduler propertiesjava.lang.NullPointerException        at sun.nio.fs.UnixPath.normalizeAndCheck(UnixPath.java:77)        at

Error loading XML document: dwz.frag.xml 处理方式

问题:直接用IE打开index.html弹出一个对话框:Error loading XML document: dwz.frag.xml 方案一(已经验证): 转自:http://blog.csdn.net/wy542107493/article/details/7641064 原因:dwz.frag.xml是一个核心文件,需要加载才可以正常使用.用firefox打开就正常 解决:在web.xml(tomcat的或者应用的配置文件都可以)中加入 <mime-mapping> <exten

java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFil

项目启动时报错:java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter struts2的jar包版本号为2.1.8,所以类名是没有错误的,而jar包确实加入进去了.jar包加入的方式是通过user library. 问题解决的办法是:将jar包拷贝到WEB-INF下lib文件夹目录,重新启动tomcat问题解决. ================

Tomcat启动报错[org.apache.struts2.dispatcher.Dispatcher]Dispatcher initialization failed

Tomcat启动报错: [org.apache.struts2.dispatcher.Dispatcher]Dispatcher initialization failed Unable to load configuration. - bean - jar:file:/E:/SoftwareDevelopment/Software/Eclipse4.3/eclipse-jee-kepler-SR1-win32-x86_64/Workspace/.metadata/.plugins/org.ec

org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter

1.先建立一个项目2.在WebRoot中建立一个jsp,名为index.jsp,在里面写一句话 <body> hello struts2 <br> </body> 3.在后台写入代码 public class T { org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter f; } 4.在struts.xml中写入 <constant name="struts.devMo

Error loading RS jni library: java.lang.UnsatisfiedLinkError 解决方案

我们可能会用到模糊效果,就会想到renderscript.jar , 但是模糊效果是3.0以后的效果,在有的4.x以上的手机上也会造成错误,Error loading RS jni library: java.lang.UnsatisfiedLinkError,会报出这样的错误,明显是手机上没有.so包. 错误图示 明显可以得出,没有.librsjni.so的包存在,那么要怎么处理呢,其实在sdk中已经提供了相应的.so库.我们只要找到即可,然后放入libs下即可 这样在任何机型上都不会报错了,

Class org.apache.struts2.json.JSONWriter can not access a member of class org.springframework.aop.TruePointcut with modifiers &quot;public&quot;

Spring注入Action使用Json错误:org.apache.struts2.json.JSONException: org.apache.struts2.json.JSONException: org.apache.struts2.json.JSONException: org.apache.struts2.json.JSONException: java.lang.IllegalAccessException: Class org.apache.struts2.json.JSONWri

SSH2框架ClassNotFoundException:org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter的问题

今天启动tomcat,竟然报错. 严重: Exception starting filter Struts2 ClassNotFoundException:org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter. 意思是缺少Struts2的jar包.不至于啊,以前启动的时候也没有遇到这种问题.于是检查了一下lib文件夹,jar包应有尽有.突然想到要不然清一下tomcat的缓存吧.于是清除了一下,再次启动tomca