1. 程式人生 > >一些jar包 及作用

一些jar包 及作用

ActionSupport 類在

xwork-2.1.2.jar 

com.opensymphony.xwork2.ActionSupport 下

import com.opensymphony.xwork2.ActionSupport;

ServletContextAware類:

struts2-core-2.3.8\org\apache\struts2\util

import org.apache.struts2.util.ServletContextAware; 

ServletContext:

import javax.servlet.ServletContext;

servlet-api.jar

FileUtils.copyFile(ufile, target);在

import org.apache.commons.io.FileUtils;

commons-io-1.3.2.jar

java常見的ClassNotFoundException

1 - java.lang.ClassNotFoundException:org.apache.commons.logging.LogFactory
   新增包common-logging.jar
2 - java.lang.ClassNotFoundException:javax.transaction.Synchronization
    新增包jta.jar(hiberante)
3 - java.lang.ClassNotFoundException:org.dom4j.DocumentException
    新增包dom4j-1.6.1.jar
4 - java.lang.ClassNotFoundException:org.apache.commons.collections.SequencedHashMap
    新增包commons-collections.jar
5 - java.lang.ClassNotFoundException:net.sf.cglib.proxy.CallbackFilter
    java.lang.NoClassDefFoundError:net/sf/cglib/proxy/CallbackFilter
    新增包cglib-2.1.3.jar
6 - java.lang.ClassNotFoundException: org.objectweb.asm.Type
    新增包asm.jar
7 - java.lang.ClassNotFoundException: antlr.ANTLRException
    新增包antlr.jar
8 - java.lang.ClassNotFoundException:net.sf.ehcache.CacheException
    新增包ehcache-1.2.3.jar

Caused by: java.lang.NoSuchMethodError:org.objectweb.asm.ClassWriter.(I)V

將cglib.jar 由2.2版本 改為 2.1.