-->
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.  [ 8 posts ] 
Author Message
 Post subject: No row with the given identifier exists
PostPosted: Thu Feb 21, 2008 6:52 pm 
Newbie

Joined: Thu Feb 21, 2008 6:40 pm
Posts: 2
Hi,

I'm using Hibernate 3 with MySQL 5.1.5. I've been slogging through some errors that I've been getting when taking an existing webapp and adding Hibernate to it. I've been able to solve most of them, but I am completely stuck on this one:

Code:
org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.me.shareware.entities.Customer#262]
   at org.hibernate.impl.SessionFactoryImpl$1.handleEntityNotFound(SessionFactoryImpl.java:377)
   at org.hibernate.proxy.AbstractLazyInitializer.checkTargetState(AbstractLazyInitializer.java:79)
   at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:68)
   at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:111)
   at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:150)
   at com.me.shareware.entities.Customer$$EnhancerByCGLIB$$2f6e5dc7.getFirstName(<generated>)
   at com.me.shareware.page.CustomerEntryPage.setCustomer(CustomerEntryPage.java:49)
   at com.me.shareware.page.CustomerEntryPage.<init>(CustomerEntryPage.java:30)
   at com.me.shareware.actions.CustomerSaveAction.execute(CustomerSaveAction.java:43)
   at com.me.shareware.Dispatcher.doGet(Dispatcher.java:122)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:192)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:306)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:333)


I've found posts where people have had similar problems, and usually the discussion centers around foreign keys. Here, the problem occurs when I merely try to get a String value from the Proxy object wrapping my Customer entity (the String value being firstName).

Below are the class and mapping for Customer. As you can see, Customer contains no foreign keys. Any thoughts on what the heck is up?

Customer.hbm.xml:
Code:
<?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>
    <class name="com.me.shareware.entities.Customer" table="customer" optimistic-lock="version">
        <id name="id" column="id" unsaved-value="null">
            <generator class="native"/>
        </id>
        <property name="firstName" column="first_name"/>
        <property name="lastName" column="last_name"/>
        <property name="phone1" />
        <property name="phone2" />
        <property name="email1" />
        <property name="email2" />
        <property name="address" />
        <property name="city" />
        <property name="state" />
        <property name="postal" />
        <property name="country" />
        <property name="company" />
        <property name="dateEntered" column="date_entered"/>
       
    </class>
</hibernate-mapping>


Customer.java:
Code:
package com.me.shareware.entities;

import java.util.*;

import com.me.shareware.util.*;

public class Customer extends Entity {

   private String firstName;
   private String lastName;
   private String company;
   private String phone1;
   private String phone2;
   private String email1;
   private String email2;
   private String address;
   private String city;
   private String state;
   private String postal;
   private String country;
   private Date dateEntered;
   
   public Customer() {}
   
   public Customer(Integer id,
                   String firstName,
                   String lastName,
                   String company,
                   String phone1,
                   String phone2,
                   String email1,
                   String email2,
                   String address,
                   String city,
                   String state,
                   String postal,
                   String country) {
      setId(id);
      setFirstName(firstName);
      setLastName(lastName);
      setCompany(company);
      setPhone1(phone1);
      setPhone2(phone2);
      setEmail1(email1);
      setEmail2(email2);
      setAddress(address);
      setCity(city);
      setState(state);
      setPostal(postal);
      setCountry(country);
   }
   
   public Customer(String firstName,
                   String lastName,
                   String company,
                   String phone1,
                   String phone2,
                   String email1,
                   String email2,
                   String address,
                   String city,
                   String state,
                   String postal,
                   String country) {
      setFirstName(firstName);
      setLastName(lastName);
      setCompany(company);
      setPhone1(phone1);
      setPhone2(phone2);
      setEmail1(email1);
      setEmail2(email2);
      setAddress(address);
      setCity(city);
      setState(state);
      setPostal(postal);
      setCountry(country);
   }
   
   public String getType() {
      return Constants.ENTITY_CUSTOMER;
   }
   
   public void setFirstName(String firstName) {
      this.firstName = firstName;
   }
   public String getFirstName() {
      return this.firstName;
   }
   
   public void setLastName(String lastName) {
      this.lastName = lastName;
   }
   public String getLastName() {
      return this.lastName;
   }

