Using the latest 4.1 build from SVN we were receiving the generic 'CATALINA_OPTS=-Djava.awt.headless=true' error when attempting to access the Leads module. This error was traced back to the SQL query in QualifiedLeadsCounter.java. This query is modified by calling DatabaseUtils.castDateTimeToDate(db, "conversion_date"). Since we are using Oracle this function returns ("TO_DATE(" + date + ",'dd/mm/yyyy')"); In this case date is a TIMESTAMP and this was causing the error to be thrown by Oracle. Adding trunc() around the date fixes the error and should work for any future calls to DatabaseUtils.castDateTimeToDate() whether a TIMESTAMP or DATE type is input.
\src\java\org\aspcfs\utils\DatabaseUtils.java
264c264
< return ("TO_DATE(trunc(" + date + "),'dd/mm/yyyy')");
---
> return ("TO_DATE(" + date + ",'dd/mm/yyyy')");
I believe simply removing the entire TO_DATE call and just leaving "trunc(" + date + ")" would be even simpler and produce the same result.