-->
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: Hibernate failure when inserting data in entity beans
PostPosted: Fri Dec 08, 2006 3:34 am 
Newbie

Joined: Fri Dec 08, 2006 3:21 am
Posts: 2
hai

i am running an application for lottery site. in the site i have registration which is a multi step process asking the users profile information ,user id and password hints.

after providing all information by the user and clicking the submit buttin inserts all the data into 3 beans at a time.


but sometimes the whole hibernate is failing to insert the data.
It is failing when inserting user name in the three beans which have foreign key references
i am getting the following exceptions:

2006-11-16 08:04:05,211 ERROR [net.sf.hibernate.impl.SessionImpl] Could not synchronize database state with session

net.sf.hibernate.HibernateException: SQL insert, update or delete failed (row not found)
at net.sf.hibernate.impl.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:25)
at net.sf.hibernate.persister.EntityPersister.update(EntityPersister.java:684)
at net.sf.hibernate.persister.EntityPersister.update(EntityPersister.java:642)
at net.sf.hibernate.impl.ScheduledUpdate.execute(ScheduledUpdate.java:52)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2418)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2372)
at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2240)
at com.gtech.esi.core.persistence.HibernateDAO.closeSession(Unknown Source)
at com.gtech.esi.core.player.user.ejb.dao.HibernateSecurityDAO.store(Unknown Source)
at com.gtech.esi.core.player.user.ejb.SecurityBean.ejbStore(Unknown Source)
at java.lang.reflect.Method.invoke(Native Method)
at org.jboss.ejb.plugins.BMPPersistenceManager.invokeEjbStore(BMPPersistenceManager.java:444)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeEjbStore(CachedConnectionInterceptor.java:416)
at org.jboss.ejb.EntityContainer.invokeEjbStore(EntityContainer.java:704)
at org.jboss.ejb.GlobalTxEntityMap$2.invokeEjbStore(GlobalTxEntityMap.java:117)
at org.jboss.ejb.GlobalTxEntityMap$GlobalTxSynchronization.synchronize(GlobalTxEntityMap.java:239)
at org.jboss.ejb.GlobalTxEntityMap$GlobalTxSynchronization.beforeCompletion(GlobalTxEntityMap.java:302)
at org.jboss.tm.TransactionImpl.doBeforeCompletion(TransactionImpl.java:1362)
at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:347)
at org.jboss.ejb.plugins.TxInterceptorCMT.endTransaction(TxInterceptorCMT.java:458)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:326)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:150)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:111)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:484)
at org.jboss.ejb.Container.invoke(Container.java:709)
at java.lang.reflect.Method.invoke(Native Method)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:198)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:97)
at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:115)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:101)
at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
at org.jboss.proxy.ejb.EntityInterceptor.invoke(EntityInterceptor.java:97)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
at $Proxy128.setUsername(Unknown Source)
at com.gtech.esi.core.commerce.user.UserBean.setUsername(Unknown Source)
at java.lang.reflect.Method.invoke(Native Method)
at com.gtech.commerce.Properties.copy(Properties.java:340)
at com.gtech.commerce.Entity.populateFromMap(Entity.java:174)
at com.gtech.esi.core.commerce.user.UserBean.ejbCreate(Unknown Source)
at java.lang.reflect.Method.invoke(Native Method)
at org.jboss.ejb.plugins.BMPPersistenceManager.createEntity(BMPPersistenceManager.java:189)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:270)
at org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:726)
at java.lang.reflect.Method.invoke(Native Method)
at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1066)
at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:204)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:215)
at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:88)
at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:97)
at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:61)
at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:28)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:88)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:343)
at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:130)
at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:85)
at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:121)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:478)
at org.jboss.ejb.Container.invoke(Container.java:729)
at java.lang.reflect.Method.invoke(Native Method)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:198)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:97)
at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:115)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:101)
at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:173)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
at $Proxy117.create(Unknown Source)
at com.gtech.esi.ire.core.player.user.command.WagerRegistrationCmd.performExecute(Unknown Source)
at com.gtech.esi.core.system.ejb.ESIEJBCommandServerBean.executeCommand(Unknown Source)
at java.lang.reflect.Method.invoke(Native Method)
at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683)
177884

anybody please help me


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 08, 2006 5:52 am 
Newbie

Joined: Fri Jul 15, 2005 12:42 am
Posts: 18
Please provide the mappings


Top
 Profile  
 
 Post subject: this is the daomapping.properties file
PostPosted: Fri Dec 08, 2006 6:49 am 
Newbie

Joined: Fri Dec 08, 2006 3:21 am
Posts: 2
dilipr wrote:
Please provide the mappings

com.gtech.esi.core.commerce.accounts.AccountBean = com.gtech.esi.core.commerce.accounts.dao.HibernateAccountDAO
com.gtech.esi.core.commerce.accounts.TransferBean = com.gtech.esi.core.commerce.accounts.dao.HibernateTransferDAO
com.gtech.esi.core.commerce.user.UserBean = com.gtech.esi.core.commerce.user.dao.HibernateUserDAO
com.gtech.esi.core.commerce.wallet.WalletItemBean = com.gtech.esi.core.commerce.wallet.dao.HibernateWalletItemDAO
com.gtech.esi.core.commerce.wallet.PaymentCardBean = com.gtech.esi.core.commerce.wallet.dao.HibernateWalletItemDAO
com.gtech.esi.core.commerce.wallet.TokenBean = com.gtech.esi.core.commerce.wallet.dao.HibernateWalletItemDAO
com.gtech.esi.core.commerce.wallet.BankAccountBean = com.gtech.esi.core.commerce.wallet.dao.HibernateWalletItemDAO

# ESI EJBs
com.gtech.esi.core.player.user.ejb.AddressBean = com.gtech.esi.core.player.user.ejb.dao.HibernateAddressDAO
com.gtech.esi.core.player.user.ejb.ProfileBean = com.gtech.esi.core.player.user.ejb.dao.HibernateProfileDAO
com.gtech.esi.core.admin.authuser.ejb.AuthUserBean = com.gtech.esi.core.admin.authuser.ejb.dao.HibernateAuthUserDAO
com.gtech.esi.core.player.user.ejb.InfoProfileBean = com.gtech.esi.core.player.user.ejb.dao.HibernateInfoProfileDAO
com.gtech.esi.core.player.user.ejb.WagerProfileBean = com.gtech.esi.core.player.user.ejb.dao.HibernateWagerProfileDAO
com.gtech.esi.core.player.user.ejb.SecurityBean = com.gtech.esi.core.player.user.ejb.dao.HibernateSecurityDAO


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.