-->
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: Could not find a getter for branchTypes in class Branches
PostPosted: Wed Aug 10, 2005 4:13 am 
Newbie

Joined: Tue Jul 12, 2005 9:50 pm
Posts: 7
Hi,
Everytime i openSession in my application it is throwing the below exception, everything is defined in well in .hbm.xml and .java.

The exception is:

org.hibernate.PropertyNotFoundException: Could not find a getter for branchTypes in class com.dairyqueen.dto.Branches
at org.hibernate.property.BasicPropertyAccessor.createGetter(BasicPropertyAccessor.java:281)
at org.hibernate.property.BasicPropertyAccessor.getGetter(BasicPropertyAccessor.java:274)
at org.hibernate.mapping.Property.getGetter(Property.java:241)
at org.hibernate.tuple.PojoTuplizer.buildPropertyGetter(PojoTuplizer.java:253)
at org.hibernate.tuple.AbstractTuplizer.<init>(AbstractTuplizer.java:78)
at org.hibernate.tuple.PojoTuplizer.<init>(PojoTuplizer.java:54)
at org.hibernate.tuple.TuplizerLookup.create(TuplizerLookup.java:47)
at org.hibernate.tuple.EntityMetamodel.<init>(EntityMetamodel.java:245)
at org.hibernate.persister.entity.BasicEntityPersister.<init>(BasicEntityPersister.java:402)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:108)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:213)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:981)
at org.hibernate.jmx.HibernateService.buildSessionFactory(HibernateService.java:64)
at org.hibernate.jmx.SessionFactoryStub.getImpl(SessionFactoryStub.java:80)
at org.hibernate.jmx.SessionFactoryStub.openSession(SessionFactoryStub.java:68)
at com.dairyqueen.utils.HibernateHelper.getNewSession(HibernateHelper.java:59)
at com.dairyqueen.utils.DBAction.createSession(DBAction.java:26)
at com.dairyqueen.utils.DBAction.<init>(DBAction.java:20)
at com.dairyqueen.framework.DairyQueenGatewayBean.login(DairyQueenGatewayBean.java:66)
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.jboss.invocation.Invocation.performCall(Invocation.java:345)
at org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor.invoke(StatefulSessionContainer.java:584)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:139)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:297)
at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
at org.jboss.ejb.Container.invoke(Container.java:873)
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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:805)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:406)
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 sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:595)


The mapping file:


<many-to-one name="branchTypes" class="com.dairyqueen.dto.BranchTypes">
<column name="BRANCH_TYPE" not-null="true" />
</many-to-one>


public BranchTypes getBranchTypes() {
return this.branchTypes;
}

public void setBranchTypes(BranchTypes branchTypes) {
this.branchTypes = branchTypes;
}


Please help me how to overcome this exception


Top
 Profile  
 
 Post subject: Re: Could not find a getter for branchTypes in class Branche
PostPosted: Wed Aug 10, 2005 9:19 am 
Expert
Expert

Joined: Mon Feb 14, 2005 12:32 pm
Posts: 609
Location: Atlanta, GA - USA
kancharla_g wrote:
Hi,
Everytime i openSession in my application it is throwing the below exception, everything is defined in well in .hbm.xml and .java.

The exception is:
...

The mapping file:

<many-to-one name="branchTypes" class="com.dairyqueen.dto.BranchTypes">
<column name="BRANCH_TYPE" not-null="true" />
</many-to-one>


public BranchTypes getBranchTypes() {
return this.branchTypes;
}

public void setBranchTypes(BranchTypes branchTypes) {
this.branchTypes = branchTypes;
}


Please help me how to overcome this exception


The mapping file getter/setter methods look correct. Are you certain that the BranchTypes class in your java code is from the com.dairyqueen.dto package ?

_________________
Preston

Please don't forget to give credit if/when you get helpful information.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 11, 2005 5:18 am 
Newbie

Joined: Tue Jul 12, 2005 9:50 pm
Posts: 7
yes all the classes are in the com.dairyqueen.dto package only.


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.