-->
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: Urgent, please help: java.lang.NoSuchMethodError
PostPosted: Sun Jan 15, 2006 12:24 pm 
Newbie

Joined: Mon Dec 19, 2005 5:36 pm
Posts: 14
I got a very weired problem. The query (I attached the code with the post) works for a while(after about 2000 records), then I get an java.lang.NoSuchMethodError: com.brightcove.reporting.records.VideoStreamedDetailRecord.getHibernateLazyInitializer()Lorg/hibernate/proxy/LazyInitializer.

The VideoStreamedDetailRecord is my persistent class. I attached the mapping code.

Does anybody have any idea about this? Please help, it is pretty urgent. Thanks


Hibernate version:3.1

Mapping documents: <class name="VideoStreamedDetailRecord" table="video_stream_detail_record">
<!--cache usage="dont use cache, would be inefficient use since we bulk read"/-->
<id name="id" type="long" column="id" unsaved-value="0">
@@hibernateIDGenerator@@
</id>
<property name="dateRecorded" column="date_recorded" type="timestamp" not-null="true"/>
<property name="publisherId" column="publisher_id" type="long" not-null="false"/>
<property name="affiliateId" column="affiliate_id" type="long" not-null="false"/>
<property name="videoId" column="video_id" type="long" not-null="true"/>
<property name="videoTitle" column="video_title" type="string" not-null="false" length="128"/>
<property name="lineUpId" column="lineup_id" type="long" not-null="false"/>
<property name="lineUpTitle" column="lineup_title" type="string" not-null="false" length="128"/>
<property name="playerId" column="player_id" type="long" not-null="true"/>
<property name="playerName" column="player_name" type="string" not-null="false" length="128"/>
<property name="playerTag" column="player_tag" type="string" not-null="false"/>
<property name="progressiveDownload" column="is_progressive" type="boolean" not-null="true"/>
<property name="secondsStreamed" column="seconds_streamed" type="int" not-null="true"/>
<property name="state" column="state" type="byte"/>
<property name="economicModel">
<type name="com.brightcove.utils.EnumUserType">
<param name="enumClassName">com.brightcove.payments.EconomicModelType</param>
</type>
</property>
</class>


Code between sessionFactory.openSession() and session.close():
public <T extends StatefulRecord> Iterator<T> dataToProcessByConsumerAccount(
Class<T> pClazz, Long pConsumerId, int pBatchSize){
Session sess = ThreadLocalSession.getCurrentSession() ;

// We do not put the class name directly in the query string because it is
// eaiser for eclipse to do refactoring.
String DATAITEM_TOBEPROCESSED_BY_PUBID = "FROM "
+ pClazz.getName() + " AS r "
+ " WHERE r.state = :dataSate "
+ " AND r.consumerId = :pubId "
+ " ORDER BY r.dateRecorded ASC";

Query q = sess.createQuery(DATAITEM_TOBEPROCESSED_BY_PUBID) ;
q.setParameter("dataSate", RecordStateEnum.OPEN) ;
q.setParameter("pubId", pConsumerId) ;
if( pBatchSize > 0 ){
q.setMaxResults( pBatchSize ) ;
}


Full stack trace of any exception that occurs:

java.lang.NoSuchMethodError: com.brightcove.reporting.records.VideoStreamedDetailRecord.getHibernateLazyInitializer()Lorg/hibernate/proxy/LazyInitializer;
at com.brightcove.reporting.records.VideoStreamedDetailRecord$$EnhancerByCGLIB$$d869ed93.getHibernateLazyInitializer(<generated>)
at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:274)
at org.hibernate.type.EntityType.resolve(EntityType.java:303)
at org.hibernate.type.EntityType.nullSafeGet(EntityType.java:217)
at org.hibernate.impl.IteratorImpl.postNext(IteratorImpl.java:93)
at org.hibernate.impl.IteratorImpl.next(IteratorImpl.java:120)
at com.brightcove.payments.PaymentSchedulerFacade.processRecordForCorporateAccount(PaymentSchedulerFacade.java:404)
at com.brightcove.payments.PaymentSchedulerFacade.processVideoStreamedDetailRecords(PaymentSchedulerFacade.java:144)
at com.brightcove.payments.ProcessUsageDataJob.executeJob(ProcessUsageDataJob.java:24)
at com.brightcove.scheduler.SchedulerJob.execute(SchedulerJob.java:22)
at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)


Name and version of the database you are using: Oracle

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 15, 2006 1:25 pm 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
http://opensource2.atlassian.com/projec ... e/HHH-1293


Top
 Profile  
 
 Post subject: Thanks
PostPosted: Mon Jan 16, 2006 12:37 pm 
Newbie

Joined: Mon Dec 19, 2005 5:36 pm
Posts: 14
Thanks


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.