[hibernate-issues] [Hibernate-JIRA] Resolved: (HSEARCH-495) IdentifierProducer: ClassCastException
Sanne Grinovero (JIRA)
noreply at atlassian.com
Tue Apr 6 14:34:02 EDT 2010
[ http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-495?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sanne Grinovero resolved HSEARCH-495.
-------------------------------------
Resolution: Fixed
> 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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list