   public String getName() {
      return this.lastName + ", " + this.firstName;
   }
   
   public void setCompany(String company) {
      this.company = company;
   }
   public String getCompany() {
      return this.company;
   }
   
   public void setPhone1(String phone1) {
      this.phone1 = phone1;
   }
   public String getPhone1() {
      return this.phone1;
   }
   
   public void setPhone2(String phone2) {
      this.phone2 = phone2;
   }
   public String getPhone2() {
      return this.phone2;
   }
   
   public void setEmail1(String email1) {
      this.email1 = email1;
   }
   public String getEmail1() {
      return this.email1;
   }
   
   public void setEmail2(String email2) {
      this.email2 = email2;
   }
   public String getEmail2() {
      return this.email2;
   }
   
   public void setAddress(String address) {   
      this.address = address;
   }
   public String getAddress() {
      return this.address;
   }
   
   public void setCity(String city) {
      this.city = city;
   }
   public String getCity() {
      return this.city;
   }
   
   public void setState(String state) {
      this.state = state;
   }
   public String getState() {   
      return this.state;
   }
   
   public void setPostal(String postal) {   
      this.postal = postal;
   }
   public String getPostal() {   
      return this.postal;
   }
   
   public void setCountry(String country) {
      this.country = country;
   }
   public String getCountry() {
      return this.country;
   }

   public void setDateEntered(Date date) {
      this.dateEntered = date;
   }
   public Date getDateEntered() {
      return this.dateEntered;
   }

   public String getDescriptiveName() {
      if (this.firstName != null && !this.firstName.equals("")) {
         if (this.lastName != null && !this.lastName.equals("")) {
            return this.firstName + " " + this.lastName;
         } else {
            return this.firstName;
         }
      } else if (this.lastName != null && !this.lastName.equals("")) {
         return this.lastName;
      } else {
         return this.company;
      }
   }


}



Below is how I retrieve the Customer:
Code:
    protected Object find(Class clazz, Integer id) {
       Object obj = null;
       Session session = HibernateUtils.getSession();
       Transaction tx = session.beginTransaction();
       
       obj = session.load(clazz, id);
       
        tx.commit();
        HibernateUtils.close(session);
       return obj;
    }


which is called by
Code:
return (Customer)find(Customer.class, id);


There is without a doubt a customer in the database where id = id.


Top
 Profile  
 
 Post subject: Re: No row with the given identifier exists
PostPosted: Thu Feb 21, 2008 7:35 pm 
Expert
Expert

Joined: Wed Apr 11, 2007 11:39 am
Posts: 735
Location: Montreal, QC
I am surprised the object is proxied in the first place. Is there any incoming link to this class? what sql statement do you see in the log at this point? The exception means it has gone to the database and looked for customer with key 262 and it was not there but you should have known this way before this code. Are you instrumenting the code? The key here is to find why this object is proxied.


Farzad-


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 21, 2008 8:27 pm 
Newbie

Joined: Thu Feb 21, 2008 6:40 pm
Posts: 2
Okay, good, because I thought it was odd that the object was proxied as well, but I figured maybe it was just because of my misunderstanding of Hibernate.

The generated SQL is this:
Hibernate: select customer0_.id as id0_0_, customer0_.first_name as first2_0_0_,
customer0_.last_name as last3_0_0_, customer0_.phone1 as phone4_0_0_, customer0
_.phone2 as phone5_0_0_, customer0_.email1 as email6_0_0_, customer0_.email2 as
email7_0_0_, customer0_.address as address0_0_, customer0_.city as city0_0_, cus
tomer0_.state as state0_0_, customer0_.postal as postal0_0_, customer0_.country
as country0_0_, customer0_.company as company0_0_, customer0_.date_entered as da
te14_0_0_ from customer customer0_ where customer0_.id=?
Hibernate: select customer0_.id as id0_0_, customer0_.first_name as first2_0_0_,
customer0_.last_name as last3_0_0_, customer0_.phone1 as phone4_0_0_, customer0
_.phone2 as phone5_0_0_, customer0_.email1 as email6_0_0_, customer0_.email2 as
email7_0_0_, customer0_.address as address0_0_, customer0_.city as city0_0_, cus
tomer0_.state as state0_0_, customer0_.postal as postal0_0_, customer0_.country
as country0_0_, customer0_.company as company0_0_, customer0_.date_entered as da
te14_0_0_ from customer customer0_ where customer0_.id=?

