-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Constructor + HQL giving me class not found exception
PostPosted: Thu Oct 22, 2009 2:48 pm 
Beginner
Beginner

Joined: Thu May 28, 2009 10:25 am
Posts: 21
Is there a way around declaring the fully qualified Class name. I get class not found exception. I also tried various permutations of the setEntity method but they don't seem to work. What am I doing wrong?

Thanks

This doesn't work
Code:
Query query = session.createQuery("select new Junk(prod.id, prod.attributeId) from Production as prod");

[cause=java.lang.ClassNotFoundException: Junk]
Caused by: org.hibernate.hql.ast.QuerySyntaxException: Unable to locate class [Junk] [select new Junk(prod.id, prod.attributeId) from com.xxx.applications.data.Production as prod]



but this does:
Code:
Query query = session
   .createQuery("select new com.xxx.applications.data.Junk(prod.id, prod.attributeId) from Production as prod");



Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.