Struts2
Commons-logging-1.0.4.jar mainly used for log processing
Freemarker-2.3.8.jar template related operations require package
Ognl-2.6.11.jar OGNL Expression of the required package,
Xwork-2.0.7.jar Xwork Core Pack
Struts2-core-2.0.14.jar struts2 Core Pack
Struts2-spring-plugin-2.0.14.jar struts2 The packages needed to integrate spring
If you need to integrate other frameworks or plugins, then import other packages
Hibernate
Hibernate3.jar Hibernate Core Pack
Antlr-2.7.6.jar a Language Conversion tool
Hibernate uses it to implement HQL-to-SQL conversion template-related operations that require a package
Commons-collections-3.1.jar Collections Apache's Toolset
Javassist-3.9.0.ga.jar Code generation Tool,
Hibernate uses it to extend Java classes and implementations at runtime, with the Cglib package
Dom4j-1.6.1.jar dom4j XML Parser
Jta-1.1.jar standard JAVA Transaction Processing interface
A log system used by Slf4j-api-1.5.8.jar and slf4j-log4j12-1.5.0.jarhibernate
Cglib.jar Cglib byte code interpreter
Asm.jar ASM Bytecode Library If you use "cglib" it is necessary
Asm-attrs.jar ASM Bytecode Library If you use "cglib" it is necessary
If you want to use the cache to join: Ehcache.jar Ehcache Cache
Connect to the database to join the related package ....
Spring
Spring-beans.jar access to configuration files, creation and management of beans, and all classes related to inversion of control/dependency injection (IOC/DI) operations
Spring-context.jar can find all the classes required to use the Spring ApplicationContext feature, Jdni all classes required, instrumentation components, and related classes for validating validation
Spring-core.jar Spring Framework basic core Tools class
Spring-jdbc.jar contains all classes that encapsulate spring for JDBC data access
Spring-orm.jar some support for the mapping framework
Spring-tx.jar provides support for transactions
If you need support for AOP, add Aspectjrt.jar and Aspectjweaver.jar
Other optional packages:
Commons-beanutils-1.6.jar
Commons-dbcp-1.2.2.jar
Commons-pool-1.4.jar
Commons-fileupload-1.2.1.jar
Commons-io-1.4.jar
And finally add Log4j.jar.
Information One:
When NotFoundException:org.objectweb.asm.codevisitor errors occur in an SSH-integrated project, the main reasons are as follows:
These lib are used when programming with spring AOP:
Asm-2.2.2.jar
Asm-commons-2.2.2.jar
Asm-util-2.2.2.jar
Hibernate uses the following lib:
Asm.jar
Asm-attrs.jar
where Asm-2.2.2.jar and Asm.jar exist on the class of conflict!!!
Using either or both of these, the following error may occur:
Java.lang.noclassdeffounderror:org/objectweb/asm/codevisitor
Java.lang.noclassdeffounderror:org/objectweb/asm/commons/emptyvisitor
Java.lang.NoSuchMethodError:org.objectweb.asm.ClassVisitor.visit ...
The solution is:
1. Remove the 3 lib on hibernate on the Classpath
Asm.jar
Asm-attrs.jar
Cglib-2.1.3.jar
2. Join the following 4 lib in spring
Asm-2.2.2.jar
Asm-commons-2.2.2.jar
Asm-util-2.2.2.jar
Cglib-nodep-2.1_3.jar
It is also important to note that when programming with MyEclipse, sometimes the jar package is removed from the classpath and then placed under Web-inf\lib, which determines that the jar file under the Web-inf\lib is deleted.
Data two:
The following error/exception is reported as follows:
Java code
Invocation of Init methodfailed; Nested exception isjava.lang.NoSuchMethodError:org.objectweb.asm.ClassVisitor.visit (iiljava/lang/string; ljava/lang/string; [Ljava/lang/string; ljava/lang/string;) V
Invocation of Init method failed; Nested exception isjava.lang.NoSuchMethodError:org.objectweb.asm.ClassVisitor.visit (iiljava/lang/string; ljava/lang/string; [Ljava/lang/string; ljava/lang/string;) V
Cause:
When programming with spring AOP, you need to use Asm*.jar, and hibernate also needs to use ASM-related jar files, and if there are two Asm*.jar in the build path of a project, then the classes in the two jars will have a conflict. This causes the problem to occur.
Solution: After the online multi-search to get a number of solutions, and finally summed up 3 ways to solve the problem:
Check the lib below for ASM packages, respectively, with the following several jar packages:
Asm-2.2.3.jar
Asm.jar
Asm-attrs.jar
Asm-commons-2.2.3.jar
Asm-util-2.2.3.jar
The first method of ↓
--Remove Asm-2.2.3.jar restart Application Server ok! ...
The second method ↓
--from the next most recent Asm-all-3.0.jar jar package on the Web, and then delete all of the original jar packages that started with the ASM for Hibernate, and a cglib-2.1.3.jar.
Redeployment Project, ok! ...
The third method ↓
--Remove the 3 lib on hibernate on the Classpath
Asm.jar
Asm-attrs.jar
Cglib-2.1.3.jar
Then join the following 4 lib in spring
Asm-2.2.2.jar
Asm-commons-2.2.2.jar
Asm-util-2.2.2.jar
Cglib-nodep-2.1_3.jar
Ok! ...
Spring learns the jar packages required by 8-ssh