错误:Initial SessionFactory creation failed.org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]
2011-12-2 0:50:53 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet NewContactServlet threw exception
java.lang.NullPointerException我在网上查了很多,因为我的程序在改动之前是可以运行的,所以不存在少什么东西之类的,应该就是实体类中的XX属性和getXX方法对不上,这类的问题,但是我查了很久都不知道哪错了,再加上这块比较不熟……希望大家指正一下,最好能详细点,纯新手。谢谢PhoneNumber.hbp.xml<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="domain">
  <class name="PhoneNumber" table="PhoneNumber_Table">
    <id name="id_phone">
    <generator class="increment"/>
     </id>
     <property name="phoneKind" type="string"></property>
     <property name="phoneNumber" type="string"></property>
     
     <many-to-one name="contact" class ="Contact" column="ID_CONTACT"></many-to-one>
  </class>
</hibernate-mapping>PhoneNumber.javapublic class PhoneNumber {

long id_phone;
String phoneKind;
String phoneNumber;
// String phoneKind2;
// String phoneNumber2;
// String phoneKind3;
// String phoneNumber3;
Contact contact;

public PhoneNumber(){

} public PhoneNumber(String phoneKind, String phoneNumber) {
super();
this.phoneKind = phoneKind;
this.phoneNumber = phoneNumber; } public long getid_phone() {
return id_phone;
} public void setid_phone(long id_phone) {
this.id_phone = id_phone;
} public String getPhoneKind() {
return phoneKind;
} public void setPhoneKind(String phoneKind1) {
this.phoneKind = phoneKind1;
// this.phoneKind2 = phoneKind2;
// this.phoneKind3 = phoneKind3;
} public String getPhoneNumber() {
return phoneNumber;
} public void setPhoneNumber(String phoneNumber1) {
this.phoneNumber = phoneNumber1;
// this.phoneNumber2 = phoneNumber2;
// this.phoneNumber3 = phoneNumber3;
}


public Contact getContact() {
return contact;
} public void setContact(Contact contact) {
this.contact = contact;
}
Contact.hbp.xml
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="domain">
  <class name="Contact" table="Contact_Table">
    <id name="id_contact" type="long" column="ID_CONTACT" >
    <generator class="increment"/>
    </id>
    <property name="firstName" column="FirstName" ></property>
 <property name="lastName" column="LastName"  ></property>
 <property name="email" column="Email" ></property>
 <many-to-one name="address" column="ID_ADD" unique="true"></many-to-one>
 <set name="phonenumber" inverse="true" >
  <key column="ID_CONTACT"></key>
  <one-to-many class="PhoneNumber"/>
 </set>
 <set name="contactgroups" inverse="true" table="jointable">
  <key column="ID_CONTACT"></key>
  <many-to-many class="ContactGroup" column="ID_ContactGroup"></many-to-many>
 </set>
  </class>
</hibernate-mapping>
相关的问价大概就是这些……希望大家能抽时间看看,谢谢!