Joined: Mon Oct 20, 2014 5:52 am Posts: 1
|
Hi,
i have gone through many forum similar to this issues. But still i couldn't get the resolution. Here is brief about my application jar version and full stack trace details. if anybody has solution to this problem. Please help me.
Spring: <org.springframework.version>4.0.5.RELEASE</org.springframework.version> Hibernate: <hibernate.version>4.3.5.Final</hibernate.version> JPA:spring-orm-4.0.5.RELEASE.jar C3P0:com.springsource.com.mchange.v2.c3p0-0.9.1 --------------------------------------------------------------------------------------------- application-context.xml
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"> <property name="driverClass"> <value>#{cpadbProps['cpa.jdbc.driverClassName']}</value> </property> <property name="jdbcUrl"> <value>#{cpadbProps['cpa.jdbc.url']}</value> </property> <property name="user"> <value>#{cpadbProps['cpa.jdbc.username']}</value> </property> <property name="password"> <value>#{cpadbProps['cpa.jdbc.password']}</value> </property> <property name="dataSourceName" value="#{cpadbProps['cpa.applicationName']}" /> <property name="initialPoolSize"><value>#{dbProps['hibernate.c3p0.initialPoolSize']}</value></property> <property name="minPoolSize"><value>#{dbProps['hibernate.c3p0.minPoolSize']}</value></property> <property name="maxPoolSize"><value>#{dbProps['hibernate.c3p0.maxPoolSize']}</value></property> <property name="acquireRetryAttempts"><value>#{dbProps['hibernate.c3p0.acquireRetryAttempts']}</value></property> <property name="acquireIncrement"><value>#{dbProps['hibernate.c3p0.acquireIncrement']}</value></property> <property name="idleConnectionTestPeriod"><value>#{dbProps['hibernate.c3p0.idleConnectionTestPeriod']}</value></property> <property name="maxIdleTime"><value>#{dbProps['hibernate.c3p0.maxIdleTime']}</value></property> <property name="maxConnectionAge"><value>#{dbProps['hibernate.c3p0.maxConnectionAge']}</value></property> <property name="preferredTestQuery"><value>#{dbProps['hibernate.c3p0.preferredTestQuery']}</value></property> <property name="testConnectionOnCheckin"><value>#{dbProps['hibernate.c3p0.testConnectionOnCheckin']}</value></property> <property name="checkoutTimeout"><value>30000</value></property> </bean>
<!-- ************ JPA configuration *********** --> <bean id="cpaEntityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> <property name="dataSource" ref="dataSource" /> <property name="jpaVendorAdapter"> <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"> <property name="database" value="MYSQL" /> </bean> </property> <property name="packagesToScan" value="com.causeway.pm.cpaintegration.transferobjects"></property> <property name="loadTimeWeaver"> <bean class="org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver" /> </property> <property name="jpaProperties"> <map> <entry key="hibernate.dialect" value="#{cpadbProps['cpa.hibernate.dialect']}" /> <entry key="hibernate.show_sql" value="#{dbProps['hibernate.show_sql']}" /> <entry key="hibernate.hbm2ddl.auto" value="#{dbProps['hibernate.hbm2ddl.auto']}" /> <entry key="hibernate.jdbc.batch_size" value="#{dbProps['hibernate.jdbc.batch_size']}" /> <entry key="hibernate.jdbc.fetch_size" value="#{dbProps['hibernate.jdbc.fetch_size']}" /> <entry key="hibernate.max_fetch_depth" value="#{dbProps['hibernate.max_fetch_depth']}" /> <entry key="hibernate.jdbc.use_scrollable_resultsets" value="true" /> <entry key="hibernate.default_batch_fetch_size" value="30" /> <entry key="hibernate.jdbc.batch_versioned_data" value="true" /> <entry key="hibernate.generate_statistics" value="true" /> <entry key="hibernate.cache" value="true" /> <entry key="hibernate.cache.use_second_level_cache" value="true" /> <entry key="hibernate.cache.use_query_cache" value="true" /> <entry key="hibernate.cache.provider_class" value="org.hibernate.cache.EhCacheProvider" /> <entry key="hibernate.cache.provider_configuration_file_resource_path" value="classpath:conf/ehcache.xml" /> <entry key="hibernate.cache.region.factory_class" value="org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory" /> </map> </property> </bean>
<bean id="cpaTransactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"> <property name="entityManagerFactory" ref="cpaEntityManagerFactory" /> </bean>
<tx:annotation-driven mode="aspectj" transaction-manager="cpaTransactionManager" /> --------------------------------------------------------------------------------------------------- dbProps.properties
hibernate.show_sql=true hibernate.hbm2ddl.auto=no-create
hibernate.jdbc.batch_size=20 hibernate.jdbc.fetch_size=20 hibernate.max_fetch_depth=2
hibernate.c3p0.initialPoolSize=10 hibernate.c3p0.minPoolSize=1 hibernate.c3p0.maxPoolSize=25 hibernate.c3p0.acquireRetryAttempts=10 hibernate.c3p0.acquireIncrement=5 hibernate.c3p0.idleConnectionTestPeriod=10800 hibernate.c3p0.preferredTestQuery=SELECT 1; hibernate.c3p0.testConnectionOnCheckin=false hibernate.c3p0.maxConnectionAge=14400 hibernate.c3p0.maxIdleTime=21600
cpadbProps.properties
cpa.hibernate.dialect=org.hibernate.dialect.SQLServer2008Dialect cpa.jdbc.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver cpa.jdbc.url=jdbc:sqlserver://bg-dev-p6:1433;databaseName=EVA
|
|