As found in the discussions about bug 1540, there is a problem parsing OQL
WHERE clauses containing string or character constants including question mark
("?") characters. It results in this exception, because this character is
misunderstood as bind variable place holder:
java.lang.ArrayIndexOutOfBoundsException: 0
at org.exolab.castor.util.SqlBindParser.bindJdbcValues(SqlBindParser.java:237)
at org.exolab.castor.jdo.engine.SQLEngine$SQLQuery.execute(SQLEngine.java:1766)
at org.exolab.castor.persist.TransactionContext.query
(TransactionContext.java:782)
at org.exolab.castor.jdo.engine.OQLQueryImpl.execute(OQLQueryImpl.java:474)
proposed patch including test case