haha662 2010-11-15 10:17
浏览 171

关于struts2+spring2+hibernate3的问题

信息: Using DataSource [com.mchange.v2.c3p0.ComboPooledDataSource@e64686[ acquir
eIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, allUsers
-> [root], autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAc
quireFailure -> false, checkoutTimeout -> 0, connectionTesterClassName -> com.mc
hange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 15ad5c6, descripti
on -> null, driverClass -> com.mysql.jdbc.Driver, factoryClassLocation -> null,
forceIgnoreUnresolvedTransactions -> false, identityToken -> e64686, idleConnect
ionTestPeriod -> 900, initialPoolSize -> 3, jdbcUrl -> jdbc:mysql://localhost:33
06/mysql?useUnicode=true&characterEncoding=UTF-8, maxIdleTime -> 600, maxPoolSiz
e -> 50, maxStatements -> 100, maxStatementsPerConnection -> 0, minPoolSize -> 2
, numHelperThreads -> 10, preferredTestQuery -> null, properties -> {user=******
, password=******}, propertyCycle -> 300, testConnectionOnCheckin -> false, test
ConnectionOnCheckout -> false, usesTraditionalReflectiveProxies -> false ]] of H
ibernate SessionFactory for HibernateTransactionManager
2010-11-15 9:29:05 org.springframework.web.context.ContextLoader initWebApplicat
ionContext
信息: Root WebApplicationContext: initialization completed in 4119 ms
2010-11-15 9:29:06 org.apache.catalina.core.StandardContext start
[color=red]严重: Error listenerStart
2010-11-15 9:29:06 org.apache.catalina.core.StandardContext start
严重: Context [/ssh] startup failed due to previous errors
2010-11-15 9:29:06 org.springframework.context.support.AbstractApplicationContex
t doClose[/color]
信息: Closing org.springframework.web.context.support.XmlWebApplicationContext@7
6e369: display name [Root WebApplicationContext]; startup date [Mon Nov 15 09:29
:01 CST 2010]; root of context hierarchy
2010-11-15 9:29:06 org.springframework.beans.factory.support.DefaultSingletonBea
nRegistry destroySingletons
信息: Destroying singletons in org.springframework.beans.factory.support.Default
ListableBeanFactory@4c4975: defining beans [propertyConfigurer,dataSource,sessio
nFactory,transactionManager,transactionInterceptor,org.springframework.aop.frame
work.autoproxy.BeanNameAutoProxyCreator,LoginAction,genericDao,userDao,userServi
ce]; root of factory hierarchy
2010-11-15 9:29:06 org.springframework.orm.hibernate3.AbstractSessionFactoryBean
destroy
信息: Closing Hibernate SessionFactory
2010-11-15 9:29:07 org.springframework.web.servlet.FrameworkServlet initServletB
ean
信息: FrameworkServlet 'dispatcher': initialization started
2010-11-15 9:29:07 org.springframework.context.support.AbstractApplicationContex
t prepareRefresh
信息: Refreshing org.springframework.web.context.support.XmlWebApplicationContex

没集成hibernate3时,struts2+spring2还是好的,不知道是不是包冲突了,但我加的包的版本都是合适的呀
struts2:struts-2.0.14
spring2:spring-framework-2.0.8
hibernate3:hibernate-distribution-3.6.0.Final
希望大大们讲解一下,问题是哪里?
applicationContext-hibernate.xml如下:
[code="xml"]<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">

class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">


<!-- WEB-INF/mail.properties-->
WEB-INF/jdbc.properties
<!-- WEB-INF/oscache.properties-->



<!-- MailSender used by EmailAdvice -->
<!--



-->
destroy-method="close" dependency-check="none">

${datasource.driverClassName}


${datasource.url}


${datasource.username}


${datasource.password}


${c3p0.acquireIncrement}


${c3p0.initialPoolSize}


${c3p0.minPoolSize}


${c3p0.maxPoolSize}


${c3p0.maxIdleTime}


${c3p0.idleConnectionTestPeriod}


${c3p0.maxStatements}


${c3p0.numHelperThreads}


class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">





cn/com/aaCompany/app/biz/hibernate/User.hbm.xml




${hibernate.dialect}
${hibernate.show_sql}
${hibernate.jdbc.fetch_size}
${hibernate.jdbc.batch_size}



<!-- 配置事务管理器bean,使用 HibernateTransactionManager事务管理器 -->
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<!-- 为事务管理器注入sessionFactory" -->


<!-- 配置事务拦截器Bean -->
class="org.springframework.transaction.interceptor.TransactionInterceptor">
<!-- 为事务拦截器bean注入一个事物管理器 -->


<!-- 定义事务传播属性 -->

PROPAGATION_REQUIRED
PROPAGATION_REQUIRED
PROPAGATION_REQUIRED
PROPAGATION_REQUIRED
PROPAGATION_REQUIRED
PROPAGATION_REQUIRED
PROPAGATION_REQUIRED,readOnly
PROPAGATION_REQUIRED,readOnly
PROPAGATION_REQUIRED,readOnly
PROPAGATION_REQUIRED
PROPAGATION_REQUIRED,readOnly



<!-- 定义BeanNameAutoProxyCreator -->

<!-- 指定满足哪些bean自动生成业务代理 -->

<!-- 需要自动创建事务代理的bean -->

userService[/code]

<!-- 其它需要自动创建事务代理的bean -->



transactionInterceptor
<!-- 可增加其它的interceptor -->



  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 oracle集群安装出bug
    • ¥15 关于#python#的问题:自动化测试
    • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题
    • ¥15 教务系统账号被盗号如何追溯设备
    • ¥20 delta降尺度方法,未来数据怎么降尺度
    • ¥15 c# 使用NPOI快速将datatable数据导入excel中指定sheet,要求快速高效
    • ¥15 再不同版本的系统上,TCP传输速度不一致
    • ¥15 高德地图点聚合中Marker的位置无法实时更新
    • ¥15 DIFY API Endpoint 问题。
    • ¥20 sub地址DHCP问题