`

Struts2 错误锦集

 
阅读更多

Exception starting filter struts2 java.lang.NoClassDefFoundError: org/objectweb/asm/ClassVisitor

 

 

struts版本 2.3.4.1 jdk 1.6 tomcat 7.0

 

部署 web 工程时出现错误

 

严重: Exception starting filter struts2
java.lang.NoClassDefFoundError: org/objectweb/asm/ClassVisitor
 at org.apache.struts2.convention.PackageBasedActionConfigBuilder.findActions(PackageBasedActionConfigBuilder.java:386)
 at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildActionConfigs(PackageBasedActionConfigBuilder.java:344)
 at org.apache.struts2.convention.ClasspathPackageProvider.loadPackages(ClasspathPackageProvider.java:53)
 at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:245)
 at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)
 at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:390)
 at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:437)
 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.initFilter(ApplicationFilterConfig.java:277)
 at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)
 at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:382)
 at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:103)
 at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650)
 at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
 at java.util.concurrent.FutureTask.run(FutureTask.java:138)
 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.ClassNotFoundException: org.objectweb.asm.ClassVisitor
 at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1711)
 at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
 ... 23 more
2012-8-13 23:09:01 org.apache.catalina.core.StandardContext startInternal
严重: Error filterStart
2012-8-13 23:09:01 org.apache.catalina.core.StandardContext startInternal
严重: Context [/strutsTest] startup failed due to previous errors

 

 

原来是因为 struts.xml 中文件 配置路径出错,由于是直接拷贝的 class 的 路径

com/liwei/action/Helloword

编译时会发生 noclassdeffounderror异常

 

改成如下

 

<struts>
    <package name="helloword" extends="struts-default">
        <action name="welcome" class="com.liwei.action.Helloword">
            <result name="success">
                /jsp/helloword.jsp
            </result>
            <result name="fail">
                /jsp/namefrom.jsp
            </result>
        </action>
       
    </package>
</struts>

重新编译项目 启动成功,

 

 

分享到:
评论

相关推荐

    struts1和struts2的区别

    struts1和struts2的区别struts1和struts2的区别struts1和struts2的区别struts1和struts2的区别struts1和struts2的区别struts1和struts2的区别struts1和struts2的区别struts1和struts2的区别struts1和struts2的区别...

    struts的错误处理

    struts struts的错误处理 struts控制界面输出 struts struts的错误处理 struts控制界面输出

    struts2如何实现弹出action返回的错误信息

    struts2如何实现弹出action返回的错误信息

    struts2错误显示

    该问题仔细深入讲述了前端表单验证错误发生后,如何在页面展示

    struts2常见错误

    struts2常见错误,和基本的解决方案。

    struts2 最新漏洞 S2-016、S2-017修补方案 .docx

    同时,需要注意的是,这两个方案都需要对 Struts2 的源代码进行修改,因此需要小心地操作,以免出现错误。 此外,需要注意的是,这两个漏洞的修补需要对 Struts2 的源代码进行修改,因此需要对 Struts2 的源代码有...

    struts2 资料struts2 资料struts2 资料struts2 资料

    struts2 资料struts2 资料struts2 资料struts2 资料

    struts2 总结工程大全

    struts2 总结工程大全struts2 总结工程大全struts2 总结工程大全struts2 总结工程大全struts2 总结工程大全struts2 总结工程大全struts2 总结工程大全struts2 总结工程大全struts2 总结工程大全struts2 总结工程大全...

    struts2-core.jar

    struts2-core-2.0.1.jar, struts2-core-2.0.11.1.jar, struts2-core-2.0.11.2.jar, struts2-core-2.0.11.jar, struts2-core-2.0.12.jar, struts2-core-2.0.14.jar, struts2-core-2.0.5.jar, struts2-core-2.0.6.jar,...

    Struts2视频教程

    Struts2是一套非常优秀的Java WEB应用框架,实现优雅、功能强大、使用简洁。目前已有大量的企业项目采用Struts2来作为Web框架进行开发,掌握Struts2是每个进行Web开发的Java程序员的一项必备技能。 本视频对Struts2...

    Struts2漏洞测试

    Struts2漏洞测试Struts2漏洞测试Struts2漏洞测试Struts2漏洞测试Struts2漏洞测试Struts2漏洞测试Struts2漏洞测试Struts2漏洞测试Struts2漏洞测试Struts2漏洞测试Struts2漏洞测试Struts2漏洞测试Struts2漏洞测试...

    struts2-scan_struts2-scan_struts2scan_scan_struts2漏洞_

    struts2-scan 检测struts2漏洞,认证检测struts2漏洞

    struts2案例 struts2 struts2源码

    struts2源码 struts2案例 struts2使用包

    配置struts2常见错误

    配置struts2常见错误,包括引架包不全引起的异常信息,

    struts2错误集合

    struts2错误集合,希望给刚入门的新手们提供一些帮助!

    Struts2 Struts2 超好的Struts2 pdf 文档

    Struts2 Struts2 超好的Struts2 pdf 文档 Struts2 Struts2 超好的Struts2 pdf 文档 Struts2.pdf文档

    struts2讲义 struts2讲义struts2讲义struts2讲义struts2讲义

    一个很好的关于Struts2的讲义!struts2讲义struts2讲义struts2讲义struts2讲义struts2讲义struts2讲义

    struts2 chm 帮助文档

    struts2 chm 程序包 org.apache.struts2 接口概要 接口 说明 StrutsStatics Constants used by Struts. 类概要 类 说明 RequestUtils Request handling utility class. ServletActionContext Web-specific ...

    struts2帮助文档

    struts2的概述struts2下的HelloWord struts2基础 struts2做好准备 struts2的标志 struts2的Action讲解 struts2中的国际化 struts2转化器 struts2实现表单数据校验 struts2的基石-拦截器 struts2中实现IOC struts2中...

    struts2例子struts2例子

    struts2例子struts2例子struts2例子struts2例子struts2例子struts2例子struts2例子struts2例子

Global site tag (gtag.js) - Google Analytics