Fixed
Details
Assignee
Sanne GrinoveroSanne GrinoveroReporter
Marco PirruccioMarco PirruccioComponents
Fix versions
Affects versions
Priority
Blocker
Details
Details
Assignee
Sanne Grinovero
Sanne GrinoveroReporter
Marco Pirruccio
Marco PirruccioComponents
Fix versions
Affects versions
Priority
Created April 6, 2010 at 5:37 PM
Updated July 1, 2010 at 12:38 PM
Resolved April 6, 2010 at 8:32 PM
Executing the following code:
FullTextSession s = Search.getFullTextSession(session);
MassIndexer mi = s.createIndexer();
mi.optimizeOnFinish(true);
mi.batchSizeToLoadObjects(10);
mi.startAndWait();
I obtain the following exception:
Exception in thread "Hibernate Search: identifierloader-1" java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long
at org.hibernate.search.batchindexing.IdentifierProducer.loadAllIdentifiers(IdentifierProducer.java:114)
at org.hibernate.search.batchindexing.IdentifierProducer.inTransactionWrapper(IdentifierProducer.java:103)
at org.hibernate.search.batchindexing.IdentifierProducer.run(IdentifierProducer.java:91)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
The executed query is:
select
count(this_.idfornitore) as y0_
from
fornitore this_
The method loadAllIdentifiers() does the following cast:
Long totalCount = (Long) session
.createCriteria( indexedType )
.setProjection( Projections.count( "id" ) )
.setCacheable( false )
.uniqueResult();