java.lang.ExceptionInInitializerError occurs when the following line executes:
sessionFactory = new Configuration().configure().buildSessionFactory();
I have the hibernate.cfg.xml file in the correct location. And I am certain the fields are mapped correctly.
Here is the mapping (only 1 field for now!!)
Code:
+--------+---------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------+---------+------+-----+---------+----------------+
| newsid | int(11) | | PRI | NULL | auto_increment |
+--------+---------+------+-----+---------+----------------+
NewsVO.hbm.xml
------------------------------------------------------------
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping
PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
<class name="clinton.inet.news.NewsVO" table="news">
<id name="newsId" type="int">
<column name="newsid" sql-type="int"/>
<generator class="hilo"/>
</id>
</class>
</hibernate-mapping>
Can anyone spot anything wrong going on here..
Thanks in advance
James
Code: