[OJB-developers] DATE type in between error...
Brought to you by:
thma
From: <cn_...@ya...> - 2002-05-19 09:09:12
|
String oql = "select licenses from " + license.getClass().getName() + " where ownerId=\"" + sl.getOwner().getId() + "\" and status=\"" + License.ACTIVE + "\" and $678 between startTime and endTime"; OQLQuery query = getEngine().newOQLQuery(); DList licenses = null; try{ query.create(oql); query.bind(Calendar.getInstance().getTime()); licenses = (DList)query.execute(); }catch(QueryException e){ e.printStackTrace(); return false; } output: [junit] aa contain bb is: true [junit] bb contain cc is: false [junit] .[BOOT] INFO: OJB.properties: file:/C:/jakarta-tomcat-4.0.3/webapps/ corpforge/WEB-INF/classes/OJB.properties [junit] [BOOT] INFO: loading XML took 280 msecs [junit] line 1: unexpected token: and [junit] E [junit] Time: 2.243 [junit] There was 1 error: [junit] 1) testMethods(test.com.corpforge.mall.mirage.SimpleLicenseManagerTe st) [junit] java.lang.NullPointerException [junit] at ojb.odmg.oql.OQLQueryImpl.create(Unknown Source) [junit] at com.corpforge.mall.mirage.SimpleLicenseManager.isValid(Unknow n Source) [junit] at test.com.corpforge.mall.mirage.SimpleLicenseManagerTest.testM ethods(Unknown Source) [junit] [junit] FAILURES!!! _________________________________________________________ Do You Yahoo!? 摊开你的掌心 让我看看你 http://sweepstakes.yahoo.com/2002cnuser |