John,
can you please provide the relevant fragments of the code you are using (to be able to verify my assumption), but
looking at this exception, I'd be tempted to say that you are trying to iterate over the related objects after you've
committed your original transaction.
Werner
On Mon, 8 Sep 2003 12:42:06 -0400, John Brayton wrote:
>I am just becoming familiar with Castor JDO, and I am encountering a
>strange problem. If I just retrieve simple attributes of an object,
>everything works as expected. However if I also retrieve related
>Objects, mapped either as a one-to-many relationship or a
>many-to-many relationship in the database, I get this exception:
>
>java.sql.SQLException: Stream has already been closed
> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:180)
> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:222)
> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:285)
> at oracle.jdbc.ttc7.LongTTCItem.getChars(LongTTCItem.java:197)
> at oracle.jdbc.dbaccess.DBDataSetImpl.getCharsStreamItem(DBDataSetImpl.java:1188)
> at oracle.jdbc.driver.OracleStatement.getCharsInternal(OracleStatement.java:2932)
> at oracle.jdbc.driver.OracleStatement.getStringValue(OracleStatement.java:3047)
> at oracle.jdbc.driver.OracleResultSetImpl.getString(OracleResultSetImpl.java:308)
> at org.exolab.castor.jdo.engine.SQLTypes.getObject(SQLTypes.java:341)
> at org.exolab.castor.jdo.engine.SQLEngine$SQLQuery.loadSingleField(SQLEngine.java:1814)
> at org.exolab.castor.jdo.engine.SQLEngine$SQLQuery.loadRow(SQLEngine.java:1880)
> at org.exolab.castor.jdo.engine.SQLEngine$SQLQuery.fetchRaw(SQLEngine.java:1953)
> at org.exolab.castor.jdo.engine.SQLEngine$SQLQuery.nextIdentity(SQLEngine.java:1761)
> at org.exolab.castor.persist.QueryResults.nextIdentity(QueryResults.java:173)
> at org.exolab.castor.jdo.engine.OQLQueryImpl$OQLEnumeration.hasMore(OQLQueryImpl.java:638)
> at org.exolab.castor.jdo.engine.OQLQueryImpl$OQLEnumeration.hasMore(OQLQueryImpl.java:624)
>
>I also get this exception if I try to execute a second query, while looping through the results of my first query.
>
>I am using Castor version 0.9.5 with Oracle.
>
>I have done quite a bit of searching and reading to find a cause for
>this, but no luck. Has anyone seen similar behavior, or have an idea of
>what I might be doing wrong?
>
>Thanks!
>
>John
>
>-----------------------------------------------------------
>If you wish to unsubscribe from this mailing, send mail to
>[EMAIL PROTECTED] with a subject of:
> unsubscribe castor-dev
>
- [castor-dev] SQLException: Stream has already been closed John Brayton
- Re: [castor-dev] SQLException: Stream has already bee... Bruce Snyder
- Re: [castor-dev] SQLException: Stream has already bee... Werner Guttmann
- Re: [castor-dev] SQLException: Stream has already bee... John Brayton
- Re: [castor-dev] SQLException: Stream has already... Bruce Snyder
