Struts 2.1.x + Spring 2.5.x + Hibernate 3.3.x整合需要的JAR包
jar包名称
所在位置
说明
antlr-2.7.6.jar
hibernate/lib/required
解析HQL
aspectjrt
spring/lib/aspectj
AOP
aspectjweaver
..
AOP
cglib-nodep-2.1_3.jar
spring/lib/cglib
代理,二进制增强
common-annotations.jar
spring/lib/j2ee
@Resource
commons-collections-3.1.jar
hibernate/lib/required
集合框架
commons-fileupload-1.2.1.jar
struts/lib
struts
commons-io-1.3.2
struts/lib
struts
commons-logging-1.1.1
单独下载最新版本
struts
spring
dom4j-1.6.1.jar
hibernate/required
解析xml
ejb3-persistence
hibernate-annotation/lib
@Entity
freemarker-2.3.13
struts/lib
struts
hibernate3.jar
hibernate
hibernate-annotations
hibernate-annotation/
hibernate-common-annotations
hibernate-annotation/lib
javassist-3.9.0.GA.jar
hiberante/lib/required
hibernate
jta-1.1.jar
..
hibernate transaction
junit4.5
mysql-
ognl-2.6.11.jar
struts/lib
slf4j-api-1.5.8.jar
hibernate/lib/required
hibernate-log
slf4j-nop-1.5.8.jar
hibernate/lib/required
spring.jar
spring/dist
struts2-core-2.1.6.jar
struts/lib
xwork-2.1.2.jar
struts/lib
struts2
commons-dbcp
spring/lib/jarkata-commons
commons-pool.jar
..
struts2-spring-plugin-2.1.6.jar
struts/lib
WARN - SQL Error: 0, SQLState: null ERROR - Cannot create PoolableConnectionFactory (Server connection failure durin g transaction. Attemtped reconnect 3 times. Giving up.) WARN - Could not obtain connection metadata org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFact ory (Server connection failure during transaction. Attemtped reconnect 3 times. Giving up.)
错误所在:在工程的lib包中存在着2个mysql驱动(mysql-connector-java-3.0.7-stable-bin.jar,mysql-connector-java-5.0.3-bin.jar)tomcat会读取第一个驱动程序,而3.0的不支持springframework。 解决方法:把mysql-connector-java-3.0.7-stable-bin.jar 和mm.mysql-2.0.4-bin.jar删除了就可以了。