]
Sanne Grinovero updated HSEARCH-863:
------------------------------------
Fix Version/s: 4.1
Use JBoss Logging to create i18n exceptions
-------------------------------------------
Key: HSEARCH-863
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-863
Project: Hibernate Search
Issue Type: Improvement
Components: analyzer, directory provider, engine, infinispan, integration,
mapping, massindexer, optimizer, query, serialization
Reporter: Emmanuel Bernard
Fix For: 4.1
This is not top priority but new code should follow this and encountered code should be
migrated.
If someone is willing to take the codebase over and convert the better
{code}
@MessageLogger(projectCode = "HSEARCH")
public interface Log extends BasicLogger {
@Message( value="Unable to start serialization layer", id=82 )
SearchException unableToStartSerializationLayer(@Cause Throwable e);
}
{code}
And in the code throwing the exception
{code}
throw log.unableToStartSerializationLayer( e );
{code}
will result in
{code}
org.hibernate.search.SearchException: HSEARCH000082: Unable to start serialization layer
at
org.hibernate.search.util.logging.impl.Log_$logger.unableToStartSerializationLayer(Log_$logger.java:771)
at
org.hibernate.search.backend.BackendFactory.createSerializer(BackendFactory.java:134)
at
org.hibernate.search.indexes.impl.DirectoryBasedIndexManager.initialize(DirectoryBasedIndexManager.java:95)
at
org.hibernate.search.indexes.impl.IndexManagerHolder.createDirectoryManager(IndexManagerHolder.java:172)
at
org.hibernate.search.indexes.impl.IndexManagerHolder.buildEntityIndexBinding(IndexManagerHolder.java:97)
at
org.hibernate.search.spi.SearchFactoryBuilder.initDocumentBuilders(SearchFactoryBuilder.java:405)
at
org.hibernate.search.spi.SearchFactoryBuilder.buildNewSearchFactory(SearchFactoryBuilder.java:257)
at
org.hibernate.search.spi.SearchFactoryBuilder.buildSearchFactory(SearchFactoryBuilder.java:146)
at
org.hibernate.search.event.impl.FullTextIndexEventListener.initialize(FullTextIndexEventListener.java:126)
at
org.hibernate.search.hcore.impl.HibernateSearchIntegrator.integrate(HibernateSearchIntegrator.java:82)
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:294)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1720)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1756)
at org.hibernate.search.test.SearchTestCase.buildConfiguration(SearchTestCase.java:252)
at org.hibernate.search.test.SearchTestCase.setUp(SearchTestCase.java:117)
at org.hibernate.search.test.SearchTestCase.runBare(SearchTestCase.java:429)
at com.intellij.junit3.JUnit3IdeaTestRunner.doRun(JUnit3IdeaTestRunner.java:139)
at
com.intellij.junit3.JUnit3IdeaTestRunner.startRunnerWithArgs(JUnit3IdeaTestRunner.java:52)
at
com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:199)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:62)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: java.lang.IllegalStateException: Wazzzzaaaaaaa
at
org.hibernate.search.backend.BackendFactory.createSerializer(BackendFactory.java:124)
... 31 more
{code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: