The Source for Java Technology Collaboration

Home » java.net Forums » GlassFish » GlassFish

Thread: Can not use hibernate with glassfish !

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 1 - Last Post: Dec 8, 2005 11:59 AM by: mm110999
mcfish

Posts: 20
Can not use hibernate with glassfish !
Posted: Nov 30, 2005 1:03 AM
  Click to reply to this thread Reply

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

mm110999

Posts: 12
Re: Can not use hibernate with glassfish !
Posted: Dec 8, 2005 11:59 AM   in response to: mcfish
  Click to reply to this thread Reply

You can put the version of antlr.jar you want to refer to in classpath-prefix in domain.xml as follows
<java-config classpath-prefix="...." classpath-suffix="" ....>




 XML java.net RSS