Hi,
this´s my first time using hibernate.
I use Hibernate 3.0, Tomcat and J2ee Servlets.
I get this error when I call
sessionFactory = new Configuration().configure().buildSessionFactory();
....
Initial SessionFactory creation failed.java.lang.NoClassDefFoundError: org/hibernate/cfg/Configuration
log4j:WARN No appenders could be found for logger (org.apache.catalina.session.ManagerBase).
log4j:WARN Please initialize the log4j system properly.
...
I have this libraries in my WE-INF/lib directory
commons-logging.jar
commons-collections.jar
cglib.jar
dom4j.jar
ehcache.jar
log4j.jar
hibernate3.jar
jta.jar
cglib.jar
c3po.jar
asm.jar
asm-attsr.jar
I´m using pool conections with Mysql
I send you my configuration:
//--------------------------------------------
server.xml:
//-------------------------------------------
<Context path="/apoyoTecnico2" docBase="d:\desarrollo\ApoyoTecnicoJ2EE2" debug="0" reloadable="true" crossContext="true">
<Resource name="jdbc/TestDB" auth="Container" scope="Shareable" type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000"
username="javauser" password="javadude" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/request?autoReconnect=true"/>
</Context>
//------------------------------------------------
hibernate.cfg.xml
//------------------------------------------------
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<!-- Settings for MySQL -->
<property name="dialect"> net.sf.hibernate.dialect.MySQLDialect</property>
<property name = "connection.datasource">java:comp/env/jdbc/TestDB</property>
<property name = "show_sql">false</property>
<!-- Hibernate XML mapping files -->
<mapping resource="Cat.hbm.xml"/>
</session-factory>
</hibernate-configuration>
Please, could you help me??
Best Regards
_________________ Miguel Lacosta
|