I am trying first hibernate application from tutorial. It works for hibernate 
2.0 but it doest not work with hibernate 3.0.

private List listEvents() {
    Session session = HibernateUtil.currentSession();
    Transaction tx = session.beginTransaction();

    List result = session.createQuery("from Event").list();

    tx.commit();
    session.close();

    return result;
}

It is throwing following exception.
log4j:WARN No appenders could be found for logger 
(org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
java.lang.NoClassDefFoundError: antlr/ANTLRException
        at 
org.hibernate.hql.ast.ASTQueryTranslatorFactory.createQueryTranslator(ASTQueryTranslatorFactory.java:31)
        at 
org.hibernate.impl.SessionFactoryImpl.createQueryTranslators(SessionFactoryImpl.java:410)
        at 
org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:469)
        at org.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1032)
        at org.hibernate.impl.SessionImpl.iterate(SessionImpl.java:1068)
        at org.hibernate.impl.QueryImpl.iterate(QueryImpl.java:41)
        at src.EventManager.listEvents(EventManager.java:55)
        at src.EventManager.main(EventManager.java:21)
Exception in thread "main" 



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3899819#3899819

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3899819


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to