E ai galera ! to penando aqui com um erro…
root cause
org.hibernate.InvalidMappingException: Could not parse mapping document from resource br/unicamp/gene/persistence/vo/Atributo.hbm.xml
org.hibernate.cfg.Configuration.addResource(Configuration.java:569)
org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1587)
org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1555)
org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1534)
org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1508)
org.hibernate.cfg.Configuration.configure(Configuration.java:1428)
org.hibernate.cfg.Configuration.configure(Configuration.java:1414)
br.unicamp.gene.persistence.HibernateUtil.<clinit>(HibernateUtil.java:18)
br.unicamp.gene.persistence.DAOFactory.<init>(DAOFactory.java:17)
br.unicamp.gene.business.services.BichoServices.adiciona(BichoServices.java:15)
br.unicamp.gene.presentation.GeraCombinacaoAction.execute(GeraCombinacaoAction.java:147)
org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
pelo o que eu andei pesquisando ai o que deve estar errado é posicionamento das tags… mas ja tentei de todo gente e não fonuncia!
aqui segue meu Atributo.hbm.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="br.unicamp.gene.persistence.vo">
<class name="Atributo" table="GENE_ATRIBUTO" dynamic-insert="true">
<!-- Coluna Discriminante -->
<discriminator column="ATRIBUTO_TIPO"/>
<id name="id" column="ATRIBUTO_ID">
<generator class="native"/>
</id>
<property name="nome" column="ATRIBUTO_NOME"/>
<property name="valor" column="ATRIBUTO_VALOR"/>
<many-to-one name="bicho" column="BICHO_ID"
class="br.unicamp.gene.persistence.vo.Bicho"/>
<!-- Subclasse Agua -->
<subclass name="br.unicamp.gene.persistence.vo.atributes.Agua" discriminator-value="1"/>
<!-- Subclasse Banho -->
<subclass name="br.unicamp.gene.persistence.vo.atributes.Banho" discriminator-value="2"/>
<!-- Subclasse Calorias -->
<subclass name="br.unicamp.gene.persistence.vo.atributes.Calorias" discriminator-value="3"/>
<!-- Subclasse Endereco -->
<subclass name="br.unicamp.gene.persistence.vo.atributes.Endereco" discriminator-value="4"/>
<!-- Subclasse Felicidade -->
<subclass name="br.unicamp.gene.persistence.vo.atributes.Felicidade" discriminator-value="5"/>
<!-- Subclasse Humor -->
<subclass name="br.unicamp.gene.persistence.vo.atributes.Humor" discriminator-value="6"/>
<!-- Subclasse Idade -->
<subclass name="br.unicamp.gene.persistence.vo.atributes.Idade" discriminator-value="7"/>
<!-- Subclasse Nutrientes -->
<subclass name="br.unicamp.gene.persistence.vo.atributes.Nutrientes" discriminator-value="8"/>
<!-- Subclasse Peso -->
<subclass name="br.unicamp.gene.persistence.vo.atributes.Peso" discriminator-value="9"/>
<!-- Subclasse Saude -->
<subclass name="br.unicamp.gene.persistence.vo.atributes.Saude" discriminator-value="10"/>
</class>
</hibernate-mapping>
se alguem ai puder me dar uma luz, fica meus agradecimentos !!!
valeu !