I get ORA-00936: missing expression coming back out of the query given below. It seems to be where I'm calling size() on a List. There's possible bugs in my code, but I'm still not sure that BeanKeeper should be generating invalid statements that easily. I've included the relevant portion of the stack trace further down as well.
QUERY:
8438 [TP-Processor2] DEBUG hu.netmind.beankeeper.sql - running count statement: select count(*) from (select distinct item.type_,item.guests,item.purpose,item.used,item.exchangerate,item.currency,item.amount,item.passengers,item.start_,item.receiptrequired,item.gbpamount,item.totalamount,item.miles,item.jobcharges,item.category,item.startdate,item.classification,item.enddate,item.journeydetails,item.end_,t_1.container_index,item.persistence_id,item.persistence_start as persistence_start0,item.persistence_end as persistence_end0 from autolist_items_ t_1,claimitem item,autolist persistence_container_parent where (( item.persistence_start <= ? ) and ( item.persistence_end > ? ) and ( persistence_container_parent.persistence_start <= ? ) and ( persistence_container_parent.persistence_end > ? ) and ( t_1.persistence_start <= ? ) and ( t_1.persistence_end > ? )) and (( persistence_container_parent.persistence_id = t_1.persistence_id ) and ( t_1.value = item.persistence_id and persistence_container_parent.persistence_id = () )))
STACK TRACE:
hu.netmind.beankeeper.common.StoreException: exception while sql select count
at hu.netmind.beankeeper.db.impl.GenericDatabase.search(GenericDatabase.java:1259)
at hu.netmind.beankeeper.db.impl.DatabaseBase.search(DatabaseBase.java:255)
at hu.netmind.beankeeper.query.impl.QueryServiceImpl.find(QueryServiceImpl.java:305)
at hu.netmind.beankeeper.query.impl.QueryServiceImpl.find(QueryServiceImpl.java:480)
at hu.netmind.beankeeper.query.impl.LazyListImpl.getStmtOffset(LazyListImpl.java:134)
at hu.netmind.beankeeper.query.impl.LazyListImpl.size(LazyListImpl.java:151)
at hu.netmind.beankeeper.type.impl.ListImpl.size(ListImpl.java:991
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
I redid my code a bit so the size() call was not needed and I get a similar error doing this select statement:
select distinct item.type_,item.guests,item.purpose,item.used,item.exchangerate,item.currency,item.amount,item.passengers,item.start_,item.receiptrequired,item.gbpamount,item.totalamount,item.miles,item.jobcharges,item.category,item.startdate,item.classification,item.enddate,item.journeydetails,item.end_,t_1.container_index,item.persistence_id,item.persistence_start as persistence_start0,item.persistence_end as persistence_end0 from claimitem item,claimlist persistence_container_parent,claimlist_items_ t_1 where (( item.persistence_start <= ? ) and ( item.persistence_end > ? ) and ( t_1.persistence_start <= ? ) and ( t_1.persistence_end > ? ) and ( persistence_container_parent.persistence_start <= ? ) and ( persistence_container_parent.persistence_end > ? )) and (( persistence_container_parent.persistence_id = t_1.persistence_id ) and ( t_1.value = item.persistence_id and persistence_container_parent.persistence_id = () )) order by t_1.container_index asc,item.persistence_id asc
hu.netmind.beankeeper.common.StoreException: exception while sql select
at hu.netmind.beankeeper.db.impl.GenericDatabase.search(GenericDatabase.java:1220)
at hu.netmind.beankeeper.db.impl.DatabaseBase.search(DatabaseBase.java:255)
at hu.netmind.beankeeper.query.impl.QueryServiceImpl.find(QueryServiceImpl.java:305)
at hu.netmind.beankeeper.query.impl.QueryServiceImpl.find(QueryServiceImpl.java:480)
at hu.netmind.beankeeper.query.impl.LazyListImpl.updateList(LazyListImpl.java:273)
at hu.netmind.beankeeper.query.impl.LazyListImpl.get(LazyListImpl.java:108)
at hu.netmind.beankeeper.type.impl.ListImpl.getInternal(ListImpl.java:824)
at hu.netmind.beankeeper.type.impl.ListImpl.get(ListImpl.java:779)
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
Thanks, I see it in the sql there is a "()" instead of an actual value. I will try to reproduce and fix.