And I of course tried it out in the MySQL monitor with the ID in question.

FYI, below is the table as reported by MySQL. It's worth pointing out that this table wasn't created by Hibernate; it already existed (it was created by me, not some other persistence API).

Code:
+--------------+-------------+------+-----+---------+----------------+
| Field        | Type        | Null | Key | Default | Extra          |
+--------------+-------------+------+-----+---------+----------------+
| id           | int(11)     | NO   | PRI | NULL    | auto_increment |
| first_name   | varchar(32) | YES  |     | NULL    |                |
| last_name    | varchar(32) | YES  |     | NULL    |                |
| phone1       | varchar(32) | YES  |     | NULL    |                |
| phone2       | varchar(32) | YES  |     | NULL    |                |
| email1       | varchar(72) | YES  |     | NULL    |                |
| email2       | varchar(72) | YES  |     | NULL    |                |
| address      | varchar(72) | YES  |     | NULL    |                |
| city         | varchar(36) | YES  |     | NULL    |                |
| state        | varchar(32) | YES  |     | NULL    |                |
| postal       | varchar(12) | YES  |     | NULL    |                |
| country      | varchar(32) | YES  |     | NULL    |                |
| date_entered | date        | YES  |     | NULL    |                |
| company      | varchar(72) | YES  |     | NULL    |                |
+--------------+-------------+------+-----+---------+----------------+


There is another class, Purchase, that contains a reference to Customer (mapping shown below). However, in the case shown here, that is not how the Customer is being obtained. Instead, it's simply a lookup based on the ID (i.e. the user clicks on a link like this: http://localhost:8081/Dispatcher?id=262 ... dateAction representing one of a list of Customers retrieved--by Hibernate, BTW--in a previous request).

Purchase.hbm.xml
Code:
<?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>
    <class name="com.me.shareware.entities.Purchase" table="purchase" optimistic-lock="version">
        <id name="id" column="id" unsaved-value="null">
            <generator class="native"/>
        </id>
        <many-to-one name="customerId"  column="customer_id" class="com.me.shareware.entities.Customer" not-null="true"/>
        <many-to-one name="productId"  column="product_id" class="com.me.shareware.entities.Product" not-null="true"/>
        <many-to-one name="retailerId"  column="retailer_id" class="com.me.shareware.entities.Retailer" not-null="true"/>
        <property name="productVersion"  column="product_version"/>
        <property name="datePurchased"  column="date_purchased"/>
        <property name="price" />
        <property name="notes" />
        <property name="quantity" />
        <property name="codeSent"  column="code_sent"/>
        <property name="transactionCode"  column="transaction_code"/>
       
    </class>
</hibernate-mapping>


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 22, 2008 1:43 pm 
Expert
Expert

Joined: Wed Apr 11, 2007 11:39 am
Posts: 735
Location: Montreal, QC
This is getting even more weird. I have a feeling there is something happening that we don't see, such a session object being shared between two threads and so. One test you can is to tall session.clear() before loading the customer and see how that changes the situation. Let me know.


Farzad-


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 08, 2008 8:46 pm 
Newbie

Joined: Sun Jun 08, 2008 8:41 pm
Posts: 1
Did anyone find any solution to this problem? Thnx


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 09, 2008 9:28 am 
Expert
Expert

Joined: Tue May 13, 2008 3:42 pm
Posts: 919
Location: Toronto & Ajax Ontario www.hibernatemadeeasy.com
I actually talk about this particular exception in my tutorial on the differences between the Hibernate Session's load and get methods.

