-->
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.  [ 2 posts ] 
Author Message
 Post subject: org.hibernate.property.BasicPropertyAccessor
PostPosted: Mon Jun 23, 2008 7:33 am 
Newbie

Joined: Mon Jun 23, 2008 7:28 am
Posts: 1
I have this code:

String hql ="from LanguageTranslation ltrans left join fetch ltrans.language_id where ltrans.keylabel = :keylabel and ltrans.language_id =:langID";

Query query = session.createQuery(hql);
query.setParameter("keylabel",key_label);
query.setParameter("langID", new Integer(languageID));
lTrans = (LanguageTranslation)query.uniqueResult();
Hibernate.initialize(lTrans.getTranslated_text());
session.getTransaction().commit();


s there something wrong with the syntax? Why am i having this error?:


org.hibernate.property.BasicPropertyAccessor
SEVERE: IllegalArgumentException in class: com.ibm.pli.databeans.Language, getter method of property: language_id
Exception in thread "main" org.hibernate.HibernateException: org.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of com.ibm.pli.databeans.Language.language_id
at com.ibm.pli.DAO.AbstractDAO.handleException(AbstractDAO.java:99)
at com.ibm.pli.DAO.LanguageTranslationDAO.getMessage(LanguageTranslationDAO.java:96)
at com.ibm.pli.test.TestManager.testRetrival(TestManager.java:30)
at com.ibm.pli.test.TestManager.main(TestManager.java:20)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 23, 2008 10:31 am 
Expert
Expert

Joined: Tue May 13, 2008 3:42 pm
Posts: 919
Location: Toronto & Ajax Ontario www.hibernatemadeeasy.com
What is the datatype of id? Are you passing in a String when a valid number is actually required?

_________________
Cameron McKenzie - Author of "Hibernate Made Easy" and "What is WebSphere?"
http://www.TheBookOnHibernate.com Check out my 'easy to follow' Hibernate & JPA Tutorials


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

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.