Hibernate3所需用到的包:
基础包
hibernate3.jar
antlr-2.7.6.jar
commons-collections-3.1.jar
dom4j-1.6.1.jar
javassist-3.9.0.GA.jar
jta-1.1.jar
slf4j-api-1.5.8.jar
日志实现:log4j-1.2.16.jar和slf4j-log4j12-1.5.8.jar
使用annotation
hibernate-annotations.jar
ejb3-persistence.jar
hibernate-commons-annotations.jar
spring3所需的包:
all jar
struts2.2.1所需的包:
aopalliance-1.0.jar
commons-fileupload-1.2.1.jar
commons-io-1.3.2.jar
commons-logging-1.0.4.jar
freemarker-2.3.16.jar
javassist-3.7.ga.jar
ognl-3.0.jar
struts2-core-2.2.1.1.jar
struts2-spring-plugin-2.2.1.1.jar
xwork-core-2.2.1.1.jar
其他的 jar包
ehcache-1.6.2.jar
struts2_ajax
和ehcache.xml
json-lib-2.1-jdk15.jar
struts2-spring-plugin-2.2.1.1.jar
struts2.2.1+spring3.0.5+hibernate3.1
struts2.1以上web.xml中配置
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
struts2.1以下web.xml中配置
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
Q:java.lang.NoClassDefFoundError: org/objectweb/asm/Type
A:加入asm-3.3.jar
Q:nested exception is java.lang.NoClassDefFoundError: net/sf/ehcache/CacheException
A:加入ehcache-1.6.2.jar
Q:java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
Caused by: java.lang.IllegalArgumentException: Javassist library is missing in classpath! Please add missed dependency!
A:加入javassist-3.7.ga.jar(struts2.2/apps/struts2-blank.war/wib-inf/lib)
Q:hibernate.cfg.xml的放置路径
A:放在web项目的WEB-INF/classes下
Q:struts.xml的放置路径
A:放在web项目的WEB-INF/classes下