org.hibernate.ObjectNotFoundException:
No row with the given identifier exists: [User#123]


http://www.hiberbook.com/HiberBookWeb/learn.jsp?tutorial=27hibernateloadvshibernateget

What is most likely happening is that you are using the load method to read a record from the database. The record, based on that primary key, does not exist in the database. However, your load method seems to be working, and you can step over the call to load successfully, because Hibernate is not actually hitting the database at that point. Hibernate load does not hit the database when it is called, unlike the Hibernate Session's get method.

So, as you step through the code, it looks like a row is getting loaded.

However, it is not until you try to access a property of that JavaBean in your code that Hiberante actually hits the database. At this point, it actually goes to the database and does a lookup. Since the record with this id does not exist at this point, it throws the ObjectNotFoundException, no row with the given identified exists.

This isn't always the reason why this method exception gets thrown, but it is one of the biggest reasons. Look at your code and see if any of this feedback makes sense.



-Cameron McKenziehttp://www.thebookonhibernate.com/HiberBookWeb/learn.jsp?tutorial=27hibernateloadvshibernateget

_________________
Cameron McKenzie - Author of "Hibernate Made Easy" and "What is WebSphere?"
http://www.TheBookOnHibernate.com Check out my 'easy to follow' Hibernate & JPA Tutorials


Top
 Profile  
 
 Post subject: exception is org.hibernate.ObjectNotFoundException:
PostPosted: Fri Oct 31, 2008 6:14 am 
Newbie

Joined: Wed Oct 22, 2008 3:58 am
Posts: 4
Location: banaglore
Please wait while the product cache is pre-loaded.
org.springframework.orm.hibernate3.HibernateObjectRetrievalFailureException: No row with the given identifier exists: [com.elasticpath.domain.catalog.ProductSku#30965796]; nested exception is org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.elasticpath.domain.catalog.ProductSku#30965796]
Caused by: org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.elasticpath.domain.catalog.ProductSku#30965796]
at org.hibernate.ObjectNotFoundException.throwIfNull(ObjectNotFoundException.java:27)
at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:65)
at org.hibernate.Hibernate.initialize(Hibernate.java:292)
at org.springframework.orm.hibernate3.HibernateTemplate.initialize(HibernateTemplate.java:580)
at com.elasticpath.persistence.impl.HibernatePersistenceEngineImpl.initialize(HibernatePersistenceEngineImpl.java:380)
at sun.reflect.GeneratedMethodAccessor77.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
at $Proxy1.initialize(Unknown Source)
at com.elasticpath.service.misc.impl.LazyLoadHelperImpl.populateProductInternal(LazyLoadHelperImpl.java:68)
at com.elasticpath.service.misc.impl.LazyLoadHelperImpl.populateProduct(LazyLoadHelperImpl.java:39)
at com.elasticpath.service.misc.impl.LazyLoadHelperImpl.populateProducts(LazyLoadHelperImpl.java:103)
at com.elasticpath.service.catalog.impl.ProductServiceImpl.findByUids(ProductServiceImpl.java:367)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:203)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:162)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:209)
at $Proxy16.findByUids(Unknown Source)
at com.elasticpath.service.catalogview.impl.SingleCachingProductRetrieveStrategyImpl.retrieveUnCachedProducts(SingleCachingProductRetrieveStrategyImpl.java:262)
at com.elasticpath.service.catalogview.impl.SingleCachingProductRetrieveStrategyImpl.preloadCache(SingleCachingProductRetrieveStrategyImpl.java:253)
at com.elasticpath.service.catalogview.impl.ProductCacheLoaderImpl.loadAllProducts(ProductCacheLoaderImpl.java:27)
at com.elasticpath.sfweb.controller.impl.DealerToyotaPageControllerImpl.doProductCachePreLoad(DealerToyotaPageControllerImpl.java:103)
at com.elasticpath.sfweb.controller.impl.DealerToyotaPageControllerImpl.handleRequestInternal(DealerToyotaPageControllerImpl.java:70)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:45)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:806)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:736)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:396)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:350)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at com.elasticpath.commons.filter.impl.CachingControlFilter.doFilter(CachingControlFilter.java:163)
at com.elasticpath.sfweb.filters.EpFilterToBeanProxy.doFilter(EpFilterToBeanProxy.java:137)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at com.elasticpath.sfweb.filters.KeystoneCustomerSessionFilter.doFilter(KeystoneCustomerSessionFilter.java:69)
at com.elasticpath.sfweb.filters.EpFilterToBeanProxy.doFilter(EpFilterToBeanProxy.java:137)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:217)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:106)
at com.elasticpath.commons.filter.impl.LogoutFilter.doFilter(LogoutFilter.java:49)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:106)
at com.elasticpath.commons.filter.impl.LogoutFilter.doFilter(LogoutFilter.java:49)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.securechannel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:138)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at com.elasticpath.commons.filter.impl.EncodingFilter.handleFilter(EncodingFilter.java:137)
at com.elasticpath.commons.filter.impl.EncodingFilter.doFilter(EncodingFilter.java:80)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
at java.lang.Thread.run(Unknown Source)[quote][/quote]


