Hi, I found what was my mistake. In my DB, I have a field type long and
I've papped it with char. 
I found that the Exception thrown be the Oracle JDBC Driver isn't very
understandable.

:-))

Herv�

> -----Original Message-----
> From: Herv� Guidetti 
> Sent: lundi, 10. septembre 2001 14:30
> To: [EMAIL PROTECTED]
> Subject: [castor-dev] SQLException trying the parse a QueryResult
> 
> 
> Hi, 
> I get an error parsing a QueryResult.
> 
>             ....
>             db.begin();
>             loggerOql = db.getOQLQuery("SELECT log FROM myapp.Logger
> log");
>             results = loggerOql.execute();
>             
>             list = new Vector();
>             while (results.hasMore())
>             {
>                 Object obj = results.next();
>                 list.add(obj);
>             }
>             
>             results.close();
>             db.commit();
>             db.close();
>             ....
>  
> I have many logger in my DB. But when I run this code I get an
> SQLException saying that the data steam is already closed. 
> 
> Any idea about why ?
> 
> Here is the stacktrace :
> java.sql.SQLException: Le flux de donn�es est d�j� ferm�
>         at
> oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
>         at
> oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:156)
>         at
> oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:219)
>         at
> oracle.jdbc.driver.OracleStatement.getBytesInternal(OracleStat
> ement.java
> :2365)
>         at
> oracle.jdbc.driver.OracleStatement.getStringValue(OracleStatem
> ent.java:2
> 438)
>         at
> oracle.jdbc.driver.OracleResultSetImpl.getString(OracleResultS
> etImpl.jav
> a:285)
>         at
> org.exolab.castor.jdo.engine.SQLTypes.getObject(SQLTypes.java:316)
>         at
> org.exolab.castor.jdo.engine.SQLEngine$SQLQuery.loadSingleFiel
> d(SQLEngin
> e.java:1709)
>         at
> org.exolab.castor.jdo.engine.SQLEngine$SQLQuery.loadRow(SQLEng
> ine.java:1
> 775)
>         at
> org.exolab.castor.jdo.engine.SQLEngine$SQLQuery.fetchRaw(SQLEn
> gine.java:
> 1848)
>         at
> org.exolab.castor.jdo.engine.SQLEngine$SQLQuery.nextIdentity(S
> QLEngine.j
> ava:1656)
>         at
> org.exolab.castor.persist.QueryResults.nextIdentity(QueryResul
> ts.java:17
> 3)
>         at
> org.exolab.castor.jdo.engine.OQLQueryImpl$OQLEnumeration.hasMo
> re(OQLQuer
> yImpl.java:570)
>         at
> org.exolab.castor.jdo.engine.OQLQueryImpl$OQLEnumeration.hasMo
> re(OQLQuer
> yImpl.java:556)
>         at
> com.idbsoft.spyco.spytrf.persistence.logger.castor.LoggerDBCas
> torPer.get
> All(LoggerDBCastorPer.java:109)
>         at
> com.idbsoft.spyco.spytrf.persistence.logger.castor.LoggerDBCas
> torPer.mai
> n(LoggerDBCastorPer.java:186)
> 
> 
> Herv�
> 
> P.S : If I use results.hasMoreElements(), it works but I just 
> get *one*
> Logger and not all. 
> 
> ----------------------------------------------------------- 
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>       unsubscribe castor-dev
> 
> 

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to