Query with enum type fails
--------------------------

         Key: EJB-38
         URL: http://jira.andromda.org/browse/EJB-38
     Project: EJB Cartridge
        Type: Bug

    Reporter: Sverker Abrahamsson
 Assigned to: Vance Karimi 


A query including a enum type attribute fails with the following stacktrace:

Caused by: java.lang.ClassCastException: java.lang.String
        at org.hibernate.type.EnumType.nullSafeSet(EnumType.java:125)
        at org.hibernate.type.CustomType.nullSafeSet(CustomType.java:155)
        at org.hibernate.loader.hql.QueryLoader.bindNamedParameters(QueryLoader.
java:515)
        at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1577)
        at org.hibernate.loader.Loader.doQuery(Loader.java:661)
        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Lo
ader.java:224)
        at org.hibernate.loader.Loader.doList(Loader.java:2145)
        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
        at org.hibernate.loader.Loader.list(Loader.java:2024)
        at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:392)
        at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.ja
va:333)
        at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java
:172)
        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114)
        at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
        at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:53)
        at se.broaden.portal.t2.ChannelDaoBase.findByRegion(ChannelDaoBase.java:
468)
        at se.broaden.portal.t2.ChannelDaoBase.findByRegion(ChannelDaoBase.java:
445)
....


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.andromda.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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

Reply via email to