We're updating the issue view to help you get more done. 

Use JBoss Logging to create i18n exceptions

Description

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

1 2 3 4 5 @MessageLogger(projectCode = "HSEARCH") public interface Log extends BasicLogger { @Message( value="Unable to start serialization layer", id=82 ) SearchException unableToStartSerializationLayer(@Cause Throwable e); }

And in the code throwing the exception

1 throw log.unableToStartSerializationLayer( e );

will result in

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 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

Environment

None

Status

Assignee

Fabio Massimo Ercoli

Reporter

Emmanuel Bernard

Labels

None

Suitable for new contributors

Yes, likely

Pull Request

None

Feedback Requested

None

Fix versions

Priority

Major