I had this same problem and yes it was in the code not the db. My issue was
that I was closing the db connection before I was done with all operations
in the class.

You may also want to check you connection timeout period.

-----Original Message-----
From: Schroeder, Alexander [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 12, 2003 6:52 AM
To: 'Suraj Panicker'; [EMAIL PROTECTED]
Subject: RE: Object Is closed


Hello Suraj,

you guess that it's the result set, so would you mind sending a Java
backtrace that possibly gives more details to me. 

You get such an exception if you perform almost any method call on a 
closed ResultSet/Statement/Connection (a result set also closes if
you again execute a statement, because the old resultset becomes 
invalid by this). 

In the connection requesting code everything is ok, the thing must lay
somewhere in the application ...

Regards

Alexander Schr�der
SAP DB, SAP Labs Berlin 

> -----Original Message-----
> From: Suraj Panicker [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, November 12, 2003 1:43 PM
> To: [EMAIL PROTECTED]
> Subject: Object Is closed
> 
> 
> Hello,
> 
> I'm using connection pooling to get logical connections to 
> the DB, and I get
> the following error quite frequently :
> 
> Sap DBTech: Object is closed
> 
> I think this happens because the resultset object is closed. 
> Why is this
> happening ?
> 
> Following is the code in my SapDBConnection class, that is 
> used to get the
> connection :
> 
> 
> 
>       static ConnectionPoolDataSourceSapDB sapDBCpds;
>       static PooledConnection conpooled;
>       private static String mode = MODE_ORACLE;
> 
>       public static Connection getConnection(ServiceContext sc)
>         throws Exception
>       {
>               Connection con = null;
> 
>               if(sapDBCpds == null)
>               {
>                       sapDBCpds = 
> (ConnectionPoolDataSourceSapDB)Class.forName
> ("com.sap.dbtech.jdbcext.ConnectionPoolDataSourceSapDB").newIn
> stance();
> 
>                       sapDBCpds.setServerName(sc.getDBServerName());
>                       sapDBCpds.setDatabaseName(sc.getDBName());
>                       sapDBCpds.setUser(sc.getDBUserName());
>                       sapDBCpds.setSqlMode(mode);
>                       sapDBCpds.setTimeout(0);
>                       sapDBCpds.setPassword(sc.getDBPassword());
> 
>                       conpooled = sapDBCpds.getPooledConnection();
>               }
> 
>               con = conpooled.getConnection();
> 
>               return con;
>       }
> 
> 
> regards,
> 
> Suraj.
> 
> 
> -- 
> MaxDB Discussion Mailing List
> For list archives: http://lists.mysql.com/maxdb
> To unsubscribe:    
http://lists.mysql.com/[EMAIL PROTECTED]

-- 
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]

--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to