Error when trying to use hibernate annotations.
Posted
by Wilhelm
on Stack Overflow
See other posts from Stack Overflow
or by Wilhelm
Published on 2010-03-03T12:49:35Z
Indexed on
2010/05/02
17:08 UTC
Read the original article
Hit count: 322
The error I'm receiving is listed here.
That's my HibernateUtil.java
package com.rosejapan;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.AnnotationConfiguration;;
public class HibernateUtil
{
private static final SessionFactory sessionFactory;
static
{
try
{
// Create the SessionFactory from hibernate.cfg.xml
sessionFactory = new AnnotationConfiguration().configure().buildSessionFactory();
} catch(Throwable e)
{
System.err.println("Initial sessionFactory creation failed. " + e);
throw new ExceptionInInitializerError(e);
}
}
public static SessionFactory getSessionFactory()
{
return sessionFactory;
}
}
Everything looks all right... I've already included log4j-boot.jar in the CLASSPATH, but didn't resolved my problem.
© Stack Overflow or respective owner