pussmun wrote:
Okay,
Thanx for you reply. If we get this error again we will have the full stacktrace which might provide some additional info. I'll try out c3p0 too.
Regarding the max-setting for active connections - can this really be the cause of the exception? Is it possible that the application tries to create more than the allowed number of active connections, in spite of the restriction?
I have problem with teh configuration of c3po hibernate poolded datasource...it hangs when initializing HibernateTransactionManager
INFO - ibernateTransactionManager - Using DataSource [com.mchange.v2.c3p0.Combo
PooledDataSource@d0af9b[ acquireIncrement -> 3, acquireRetryAttempts -> 30, acqu
ireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, b
reakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionTesterClassNam
e -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, description -> null, driv
erClass -> com.mysql.jdbc.Driver, factoryClassLocation -> null, forceIgnoreUnres
olvedTransactions -> false, identityToken -> d0af9b, idleConnectionTestPeriod ->
-1, initialPoolSize -> 3, jdbcUrl -> jdbc:mysql://localhost:3306/biblestudy?aut
oReconnect=true&relaxAutoCommit=true, loginTimeout -> 0, maxIdleTime -> 0, m
axPoolSize -> 15, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSi
ze -> 3, numHelperThreads -> 3, preferredTestQuery -> null, properties -> {user=
******, password=******}, propertyCycle -> 300, testConnectionOnCheckin -> false
, testConnectionOnCheckout -> false, usesTraditionalReflectiveProxies -> false ]
] of Hibernate SessionFactory for HibernateTransactionManager
My spring configuration file of datasoucre is following:
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/b ... ns-2.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/a ... op-2.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/t ... tx-2.0.xsd">
<tx:annotation-driven transaction-manager="transactionManager"/>
<bean id="placeholderConfig"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location">
<value>classpath:application.properties</value>
</property>
<property name="systemPropertiesModeName">
<value>SYSTEM_PROPERTIES_MODE_OVERRIDE</value>
</property>
</bean>
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
<property name="driverClass" value="${jdbc.driver}"/>
<property name="jdbcUrl" value="${jdbc.url}"/>
<property name="user" value="${jdbc.username}"/>
<property name="password" value="${jdbc.password}"/>
</bean>
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource" />
</property>
<!-- Configuring automatic schema generation in Spring -->
<property name="namingStrategy" ref="namingStrategy" />
<property name="annotatedClasses">
<list>
<value>fi.passiba.services.group.persistance.Groupservice</value>
<value>fi.passiba.services.group.persistance.Groups</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
${hibernate.dialect}
</prop>
<prop key="hibernate.hbm2ddl.auto">
update
</prop>
<!-- <prop key="current_session_context_class">managed
</prop>-->
<prop key="hibernate.transaction.flush_before_completion">true
</prop>
<prop key="hibernate.transaction.auto_close_session">true
</prop>
<prop key="hibernate.show_sql">true
</prop>
<prop key="hibernate.format_sql">true
</prop>
<prop key="hibernate.max_fetch_depth">3
</prop>
<!-- <prop key="hibernate.default_batch_fetch_size">4</prop>-->
</props>
</property>
<property name="entityInterceptor">
<ref bean="entityAuditInterceptor"/>
</property>
</bean>
<!-- Configuring automatic schema generation in Spring -->
<bean id="namingStrategy" class="org.hibernate.cfg.ImprovedNamingStrategy"/>
<bean id="entityAuditInterceptor" class="fi.passiba.hibernate.AuditInterceptor"/>
<!-- setup transaction manager -->
<bean id="transactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
maven dependencies are following
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
<version>3.3.0.ga</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
<version>3.3.0.ga</version>
</dependency>
<dependency>
<groupId>c3p0</groupId>
<artifactId>c3p0</artifactId>
<version>0.9.0.4</version>
</dependency>
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
<version>1.0.1B</version>
</dependency>
Helpful advice kindly appreciated
I have also added javax.
what is the problem