If you look more closely at the stacktrace, you'll see that the problem does not lie in the mapping of your class but in the query that you used (getCollectionByQuery)
<snip> > [org.apache.ojb.broker.accesslayer.JdbcAccessImpl] ERROR: SQLException during > the execution of the query (for com.bimki.oo7j.ojb.om.CzescAtomowa): Unable > to convert between java.util.Date and JAVA_OBJECT. > Unable to convert between java.util.Date and JAVA_OBJECT. > java.sql.SQLException: Unable to convert between java.util.Date and > JAVA_OBJECT. > at net.sourceforge.jtds.jdbc.Support.convert(Support.java:462) > at > net.sourceforge.jtds.jdbc.JtdsPreparedStatement.setObjectBase(JtdsPreparedStatement.java:284) > at > net.sourceforge.jtds.jdbc.JtdsPreparedStatement.setObject(JtdsPreparedStatement.java:558) > at > org.apache.ojb.broker.accesslayer.StatementManager.bindStatementValue(Unknown > Source) > at > org.apache.ojb.broker.accesslayer.StatementManager.bindStatement(Unknown > Source) > at > org.apache.ojb.broker.accesslayer.StatementManager.bindSelectionCriteria(Unknown > Source) > at > org.apache.ojb.broker.accesslayer.StatementManager.bindStatement(Unknown > Source) > at > org.apache.ojb.broker.accesslayer.StatementManager.bindStatement(Unknown > Source) > at > org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeQuery(Unknown Source) > at > org.apache.ojb.broker.accesslayer.RsQueryObject.performQuery(Unknown Source) > at org.apache.ojb.broker.accesslayer.RsIterator.<init>(Unknown Source) > at > org.apache.ojb.broker.core.RsIteratorFactoryImpl.createRsIterator(Unknown > Source) > at > org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIteratorFromQuery(Unknown > Source) > at > org.apache.ojb.broker.core.PersistenceBrokerImpl.getIteratorFromQuery(Unknown > Source) > at > org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(Unknown > Source) > at > org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(Unknown > Source) > at > org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(Unknown > Source) > at > org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(Unknown > Source) > at > org.apache.ojb.broker.core.DelegatingPersistenceBroker.getCollectionByQuery(Unknown > Source) > at > org.apache.ojb.broker.core.DelegatingPersistenceBroker.getCollectionByQuery(Unknown > Source) > at com.bimki.oo7j.experiments.OJB.zapytanie2(OJB.java:220) Here OJB tries to bind the query arguments to a prepared select statement but it fails to do so because the Date object that you specified does not fit the jdbc type of the corresponding statement parameter (which the JTDS driver thinks is JAVA_OBJECT). Could you please post the creation and binding of this query (method com.bimki.oo7j.experiments.OJB.zapytanie2) ? Tom --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
