-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Mapping errors
PostPosted: Mon May 29, 2006 6:25 am 
Newbie

Joined: Mon May 29, 2006 6:07 am
Posts: 12
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]


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 29, 2006 7:15 am 
Regular
Regular

Joined: Thu Sep 22, 2005 1:53 pm
Posts: 88
Location: Rio de Janeiro
Can you please post a bigger part of teh stack trace....

_________________
Don´t forget to rate!


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 29, 2006 7:40 am 
Newbie

Joined: Mon May 29, 2006 6:07 am
Posts: 12
Thanks a lot, but now we know the problem, it was the DTD version, we need the 3.0 version.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.