This one time, at band camp, John Brayton said:

JB>I am just becoming familiar with Castor JDO, and I am encountering a
JB>strange problem.  If I just retrieve simple attributes of an object,
JB>everything works as expected.  However if I also retrieve related
JB>Objects, mapped either as a one-to-many relationship or a
JB>many-to-many relationship in the database, I get this exception:
JB>
JB>java.sql.SQLException: Stream has already been closed
JB>        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:180)
JB>        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:222)
JB>        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:285)
JB>        at oracle.jdbc.ttc7.LongTTCItem.getChars(LongTTCItem.java:197)
JB>        at 
oracle.jdbc.dbaccess.DBDataSetImpl.getCharsStreamItem(DBDataSetImpl.java:1188)
JB>        at 
oracle.jdbc.driver.OracleStatement.getCharsInternal(OracleStatement.java:2932)
JB>        at 
oracle.jdbc.driver.OracleStatement.getStringValue(OracleStatement.java:3047)
JB>        at 
oracle.jdbc.driver.OracleResultSetImpl.getString(OracleResultSetImpl.java:308)
JB>        at org.exolab.castor.jdo.engine.SQLTypes.getObject(SQLTypes.java:341)
JB>        at 
org.exolab.castor.jdo.engine.SQLEngine$SQLQuery.loadSingleField(SQLEngine.java:1814)
JB>        at 
org.exolab.castor.jdo.engine.SQLEngine$SQLQuery.loadRow(SQLEngine.java:1880)
JB>        at 
org.exolab.castor.jdo.engine.SQLEngine$SQLQuery.fetchRaw(SQLEngine.java:1953)
JB>        at 
org.exolab.castor.jdo.engine.SQLEngine$SQLQuery.nextIdentity(SQLEngine.java:1761)
JB>        at 
org.exolab.castor.persist.QueryResults.nextIdentity(QueryResults.java:173)
JB>        at 
org.exolab.castor.jdo.engine.OQLQueryImpl$OQLEnumeration.hasMore(OQLQueryImpl.java:638)
JB>        at 
org.exolab.castor.jdo.engine.OQLQueryImpl$OQLEnumeration.hasMore(OQLQueryImpl.java:624)
JB>
JB>I also get this exception if I try to execute a second query, while looping through 
the results of my first query.
JB>
JB>I am using Castor version 0.9.5 with Oracle.
JB>
JB>I have done quite a bit of searching and reading to find a cause for
JB>this, but no luck.  Has anyone seen similar behavior, or have an idea of 
JB>what I might be doing wrong?

John,

It seems like you're trying to iterate on a QueryResults object that has
been closed. Is this what's happening? I'm not exactly sure what you're
trying to do so I can't even determine the cause of the problem. Please
post the relevant portions of your client code and your mapping descriptor
for analysis.

Bruce
-- 
perl -e 'print unpack("u30","<0G)[EMAIL PROTECTED]&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'

The Castor Project 
http://www.castor.org/

Apache Geronimo 
http://incubator.apache.org/projects/geronimo.html

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

Reply via email to