-->
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.  [ 4 posts ] 
Author Message
 Post subject: Error with Hibern8IDE
PostPosted: Wed Jan 28, 2004 5:53 pm 
Newbie

Joined: Wed Jan 28, 2004 5:21 pm
Posts: 18
Location: Maracaibo, VZLA
Hi... I'm new using Hibernate and its tools....
I'm try to use Hibern8IDE to learn HQL, but it show me an errors when I try to load the mapped classes (push the apply button). Firts I made the HBM file using Middlegen-Hibernate-r3, then I run the Hibern8IDE and I find my Hibernate.properties file, then I add all my hbm.xml files and finally I press the apply buttom, and the Hibern8IDE show me the following error:
INFO: building session factory
net.sf.hibernate.PropertyNotFoundException: Could not find a getter for diBeneficiario in class clinycas.hibernate.Orden
VerificacionEligibilidad.

I'm using MS SQLSERVER2000, Hibern8 IDE 0.9 and Middlegen-Hibernate-r3.

This is the Hbm.xml file of this table:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >

<hibernate-mapping>
<!--
Created by Middlegen Hibernate plugin

http://boss.bekk.no/boss/middlegen/
http://hibernate.sourceforge.net/
-->

<class
name="clinycas.hibernate.OrdenVerificacionEligibilidad"
table="OrdenVerificacionEligibilidad"
>

<id
name="idOrdenVerificacionEligibilidad"
type="int"
column="idOrdenVerificacionEligibilidad"
>
<generator class="assigned" />
</id>

<property name="idCiBeneficiario" type="java.lang.String" column="idCiBeneficiario" not-null="true" length="15" />
<property name="noBeneficiario" type="java.lang.String" column="noBeneficiario" not-null="true" length="40" />
<property name="diBeneficiario" type="java.lang.String" column="diBeneficiario" not-null="true" length="80" />
<property name="inSexoBeneficiario" type="java.lang.String" column="inSexoBeneficiario" not-null="true" length="1"/>
<property name="deParentescoTitular" type="java.lang.String" column="deParentescoTitular" not-null="true" length="15"/>
<property name="deTelefonoBeneficiario" type="java.lang.String" column="deTelefonoBeneficiario" not-null="true" length="16"/>
<property name="nuPoliza" type="java.lang.String" column="nuPoliza" not-null="true" length="25"/>
<property name="tiPoliza" type="java.lang.String" column="tiPoliza" not-null="true" length="30"/>
<property name="moCobertura" type="double" column="moCobertura" not-null="true" length="53"/>
<property name="moDisponible" type="double" column="moDisponible" not-null="true" length="53"/>
<property name="moUsado" type="double" column="moUsado" not-null="true" length="53" />
<property name="moDeducible" type="double" column="moDeducible" length="53"/>
<property name="inActiva" type="boolean" column="inActiva" not-null="true" length="1" />
<property name="deCondicionEspecial" type="java.lang.String" column="deCondicionEspecial" length="80"/>
<property name="feAdquisicionPoliza" type="java.sql.Timestamp" column="feAdquisicionPoliza" not-null="true" length="23"/>
<property name="feVencimientoPoliza" type="java.sql.Timestamp" column="feVencimientoPoliza" not-null="true" length="23"/>
<property name="inAprobada" type="boolean" column="inAprobada" length="1"/>
<property name="inTitular" type="boolean" column="inTitular" not-null="true" length="1"/>
<property name="feNacimiento" type="java.sql.Timestamp" column="feNacimiento" not-null="true" length="23" />

<!-- associations -->
<!-- bi-directional one-to-many association to InformeMedicoBeneficiario -->
<set
name="informeMedicoBeneficiarios"
lazy="true"
inverse="true"
>
<key>
<column name="idOrdenVerificacionEligibilidad" />
</key>
<one-to-many
class="clinycas.hibernate.InformeMedicoBeneficiario"
/>
</set>
<!-- bi-directional many-to-one association to CentroHospitalario -->
<many-to-one
name="centroHospitalario"
class="clinycas.hibernate.CentroHospitalario"
not-null="true"
>
<column name="idCentroHospitalario" />
</many-to-one>
<!-- bi-directional many-to-one association to EmpresaAseguradora -->
<many-to-one
name="empresaAseguradora"
class="clinycas.hibernate.EmpresaAseguradora"
not-null="true"
>
<column name="idEmpresaAseguradora" />
</many-to-one>

</class>
</hibernate-mapping>



Thanks in advance
Alejandro


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 28, 2004 7:09 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
From the mapping there is nothing unusual about that property. It would good to see the Java file (assuming there is one). Have you used hbm2java to generate the Java POJOs? or did you hand create them? In any case, there should be a bean 'String getDiBeneficiario()' method pair in the Java class.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 28, 2004 7:11 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Maybe its also a good idea to try out the JAOO tools examples which includes this plus other tools setup (using older jars) to just get something up and running then work back on your mappings and data set.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 29, 2004 10:39 am 
Newbie

Joined: Wed Jan 28, 2004 5:21 pm
Posts: 18
Location: Maracaibo, VZLA
Hi, as I said you I new using Hibernate and all this tools.... I'm using hbm2java, and I've already created the java file, but my questions is: It's necesary to create the java file with hbm2java, or other tools to create it, to Hibern8IDE work properly ? Where do I have to create or copy the java file in order to the app (HIbern8IDE) work ?

As you said in the java file there is a set and a get for this attribute

public void setNoBeneficiario(String noBeneficiario) {
this.noBeneficiario = noBeneficiario;
}

public String getDiBeneficiario() {
return this.diBeneficiario;
}


Thanks in advance
Alejandro


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.