[
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-575?pag...
]
Emmanuel Bernard commented on HSEARCH-575:
------------------------------------------
We can simply wrap all calls to objectToString, get and set methods of TwoWayFieldBridge
into try / catch rethrowning an exception with meaningful informations.
More useful error message on bridge indexing failure
----------------------------------------------------
Key: HSEARCH-575
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-575
Project: Hibernate Search
Issue Type: Improvement
Components: engine
Affects Versions: 3.2.0.Final
Environment: Hibernate 3.5.3, SQL Server
Reporter: Ben Dotte
Priority: Minor
Fix For: 3.3.0.Beta2
I have run into occasional error messages during initial indexing while trying to setup
my field mappings like the one below. The problem with this error is that it doesn't
tell me which class or field is failing. With over 300 mapped fields across many classes,
I have a hard time tracking down the culprit.
Could bridge exceptions be wrapped and rethrown with information about the type and
field?
java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String
at org.hibernate.search.bridge.builtin.StringBridge.objectToString(StringBridge.java:38)
~[hibernate-search-3.2.0.Final.jar:3.2.0.Final]
at
org.hibernate.search.bridge.TwoWayString2FieldBridgeAdaptor.objectToString(TwoWayString2FieldBridgeAdaptor.java:50)
~[hibernate-search-3.2.0.Final.jar:3.2.0.Final]
at
org.hibernate.search.batchindexing.EntityConsumerLuceneworkProducer.index(EntityConsumerLuceneworkProducer.java:140)
~[hibernate-search-3.2.0.Final.jar:3.2.0.Final]
at
org.hibernate.search.batchindexing.EntityConsumerLuceneworkProducer.indexAllQueue(EntityConsumerLuceneworkProducer.java:117)
~[hibernate-search-3.2.0.Final.jar:3.2.0.Final]
at
org.hibernate.search.batchindexing.EntityConsumerLuceneworkProducer.run(EntityConsumerLuceneworkProducer.java:92)
~[hibernate-search-3.2.0.Final.jar:3.2.0.Final]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
[na:1.6.0_20]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
[na:1.6.0_20]
at java.lang.Thread.run(Thread.java:619) [na:1.6.0_20]
--
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