• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Hibernate join query error "charScanner; panic:"

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My mappings are as follows

FOR TABLE "LKUP_DETL"

<hibernate-mapping package="com.patni.rrts.beans.admin">
<class name="SBUSelection" table="LKUP_DETL">
<id name="sbuId" column="LKUP_ID"
type="java.lang.String" />
<property name="lkpCode" column="LKUP_CD"
type="java.lang.String" />
<property name="sbuName" column="LKUP_VALUE_DESC"
type="java.lang.String" />
<join table ="SBU_ACCT_LKUP">
<key column="LKUP_ID"/>
</join>
</class>
</hibernate-mapping>


FOR TABLE SBU_ACCT_LKUP

<hibernate-mapping package="com.patni.rrts.beans.admin">
<class name="AccountSelection" table="SBU_ACCT_LKUP">
<id name="accntId" column="LKUP_ID" />
<property name="sbuId" column="SBU_ID" />
</class>
</hibernate-mapping>



The query is

Query q = session.createQuery("SELECT lkp FROM LKUP_DETL lkp JOIN lkp.sbu_acct_lkup");
Iterator items = q.list().iterator();
System.out.println("Stage 1");
while(items.hasNext()){
System.out.println("Stage 2");
SBUSelection sbsel = (SBUSelection)items.next();
System.out.println("NAME of accounts" + sbsel.getSbuName));
}


On execution of this code it throws an error

charScanner; panic: ClassNotFoundException: org.hibernate.hql.ast.HqlToken

Please advise ..Is it a problem with the mapping .How to form a mapping xml to perform a simple join operation on two tables.The docs on web is not clear

Thanks,
Mani.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ClassNotFoundException appears when a particular class cannot be found by the ClassLoader (so its nothing to do with the mapping). Check org.hibernate.hql.ast.HqlToken is in your classpath. You may have a conflict with more than one version of Hibernate kicking around, make sure you are only using Hibernate3.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic