-->
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.  [ 10 posts ] 
Author Message
 Post subject: org.hibernate.QueryException: ClassNotFoundException: org.hi
PostPosted: Tue Aug 29, 2006 8:20 pm 
Beginner
Beginner

Joined: Tue Aug 29, 2006 8:13 pm
Posts: 32
Location: Spain (GU)
I have a problem with Hibernate in Systinet Server (from Web Service) that I haven't when I execute the code from console. The error is:

org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [select u from src.pojo.Folder u where u.idOperation=? and u.idParentFolder=?] at org.hibernate.hql.ast.HqlLexer.panic(HqlLexer.java:57)

Do you have any idea about configuration of Systinet Server with Hibernate 3.1?

I saw this topic in a forum but I didn't understand it:http://forum.hibernate.org/viewtopic.php?t=939468 ,is really confusing and they talk about BEA. What can I do in Systinet?

Thanks in advance.

Best Regards.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 29, 2006 9:52 pm 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
Is antlr-*.jar in the classpath ?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 30, 2006 8:23 pm 
Beginner
Beginner

Joined: Tue Aug 29, 2006 8:13 pm
Posts: 32
Location: Spain (GU)
My OS has the variable CLASSPATH and I wrote this code:

Configuration cfg=new Configuration();
cfg.setProperties(System.getProperties());
_RootDAO.setConfigurationFileName("hbm/hibernate.cfg.xml");
_RootDAO.initialize("hbm/hibernate.cfg.xml",cfg);

The problem persists.

Thanks in advance


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 30, 2006 9:50 pm 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
So, is antlr-*.jar in the classpath ?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 31, 2006 7:01 am 
Beginner
Beginner

Joined: Tue Aug 29, 2006 8:13 pm
Posts: 32
Location: Spain (GU)
Yes, antlr-*.jar is in the CLASSPATH. This is my classpath when I execute "set" command:

CLASSPATH=D:\ProyectosEclipse\EditorProject\lib

There are a lot of jars in lib folder , like these:

ant-1.6.5.jar
ant-antlr-1.6.5.jar
ant-launcher-1.6.5.jar
antlr-2.7.6rc1.jar
ant-swing-1.6.5.jar
asm.jar
asm-attrs.jar
cglib-2.1.3.jar
commons-collections-2.1.1.jar
commons-logging-1.0.4.jar
dom4j-1.6.1.jar
ehcache-1.1.jar
hibernate3.jar
jta.jar
log4j-1.2.13.jar
postgresql-8.1-407.jdbc3.jar
xstream-1.1.2.jar

Many thanks.

Regards


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 31, 2006 11:31 am 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
You have two version of antlr, one is only for ant ant-antlr-1.6.5.jar . Usually this is only required at design time. Does the app require both?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 14, 2006 11:26 am 
Beginner
Beginner

Joined: Tue Aug 29, 2006 8:13 pm
Posts: 32
Location: Spain (GU)
Finally, I have resolved my error. I forgot a line in my hibernate.cfg.xml, that’s all:
<!—- The next line -->
<property name="query.factory_class">
org.hibernate.hql.classic.ClassicQueryTranslatorFactory
</property>

Many thanks,

Best regards.


Top
 Profile  
 
 Post subject: so your using the old ANTLR
PostPosted: Thu Sep 14, 2006 6:00 pm 
Beginner
Beginner

Joined: Thu Dec 09, 2004 7:04 pm
Posts: 26
Location: Denver, CO
If using the classic parser is working and using the normal parser is not, then the issue is indeed in your classpath or possibly your classloader.

The problem is that the old ANTLR classes are being loaded (perhaps by your application server) before the newer ANTLR classes.

This is why the previous responder is asking about your classpath. If your server execution looks something like:
Code:
java -classpath server/lib/old-antlr.jar:...:dir/new-antlr.jar

you will be getting the old ANTLR classes and you have to use the classic parser as a workaround.

But, if you change the system classpath to be something like:
Code:
java -classpath dir/new-antlr.jar:...

you would not need to use the old parser.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 18, 2006 3:36 am 
Beginner
Beginner

Joined: Tue Aug 29, 2006 8:13 pm
Posts: 32
Location: Spain (GU)
Thanks again,

What is the problem using the Classic parser? Does it have problems of performance?

Another question: What is the correct antlr-*.jar version?

I’m learning a lot about hibernate in this forum. Congratulations for the Hibernate community.

Rergards.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 18, 2006 3:37 am 
Beginner
Beginner

Joined: Tue Aug 29, 2006 8:13 pm
Posts: 32
Location: Spain (GU)
Thanks again,

What is the problem using the Classic parser? Does it have problems of performance?

Another question: What is the correct antlr-*.jar version?

I’m learning a lot about hibernate in this forum. Congratulations for the Hibernate community.

Rergards.


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