Top
 Profile  
 
 Post subject: Re: exception is org.hibernate.ObjectNotFoundException:
PostPosted: Fri Oct 31, 2008 6:18 am 
Newbie

Joined: Wed Oct 22, 2008 3:58 am
Posts: 4
Location: banaglore
my application is working previously,now i changed the database,from that i am facing this problem.flow is not working,it is giving this exception
-------------------------------------------------------------

rakesh.kopperapu wrote:
Please wait while the product cache is pre-loaded.
org.springframework.orm.hibernate3.HibernateObjectRetrievalFailureException: No row with the given identifier exists: [com.elasticpath.domain.catalog.ProductSku#30965796]; nested exception is org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.elasticpath.domain.catalog.ProductSku#30965796]
Caused by: org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.elasticpath.domain.catalog.ProductSku#30965796]
at org.hibernate.ObjectNotFoundException.throwIfNull(ObjectNotFoundException.java:27)
at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:65)
at org.hibernate.Hibernate.initialize(Hibernate.java:292)
at org.springframework.orm.hibernate3.HibernateTemplate.initialize(HibernateTemplate.java:580)
at com.elasticpath.persistence.impl.HibernatePersistenceEngineImpl.initialize(HibernatePersistenceEngineImpl.java:380)
at sun.reflect.GeneratedMethodAccessor77.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
at $Proxy1.initialize(Unknown Source)
at com.elasticpath.service.misc.impl.LazyLoadHelperImpl.populateProductInternal(LazyLoadHelperImpl.java:68)
at com.elasticpath.service.misc.impl.LazyLoadHelperImpl.populateProduct(LazyLoadHelperImpl.java:39)
at com.elasticpath.service.misc.impl.LazyLoadHelperImpl.populateProducts(LazyLoadHelperImpl.java:103)
at com.elasticpath.service.catalog.impl.ProductServiceImpl.findByUids(ProductServiceImpl.java:367)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:203)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:162)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:209)
at $Proxy16.findByUids(Unknown Source)
at com.elasticpath.service.catalogview.impl.SingleCachingProductRetrieveStrategyImpl.retrieveUnCachedProducts(SingleCachingProductRetrieveStrategyImpl.java:262)
at com.elasticpath.service.catalogview.impl.SingleCachingProductRetrieveStrategyImpl.preloadCache(SingleCachingProductRetrieveStrategyImpl.java:253)
at com.elasticpath.service.catalogview.impl.ProductCacheLoaderImpl.loadAllProducts(ProductCacheLoaderImpl.java:27)
at com.elasticpath.sfweb.controller.impl.DealerToyotaPageControllerImpl.doProductCachePreLoad(DealerToyotaPageControllerImpl.java:103)
at com.elasticpath.sfweb.controller.impl.DealerToyotaPageControllerImpl.handleRequestInternal(DealerToyotaPageControllerImpl.java:70)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:45)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:806)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:736)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:396)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:350)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at com.elasticpath.commons.filter.impl.CachingControlFilter.doFilter(CachingControlFilter.java:163)
at com.elasticpath.sfweb.filters.EpFilterToBeanProxy.doFilter(EpFilterToBeanProxy.java:137)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at com.elasticpath.sfweb.filters.KeystoneCustomerSessionFilter.doFilter(KeystoneCustomerSessionFilter.java:69)
at com.elasticpath.sfweb.filters.EpFilterToBeanProxy.doFilter(EpFilterToBeanProxy.java:137)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:217)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:106)
at com.elasticpath.commons.filter.impl.LogoutFilter.doFilter(LogoutFilter.java:49)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:106)
at com.elasticpath.commons.filter.impl.LogoutFilter.doFilter(LogoutFilter.java:49)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.securechannel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:138)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at com.elasticpath.commons.filter.impl.EncodingFilter.handleFilter(EncodingFilter.java:137)
at com.elasticpath.commons.filter.impl.EncodingFilter.doFilter(EncodingFilter.java:80)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
at java.lang.Thread.run(Unknown Source)
Quote:


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