【错误总结】java.lang.NoClassDefFoundError: org/objectweb/asm/ClassVisitor

运行环境

     JDK1.7 64位

     Window 7  64位

     Ecplise Java EE IDE

     Struts 2.3.9

     Tomcat 7

说明:

按照《轻量级Java EE企业应用实战》书上的说明进行Convention配置,启动服务器后抛出一下异常,经百度后得知,需要添加一下jar包。

  • asm-commons-3.3.jar
  • asm-3.3.jar
  • asm-tree-3.3.jar
  • 异常详细信息

    SEVERE: Exception starting filter struts2
    java.lang.NoClassDefFoundError: org/objectweb/asm/ClassVisitor
    	at org.apache.struts2.convention.PackageBasedActionConfigBuilder.findActions(PackageBasedActionConfigBuilder.java:390)
    	at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildActionConfigs(PackageBasedActionConfigBuilder.java:347)
    	at org.apache.struts2.convention.ClasspathPackageProvider.loadPackages(ClasspathPackageProvider.java:53)
    	at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:260)
    	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.initFilter(ApplicationFilterConfig.java:281)
    	at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:262)
    	at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:107)
    	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4775)
    	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5452)
    	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(Unknown Source)
    	at java.util.concurrent.FutureTask.run(Unknown Source)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    	at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.ClassNotFoundException: org.objectweb.asm.ClassVisitor
    	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
    	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
    	... 22 more

     

                     

    posted @ 2013-09-16 21:20  薛遗山  阅读(9841)  评论(0编辑  收藏  举报