Joined: Tue Jan 11, 2005 6:02 pm Posts: 13 Location: Seattle
|
|
I am having an issue where I execute a single thread that
performs the exact same sequence of inputs every time. after several hundred successful runs, i get the exception below where
getHibernateLazyInitializer() can't be found:
i am using ehcache 1.2 on some entities for some very small amounts of reference data.
but the same problem is happenning with or without caching the entity.
Hibernate version: 3.1.3
Mapping documents:
hibernate-mapping package="com.real.ecs.product.domain">
<typedef name="productStatus" class="com.real.ecs.common.hibernate.usertype.EnumUserType">
<param name="enumClassName">com.real.ecs.product.domain.Product$Status</param>
</typedef>
<typedef name="productFulfillmentType" class="com.real.ecs.common.hibernate.usertype.EnumUserType">
<param name="enumClassName">com.real.ecs.product.domain.Product$FulfillmentType</param>
</typedef>
<typedef name="productLocaleType" class="com.real.ecs.common.hibernate.usertype.EnumUserType">
<param name="enumClassName">com.real.ecs.product.domain.Territory$LocaleType</param>
</typedef>
<class name="Product" table="/*ecs*//*cache*/ecomm.product" mutable="false">
<cache usage="read-only"/>
<!-- Primary key. -->
<id name="id" column="id">
<generator class="assigned"/>
</id>
<!-- Properties -->
<property name="marketName" column="market_name"/>
<property name="description" column="description"/>
<property name="maxQuantity" column="max_quantity"/>
<property name="itemNumber" column="item_number"/>
<property name="status" column="status" type="productStatus"/>
<property name="fulfillmentType" column="fulfillment_type" type="productFulfillmentType"/>
<property name="localeType" column="locale_type" type="productLocaleType"/>
<property name="price" column="price"/>
<property name="weightOunces" column="weight_ounces"/>
<many-to-one name="taxCode" class="com.real.ecs.tax.domain.TaxCode" column="tax_code" insert="false" update="false"/>
<many-to-one name="service" class="Service" column="service_id" insert="false" update="false"/>
<set name="productPlatforms" table="/*ecs*/product_product_platform" inverse="true">
<key column="prd_id"/>
<many-to-many class="ProductPlatform" column="prdplt_id"/>
</set>
</class>
</hibernate-mapping>
Code between sessionFactory.openSession() and session.close(): (using spring declarative TX)
Full stack trace of any exception that occurs:
[junit] 12:18:52.518 [com.real.test.ecs.order.TestOrderLoad1151003923643-0] INFO com.real.test.ecs.order.TestOrderLoad - 100 transactions processed
[junit] 12:18:55.636 [com.real.test.ecs.order.TestOrderLoad1151003923643-3] INFO com.real.test.ecs.order.TestOrderLoad - 200 transactions processed
[junit] 12:18:59.142 [com.real.test.ecs.order.TestOrderLoad1151003923643-4] INFO com.real.test.ecs.order.TestOrderLoad - 300 transactions processed
[junit] 12:19:04.435 [com.real.test.ecs.order.TestOrderLoad1151003923643-1] INFO com.real.test.ecs.order.TestOrderLoad - 400 transactions processed
[junit] 12:19:07.746 [com.real.test.ecs.order.TestOrderLoad1151003923643-4] INFO com.real.test.ecs.order.TestOrderLoad - 500 transactions processed
[junit] 12:19:11.116 [com.real.test.ecs.order.TestOrderLoad1151003923643-1] INFO com.real.test.ecs.order.TestOrderLoad - 600 transactions processed
[junit] Exception in thread "com.real.test.ecs.order.TestOrderLoad1151003923643-0" java.lang.NoSuchMethodError: com.real.ecs.product.domain.Product.getHibernateLazyInitializer()Lorg/hibernate/proxy/LazyInitializer;
[junit] at com.real.ecs.product.domain.Product$$EnhancerByCGLIB$$97833a44.getHibernateLazyInitializer(<generated>)
[junit] at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:274)
[junit] at org.hibernate.type.ManyToOneType.assemble(ManyToOneType.java:177)
[junit] at org.hibernate.type.TypeFactory.assemble(TypeFactory.java:398)
[junit] at org.hibernate.cache.entry.CacheEntry.assemble(CacheEntry.java:96)
[junit] at org.hibernate.cache.entry.CacheEntry.assemble(CacheEntry.java:82)
[junit] at org.hibernate.event.def.DefaultLoadEventListener.assembleCacheEntry(DefaultLoadEventListener.java:520)
[junit] at org.hibernate.event.def.DefaultLoadEventListener.loadFromSecondLevelCache(DefaultLoadEventListener.java:474)
[junit] at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:328)
[junit] at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:123)
[junit] at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:177)
[junit] at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:87)
[junit] at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:862)
[junit] at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:830)
[junit] at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:266)
[junit] at org.hibernate.type.ManyToOneType.assemble(ManyToOneType.java:177)
[junit] at org.hibernate.cache.StandardQueryCache.get(StandardQueryCache.java:121)
[junit] at org.hibernate.loader.Loader.getResultFromQueryCache(Loader.java:2086)
[junit] at org.hibernate.loader.Loader.listUsingQueryCache(Loader.java:2051)
[junit] at org.hibernate.loader.Loader.list(Loader.java:2021)
[junit] at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375)
[junit] at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:308)
[junit] at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:153)
[junit] at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1106)
[junit] at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
[junit] at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:749)
[junit] at com.real.ecs.product.dao.ProductDao.getServiceTerm(ProductDao.java:160)
[junit] at com.real.ecs.product.service.ProductQueryService.getServiceTerm(ProductQueryService.java:70)
[junit] at sun.reflect.GeneratedMethodAccessor401.invoke(Unknown Source)
[junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[junit] at java.lang.reflect.Method.invoke(Method.java:585)
[junit] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:287)
[junit] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
[junit] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
[junit] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
[junit] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
[junit] at com.real.ecs.common.spring.stats.MethodStatisticsInterceptor.invoke(MethodStatisticsInterceptor.java:35)
[junit] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
[junit] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
[junit] at $Proxy3.getServiceTerm(Unknown Source)
[junit] at com.real.ecs.order.service.CalculateOrderService.initializeServiceTerm(CalculateOrderService.java:452)
[junit] at com.real.ecs.order.service.CalculateOrderService.initPurchaseOrder(CalculateOrderService.java:408)
[junit] at com.real.ecs.order.service.CalculateOrderService.calculateOrder(CalculateOrderService.java:75)
[junit] at sun.reflect.GeneratedMethodAccessor387.invoke(Unknown Source)
[junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[junit] at java.lang.reflect.Method.invoke(Method.java:585)
[junit] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:287)
[junit] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
[junit] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
[junit] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
[junit] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
[junit] at com.real.ecs.common.spring.stats.MethodStatisticsInterceptor.invoke(MethodStatisticsInterceptor.java:35)
[junit] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
[junit] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
[junit] at $Proxy6.calculateOrder(Unknown Source)
[junit] at com.real.ecs.order.service.CreateOrderService.createOrder(CreateOrderService.java:48)
[junit] at sun.reflect.GeneratedMethodAccessor386.invoke(Unknown Source)
[junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[junit] at java.lang.reflect.Method.invoke(Method.java:585)
[junit] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:287)
[junit] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
[junit] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
[junit] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
[junit] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
[junit] at com.real.ecs.common.spring.stats.MethodStatisticsInterceptor.invoke(MethodStatisticsInterceptor.java:35)
[junit] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
[junit] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
[junit] at $Proxy7.createOrder(Unknown Source)
[junit] at com.real.test.ecs.order.TestOrderLoad$TestThread.run(TestOrderLoad.java:94)
Name and version of the database you are using:10g
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
i can't get it to happen in full debug mode. maybe cause it's so slow that
i never get to the point where theproblem occurs.
|
|