I've some problem running Test class under \src\examples\jdo.
I create the db using create.sql and then start Test class. It works well, but after the first marshallling it crashes when I iterate the QueryResult:
db.begin();
marshaller.marshal( db.load( Product.class, new Integer( 4 ) ) );
computerOql = db.getOQLQuery( "SELECT c FROM castor.bean.Computer c" );
results = computerOql.execute();
while( results.hasMore() ) <<-- HERE IT CRASHES!!!
Now, if I run it again it crashes at the same point of the first "select".
I've tried this whit both SQLServer 7 (jdbc-odbc bridge) catching an "SQLException: Data Not Found" and MySql (driver "org.gjt.mm.mysql.Driver").
Here the stacktrace of MySql:
[test] Begin transaction
[test] SELECT prod.id,prod.name,prod.price,prod.group_id,prod_detail.id FROM prod LEFT OUTER JOIN prod_detail ON prod.id=prod_detail.prod_id WHERE (prod.id = ?)
[test] org.exolab.castor.jdo.PersistenceException: Nested error: org.gjt.mm.mysql.jdbc2.NotImplemented
[test] org.gjt.mm.mysql.jdbc2.NotImplemented
[test] at org.gjt.mm.mysql.jdbc2.ResultSet.getBigDecimal(ResultSet.java:198)
[test] at org.exolab.castor.jdo.engine.SQLTypes.getObject(SQLTypes.java:319)
[test] at org.exolab.castor.jdo.engine.SQLEngine$SQLQuery.loadSingleField(SQLEngine.java:1708)
[test] at org.exolab.castor.jdo.engine.SQLEngine$SQLQuery.loadRow(SQLEngine.java:1774)
[test] at org.exolab.castor.jdo.engine.SQLEngine$SQLQuery.fetchRaw(SQLEngine.java:1847)
[test] at org.exolab.castor.jdo.engine.SQLEngine$SQLQuery.nextIdentity(SQLEngine.java:1655)
[test] at org.exolab.castor.persist.QueryResults.nextIdentity(QueryResults.java:173)
[test] at org.exolab.castor.jdo.engine.OQLQueryImpl$OQLEnumeration.hasMore(OQLQueryImpl.java:571)
[test] at org.exolab.castor.jdo.engine.OQLQueryImpl$OQLEnumeration.hasMore(OQLQueryImpl.java:557)
[test] at castor.jdo.Test.run(Test.java:109)
[test] at castor.jdo.Test.main(Test.java:62)
Thanks, Gianmarco.
Do You Yahoo!?
Get personalised at My Yahoo!.
