1. Query Level 2 Caching throwing ClassCastException stackoverflow.comI am using JPA and Hibernate for the database. I have configured (EHCacache) second level cache and query level cache, but just to make sure that caching is working I was ... |
2. HQL for select two columns from one table stackoverflow.comI want to select two columns from a table. I m writing this query:-
|
3. Hibernate createQuery() throws ClassCastException, Transformer doesn't help stackoverflow.comTrying to SELECT an entity using Using Hibernate 3.6 and MySQL5.1 but I keep getting a ClassCastException.
|
4. ClassCastException in find forum.hibernate.orgjava.lang.ClassCastException:iunique.model.Subscription cannot be cast to iunique.model.Subscription at iunique.service.ServicesManagerImpl.findSubscriptionByMSISDN(ServicesManagerImpl.java:56) at iunique.service.ServicesManagerImpl.getActiveServices(ServicesManagerImpl.java:97) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:416) at org.apache.wicket.proxy.$Proxy18.getActiveServices(Unknown Source) at iunique.web.status.ServiceList. |
5. Count do not work java.lang.ClassCastException forum.hibernate.org |
6. ClassCastException with order-by and SortedSet forum.hibernate.orgI'm having troubles using the order-by attribute of the |
7. session.refresh() causes ClassCastException forum.hibernate.orgAuthor Message keviny Post subject: session.refresh() causes ClassCastException Posted: Mon Mar 08, 2004 2:30 am Beginner Joined: Wed Aug 27, 2003 6:15 am Posts: 22 Hi all I've tested this with Hibernate 2.1.1 and 2.1.2 and yielded the same result. The DB is Oracle 9.2.0.3.0. What I've done is simply use session.load(Class, Serializable) to load an object and refresh ... |
8. ClassCastException in sorted Set forum.hibernate.orgOK. I am trying to provide some sorting for collections which result from many-to-many relationships. I have seen previous posts which suggest that the DB "order-by" attribute of a collection mapping does not apply to objects in the "child" half of a M2M relationship, and that this behaviour is "not supported" (this is a little irritating actually). So, as a second ... |
9. ClassCastException in method next() of ScrollableResults forum.hibernate.orgHibernate version:2.1.7 Mapping documents: Code between sessionFactory.openSession() and session.close(): Code: try{ Session hibSess = ks.getHibernateSession(); Query query = hibSess.createQuery(strBuffQuery.toString()); ... |
10. Error using named query: ClassCastException forum.hibernate.orgHi all, I've found an error using named queries with hibernate 3 beta 4 (CVS today checkout). I've tracked down the problem to the class org.hibernate.hql.ast.SyntheticAndFactory(line 44): Code: fragment = ( SqlFragment ) ASTUtil.create( astFactory, SQL_TOKEN, whereFragment ); but the method returns AST object (org.hibernate.hql.ast.ASTUtil:34): ... |
11. ClassCastException when finding a Long value forum.hibernate.orgNewbie Joined: Fri Mar 11, 2005 2:03 am Posts: 4 I'm getting a ClassCastException when I'm trying to select with the "displayId" as part of the criteria. If I only add the "itemName" to the criteria, everything works fine. Any ideas? Hibernate version: 2.1.8 Mapping documents: |
12. why ClassCastException when using session.createQuery(hql)? forum.hibernate.org |
13. ClassCastException when using Query By Example forum.hibernate.orgRegular Joined: Thu Jul 08, 2004 1:21 pm Posts: 68 Location: Recife - Pernambuco - Brazil Hi, I am getting a exception when trying to use query by example for a simple component. I haven't get this before, and I could not see where is the error. I am using Hibernate Annotations support for tests purpose. The information about error is ... |
14. many-to-one classCastException on query. forum.hibernate.orgNewbie Joined: Thu Mar 24, 2005 10:07 am Posts: 14 Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Im really hoping someone can help me. This might be a newbie question but I have a situation where I fear there will be performance issues. I have an auction scenario. An Auction contains a Set of Bids. Bids are tied ... |
15. Confused by behavior of Subqueries.in(); ClassCastException forum.hibernate.orgBeen working with Hibernate for a while now, but until recently I haven't had to dig very deeply into the Criteria queries stuff. Now I do, and it looks like the manual has been updated fairly recently - I don't remember seeing the stuff on Subqueries the last time I looked a few months ago. I thought I understood from the ... |
16. Adding then Removing Projection causes ClassCastException forum.hibernate.org@Entity @Table(name="users") @SequenceGenerator(name="seq_users",sequenceName="seq_users") public class User extends BaseEntity { @Override @Id @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="seq_users") public Long getId() { return super.getId(); } @Column(nullable=false,unique=true,length=32) public String getUsername() { return username; } } |
17. ClassCastException using sort= |
18. ClassCastException trying to cache sql query forum.hibernate.orgI'm getting a class cast exception when trying to cache a sql query that returns a count. The query works just fine if I don't try and cache it. Here's the code that causes it. Session hSession = HibernateSessionFactory.getSession(); java.math.BigDecimal rc = (java.math.BigDecimal)hSession.createSQLQuery( "SELECT COUNT(DISTINCT ac_cc_id)"+ " FROM attorney_case ac "+ " JOIN consumer_case_category_xref cccx ON ac.ac_cc_id=cccx.cccx_cc_id "+ " JOIN category_to_users ... |
19. ClassCastException sort forum.hibernate.orgIm having an object that contains a list of replys. as long as the replys were not sorted anything went fine. but as soon as i added the sort attribute as shown bolow I got an ClassCastExcption when trying to load the object. Mapping (extract) |
20. ClassCastException when performing a SELECT i.e. session.get forum.hibernate.orgHibernate version:3.0.5 Name and version of the database you are using: Oracle 10g Ok, I'm having touble with preforming a select, i.e. with session.get I dropped all my tables and created a small one just to try and figure out what's the problem, with no luck. Notice that I succeed on INSERT, i.e. session.persist, though fail in the SELECT. My bean ... |
21. ClassCastException on a simple query forum.hibernate.orgbirwin Post subject: Posted: Thu Nov 30, 2006 12:22 pm Newbie Joined: Wed Nov 29, 2006 6:55 pm Posts: 10 Exception (From JBoss log file): Code: 2006-11-30 09:18:12,001 DEBUG [org.hibernate.engine.TwoPhaseLoad] done materializing entity [com.sosstaffing.trax.persistence.biolynx.Client#5133] 2006-11-30 09:18:12,001 DEBUG [org.hibernate.engine.StatefulPersistenceContext] initializing non-lazy collections 2006-11-30 09:18:12,001 DEBUG [org.hibernate.loader.Loader] done entity load 2006-11-30 09:18:12,001 ERROR [STDERR] java.lang.ClassCastException: com.sosstaffing.trax.persistence.biolynx.Client 2006-11-30 09:18:12,001 ERROR [STDERR] ... |
22. ClassCastException using count forum.hibernate.orgHi, I am trying to get the count using HQL. This is my code: Integer id = (Integer)session.createQuery("select count(*) from Orders").uniqueResult(); When i try to cast the return value as Integer i get a ClassCastException java.lang.ClassCastException: java.lang.Long It works fine if i cast to a Long. Is there any problem with the code? Any help is appreciated Thanks in advance |
23. ClassCastException when using Criteria query forum.hibernate.org |
24. ClassCastException when using Criteria query forum.hibernate.org |
25. Named query ClassCastException on Short param forum.hibernate.org public List |
26. ClassCastException while using count(*) in HQL query forum.hibernate.orgHi, I am using Hibernate 3.3.1 GA version for one of my project. I am getting following exception while using "count()" agreegate function. "java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer" Following is the sample code that I have written for testing count() function: Code in TestDAO: ===================================== String strQuery = "Select count(empId) as empCount from TbTestEmp where deptNo = ?"; Query ... |
27. help with createSQLQuery, getting ClassCastException forum.hibernate.orgHi, I have 2 entities with a join condition on column BOOK_ID. One is Chapter, which has its own BOOK_ID column and one is Book whose getId() column is also BOOK_ID. Note that I have not done a many-to-one mapping on Chapter.BOOK_ID to let Hibernate know about the possible join. I'm trying to use createSQLQuery: select c.CHAPTER_ID, (b.*) from CHAPTERS c ... |