Results 1 to 3 of 3

Thread: Object has been closed

  1. #1
    Join Date
    Jun 2005
    Location
    San Mateo, CA
    Posts
    34

    Default Object has been closed

    hi All,

    I'm using MS-SQL server as the backend db with Spring 1.2.1 using the ibatis 2.0 data mapping layer.

    I'm getting this error: "Object has been closed"

    My transaction setting is:

    Code:
    	<bean id="baseTransactionProxy" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"
    		  abstract="true">
    		<property name="transactionManager"><ref bean="transactionManager"/></property>
    		<property name="transactionAttributes">
    			<props>
    				<prop key="insert*">PROPAGATION_REQUIRED</prop>
    				<prop key="update*">PROPAGATION_REQUIRED</prop>
    				<prop key="*">PROPAGATION_REQUIRED</prop>
    			</props>
    		</property>
    	</bean>
    I'm using the Commons DBCP BasicDataSource with the following settings:

    Code:
    # ---------- Data Source Pool Configuration --------------
    emod.jdbc.datasource.initialSize=5
    emod.jdbc.datasource.maxActive=20
    emod.jdbc.datasource.maxIdle=10
    emod.jdbc.datasource.maxWait=20000
    emod.jdbc.datasource.poolPreparedStatements=false
    I'm using the branded OEM DataDirect jdbc drivers. Interestingly, when I revert to using the Inet sprinta2000.jar driver, I don't encounter this error.. any ideas?

    Thanks

  2. #2
    Join Date
    Aug 2004
    Location
    San Mateo, CA
    Posts
    1,265

    Default

    Please post the stack trace--at least as far as the Spring transaction layer.
    Rod Johnson - GM, SpringSource Division, VMware
    http://www.springsource.com
    Spring From the Source

  3. #3
    Join Date
    Jun 2005
    Location
    San Mateo, CA
    Posts
    34

    Default Stack trace

    Here's the stack trace from my junit test.

    Code:
    org.springframework.transaction.CannotCreateTransactionException&#58; Could not open JDBC connection for transaction; nested exception is java.sql.SQLException&#58; &#91;sebl&#93;&#91;SQLServer JDBC Driver&#93;Object has been closed.
    java.sql.SQLException&#58; &#91;sebl&#93;&#91;SQLServer JDBC Driver&#93;Object has been closed.
    	at com.siebel.sem.jdbc.base.BaseExceptions.createException&#40;Unknown Source&#41;
    	at com.siebel.sem.jdbc.base.BaseExceptions.getException&#40;Unknown Source&#41;
    	at com.siebel.sem.jdbc.base.BaseConnection.getMetaData&#40;Unknown Source&#41;
    	at org.apache.commons.dbcp.DelegatingConnection.getMetaData&#40;DelegatingConnection.java&#58;222&#41;
    	at org.springframework.jdbc.support.nativejdbc.SimpleNativeJdbcExtractor.doGetNativeConnection&#40;SimpleNativeJdbcExtractor.java&#58;159&#41;
    	at org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractorAdapter.getNativeConnection&#40;NativeJdbcExtractorAdapter.java&#58;87&#41;
    	at com.siebel.sem.emod.server.datasource.EmodDelegateDataSource.getConnection&#40;EmodDelegateDataSource.java&#58;68&#41;
    	at org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin&#40;DataSourceTransactionManager.java&#58;170&#41;
    	at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction&#40;AbstractPlatformTransactionManager.java&#58;234&#41;
    	at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary&#40;TransactionAspectSupport.java&#58;217&#41;
    	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke&#40;TransactionInterceptor.java&#58;50&#41;
    	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed&#40;ReflectiveMethodInvocation.java&#58;144&#41;
    	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke&#40;JdkDynamicAopProxy.java&#58;174&#41;
    	at $Proxy0.addSchedule&#40;Unknown Source&#41;
    	at com.siebel.sem.emod.server.dao.test.ScheduleDaoTest.testAddSchedule&#40;ScheduleDaoTest.java&#58;52&#41;
    	at sun.reflect.NativeMethodAccessorImpl.invoke0&#40;Native Method&#41;
    	at sun.reflect.NativeMethodAccessorImpl.invoke&#40;Unknown Source&#41;
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke&#40;Unknown Source&#41;
    	at java.lang.reflect.Method.invoke&#40;Unknown Source&#41;
    	at junit.framework.TestCase.runTest&#40;TestCase.java&#58;154&#41;
    	at junit.framework.TestCase.runBare&#40;TestCase.java&#58;127&#41;
    	at junit.framework.TestResult$1.protect&#40;TestResult.java&#58;106&#41;
    	at junit.framework.TestResult.runProtected&#40;TestResult.java&#58;124&#41;
    	at junit.framework.TestResult.run&#40;TestResult.java&#58;109&#41;
    	at junit.framework.TestCase.run&#40;TestCase.java&#58;118&#41;
    	at junit.framework.TestSuite.runTest&#40;TestSuite.java&#58;208&#41;
    	at junit.framework.TestSuite.run&#40;TestSuite.java&#58;203&#41;
    	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests&#40;RemoteTestRunner.java&#58;478&#41;
    	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run&#40;RemoteTestRunner.java&#58;344&#41;
    	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main&#40;RemoteTestRunner.java&#58;196&#41;

Similar Threads

  1. Replies: 2
    Last Post: Oct 10th, 2005, 05:12 PM
  2. Spring container fails with no exception
    By naor in forum Container
    Replies: 9
    Last Post: Oct 1st, 2005, 03:39 PM
  3. EHCaching Hibernate
    By dencamel in forum Data
    Replies: 3
    Last Post: Sep 6th, 2005, 09:03 PM
  4. Loosing my SecureContext
    By sklakken in forum Security
    Replies: 3
    Last Post: Jul 21st, 2005, 01:44 PM
  5. Stack Overflow
    By rayho222 in forum Container
    Replies: 6
    Last Post: May 17th, 2005, 03:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •