In a CMP2.x Entity we have a special DateTime Object. In the jbosscmp-jdbc.xml deploymentdescriptor I add the following Element: <user-type-mappings> | <user-type-mapping> | <java-type>com.orga.jaf.date.Date</java-type> | <mapped-type>java.sql.Timestamp</mapped-type> | <mapper>com.orga.jaf.date.DateMapper</mapper> | </user-type-mapping> | <user-type-mapping> | <java-type>com.orga.jaf.date.DateTime</java-type> | <mapped-type>java.sql.Timestamp</mapped-type> | <mapper>com.orga.jaf.date.DateTimeMapper</mapper> | </user-type-mapping> | </user-type-mappings> | All getter and setter methods are public abstract void setXXX(DateTime date); | public abstract DateTime getXXX(); | This part works as I expected!
But when I add a finder that has such a DateTime object in the WHERE clause the following Exception is thrown at deploy time: org.jboss.deployment.DeploymentException: Error compiling EJB-QL statement for EJB 'LcAccount': SELECT OBJECT(o) FROM LcAccount o WHERE o.lcDateFrom = ?2 AND o.account.accountId = ?1; - nested throwable: (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "o.lcDateFrom" at line 1, column 43. | Was expecting one of: | "NOT" ... | "(" ... | <COLLECTION_VALUED_PATH> ... | <STRING_VALUED_PATH> ... | "CONCAT" ... | "SUBSTRING" ... | <BOOLEAN_VALUED_PATH> ... | <DATETIME_VALUED_PATH> ... | <ENTITY_VALUED_PATH> ... | <IDENTIFICATION_VARIABLE> ... | <NUMERIC_VALUED_PATH> ... | "LENGTH" ... | "LOCATE" ... | "ABS" ... | "SQRT" ... | "MOD" ... | "+" ... | "-" ... | <INTEGER_LITERAL> ... | <FLOATING_POINT_LITERAL> ... | <NUMERIC_VALUED_PARAMETER> ... | ) | Any ideas? Is it not posible to use own datatypes in a finder? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3955381#3955381 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3955381 Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user