Hello everybody:
I´ve start working with hibernate only for one month and i have a problem.
I´ve got a mapping file:
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping.dtd">
<hibernate-mapping>
<class name="model.ListaUsuarios" table="usuarios">
<id name="id" type="long" column="id">
<generator class="assigned"/>
</id>
<set role="lusuarios" table="usuario" >
<key column="id"/>
<element type="string" column="nombre"/>
</set>
</class>
</hibernate-mapping>
for this class:
Code:
package model;
import java.util.Set;
public class ListaUsuarios {
private Set lusuarios;
private int id;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public Set getLusuarios() {
return lusuarios;
}
public void setLusuarios(Set lusuarios) {
this.lusuarios = lusuarios;
}
}
i think that it´s ok, but the tomcat show the next error:
Code:
Initial SessionFactory creation failed.java.lang.NullPointerException
and i don´t know why. Can anybody help me?
Thanks a lot[/code]