-->
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.  [ 4 posts ] 
Author Message
 Post subject: Unable to read query statement
PostPosted: Sat Jul 02, 2005 9:04 am 
Newbie

Joined: Fri Jun 10, 2005 7:59 am
Posts: 5
I am using Hibernate 3.0.5 with weblogic server 8.1, sp4.

When i am writing query to read rows from the databse table from main ()function it is working fine. But when deploys this application into weblogic server i am getting the following exception .

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

My select query is

List lst=session.createQuery("select d.dname from Dept d").list();

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 02, 2005 10:00 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
read the migration guide on the wiki and notice the weblogic part

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 05, 2005 6:30 am 
Newbie

Joined: Fri Jun 10, 2005 7:59 am
Posts: 5
Thanx

I added following property in the hibernate.cfg.xml file and it is working fine

<property name="hibernate.query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</property>

I am using join property to map one class to multiple tables.

i want to delete a row in the join table.

Please kindly tell me how to set the properties

Here is my mapping file

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>

<class name="Dept" table="infozeal5.DEPT">
<id name="dept_id" column="dept_id" type="long" >

<generator class="assigned">

</generator>

</id>
<property name="dname" column="DNAME" type="string"/>
<property name="location" column="LOCATION" type="string"/>
<set name="e" inverse="true" cascade="all">
<key column="dept_id"/>
<one-to-many class="Emp" />
</set>


<join table="infozeal5.DADD">
<key column="dept_id"/>
<property name="dadd" column="DADD" type="string"/>
</join>
</class>

</hibernate-mapping>

I want to delete a record from the DADD table.


Regards

Rishi


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 05, 2005 1:25 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
session.delete(dept) ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.