[
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-495?pag...
]
Sanne Grinovero updated HSEARCH-495:
------------------------------------
Assignee: Sanne Grinovero
Fix Version/s: 3.2.0.CR1
IdentifierProducer: ClassCastException
--------------------------------------
Key: HSEARCH-495
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-495
Project: Hibernate Search
Issue Type: Bug
Components: engine
Affects Versions: 3.2.0.Beta1
Environment: hibernate-core-3.5.0-Beta-2.jar,
hibernate-commons-annotations-3.2.0.Beta1.jar, hibernate-search-3.2.0.Beta1.jar,
jtds-1.2.5.jar (SQL Server 2008), Java 6
Reporter: Marco Pirruccio
Assignee: Sanne Grinovero
Priority: Blocker
Fix For: 3.2.0.CR1
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();
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira