-->
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.  [ 1 post ] 
Author Message
 Post subject: set into joined-subclass generates exception
PostPosted: Tue Aug 30, 2005 3:31 pm 
Newbie

Joined: Tue Aug 30, 2005 3:15 pm
Posts: 3
Hi, i'm trying to use a set into a joined-subclass, something like this:

PessoaVO.hbm.xml
<hibernate-mapping>
<class
name="gov.capes.sac.vo.PessoaVO"
table="PESS_PESSOA"
dynamic-update="false"
dynamic-insert="false"
select-before-update="false"
optimistic-lock="version">
<id
name="id"
column="IdPessoa"
type="java.lang.Long"
unsaved-value="null">
<generator class="native">
<param name="sequence">IdPessoa</param>
</generator>
</id>
...
<joined-subclass
name="gov.capes.sac.vo.PessoaJuridicaVO"
table="PESS_PESSOA_JURIDICA"
dynamic-update="false"
dynamic-insert="false">
<key
column="IdPessoaJuridica"/>
<property
name="dataUltAlteracao"
type="java.util.Date"
update="true"
insert="true"
access="property"
column="DataUltAlteracao"/>
...
<set
name="detalhePlc"
table="PESS_TITULO"
lazy="false"
inverse="true"
cascade="all"
sort="unsorted">
<key
column="IdPessoaFisica">
</key>
<one-to-many
class="gov.capes.sac.TituloVO"/>
</set>
</joined-subclass>

The class gov.capes.sac.TituloVO exists and so does its mapping, when I try to run the app on Tomcat, however, I get the exception:

#CadastroDiscente# INFO [Binder ] Mapping joined-subclass: gov.capes.sac.vo.PessoaFisicaVO -> PESS_PESSOA_FISICA 15:30:47,696 [main]
#CadastroDiscente# ERROR [Configuration] Could not compile the mapping document 15:30:47,696 [main]
net.sf.hibernate.MappingException: Associated class not found
at net.sf.hibernate.cfg.Binder.bindOneToMany(Binder.java:720)
at net.sf.hibernate.cfg.Binder.bindCollection(Binder.java:553)
at net.sf.hibernate.cfg.Binder$2.create(Binder.java:1435)
at net.sf.hibernate.cfg.Binder.propertiesFromXML(Binder.java:1029)
at net.sf.hibernate.cfg.Binder.bindJoinedSubclass(Binder.java:217)
at net.sf.hibernate.cfg.Binder.handleJoinedSubclass(Binder.java:1088)
at net.sf.hibernate.cfg.Binder.propertiesFromXML(Binder.java:1059)
at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:363)
at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1257)
at net.sf.hibernate.cfg.Configuration.add(Configuration.java:252)
at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:288)
at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:336)
at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:1018)
at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:974)
at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:902)
at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:888)
at com.powerlogic.jcompany.controle.PlcServletContextListener.inicializarFabrica(PlcServletContextListener.java:437)
at com.powerlogic.jcompany.controle.PlcServletContextListener.registrarServicoPersistencia(PlcServletContextListener.java:386)
at com.powerlogic.jcompany.controle.PlcServletContextListener.contextInitialized(PlcServletContextListener.java:110)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3669)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4104)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:589)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:536)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:471)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1102)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
Caused by: java.lang.ClassNotFoundException: gov.capes.sac.TituloVO
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1332)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1181)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at net.sf.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:102)
at net.sf.hibernate.cfg.Binder.bindOneToMany(Binder.java:715)
... 42 more
#CadastroDiscente# ERROR [PlcServletContextListener] Erro ao tentar mapear classes: net.sf.hibernate.MappingException: Error reading resource: gov/capes/sac/vo/PessoaVO.hbm.xml 15:30:47,711 [main]
net.sf.hibernate.MappingException: Error reading resource: gov/capes/sac/vo/PessoaVO.hbm.xml
at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:339)
at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:1018)
at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:974)
at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:902)
at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:888)
at com.powerlogic.jcompany.controle.PlcServletContextListener.inicializarFabrica(PlcServletContextListener.java:437)
at com.powerlogic.jcompany.controle.PlcServletContextListener.registrarServicoPersistencia(PlcServletContextListener.java:386)
at com.powerlogic.jcompany.controle.PlcServletContextListener.contextInitialized(PlcServletContextListener.java:110)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3669)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4104)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:589)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:536)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:471)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1102)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
Caused by: net.sf.hibernate.MappingException: Associated class not found
at net.sf.hibernate.cfg.Binder.bindOneToMany(Binder.java:720)
at net.sf.hibernate.cfg.Binder.bindCollection(Binder.java:553)
at net.sf.hibernate.cfg.Binder$2.create(Binder.java:1435)
at net.sf.hibernate.cfg.Binder.propertiesFromXML(Binder.java:1029)
at net.sf.hibernate.cfg.Binder.bindJoinedSubclass(Binder.java:217)
at net.sf.hibernate.cfg.Binder.handleJoinedSubclass(Binder.java:1088)
at net.sf.hibernate.cfg.Binder.propertiesFromXML(Binder.java:1059)
at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:363)
at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1257)
at net.sf.hibernate.cfg.Configuration.add(Configuration.java:252)
at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:288)
at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:336)
... 31 more
Caused by: java.lang.ClassNotFoundException: gov.capes.sac.TituloVO
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1332)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1181)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at net.sf.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:102)
at net.sf.hibernate.cfg.Binder.bindOneToMany(Binder.java:715)
... 42 more

Can anyone help?

Thanks


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

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.