Skip to main content

Can not use hibernate with glassfish !

1 reply [Last post]
mcfish
Offline
Joined: 2005-11-08
Points: 0

Hello,

My system:

glassfish b28
hibernate 3

I can't use this statement:

Query query = session.createQuery("from User u");

It raise a ClassNotFoundException: org.hibernate.hql.ast.HqlToken.

The raison is glassfish and Hibernate use antlr.jar. And glassfish's jar file hasn't this class.
( I've found this site http://www.hibernate.org/250.html#A25, but it's for BEA )

How can I overcome this problem ?

regards
McFish

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
mm110999
Offline
Joined: 2005-03-29
Points: 0

You can put the version of antlr.jar you want to refer to in classpath-prefix in domain.xml as follows