Hi everyone, I need to do some step-wise debugging on a custom RequestHandler. I'm trying to spin up a core in a Junit test, with the idea of running it inside of Eclipse for debugging. (If there's an easier way, I'd like to see a walk through!) Problem is the core fails to spin up with:
java.io.IOException: Break Iterator Rule Data Magic Number Incorrect, or unsupported data version Here's the code, just trying to load (cribbed and adapted from https://stackoverflow.com/questions/45506381/how-to-debug-solr-plugin): public class BrowseHandlerTest { private static CoreContainer container; private static SolrCore core; private static final Logger logger = Logger.getGlobal(); @BeforeClass public static void prepareClass() throws Exception { String solrHomeProp = "solr.solr.home"; System.out.println(solrHomeProp + "= " + System.getProperty(solrHomeProp)); // create the core container from the solr.solr.home system property container = new CoreContainer(); container.load(); core = container.getCore("biblio"); logger.info<http://logger.info>("Solr core loaded!"); } @AfterClass public static void cleanUpClass() { core.close(); container.shutdown(); logger.info<http://logger.info>("Solr core shut down!"); } } The test, run through ant, fails as follows: [junit] solr.solr.home= /Users/tod/src/vufind/solr/vufind [junit] SLF4J: Defaulting to no-operation (NOP) logger implementation [junit] SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. [junit] SLF4J: Failed to load class "org.slf4j.impl.StaticMDCBinder". [junit] SLF4J: Defaulting to no-operation MDCAdapter implementation. [junit] SLF4J: See http://www.slf4j.org/codes.html#no_static_mdc_binder for further details. [junit] Tests run: 0, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 1.299 sec [junit] [junit] ------------- Standard Error ----------------- [junit] SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". [junit] SLF4J: Defaulting to no-operation (NOP) logger implementation [junit] SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. [junit] SLF4J: Failed to load class "org.slf4j.impl.StaticMDCBinder". [junit] SLF4J: Defaulting to no-operation MDCAdapter implementation. [junit] SLF4J: See http://www.slf4j.org/codes.html#no_static_mdc_binder for further details. [junit] ------------- ---------------- --------------- [junit] Testcase: org.vufind.solr.handler.tests.BrowseHandlerTest: Caused an ERROR [junit] SolrCore 'biblio' is not available due to init failure: JVM Error creating core [biblio]: null [junit] org.apache.solr.common.SolrException: SolrCore 'biblio' is not available due to init failure: JVM Error creating core [biblio]: null [junit] at org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:1066) [junit] at org.vufind.solr.handler.tests.BrowseHandlerTest.prepareClass(BrowseHandlerTest.java:45) [junit] Caused by: org.apache.solr.common.SolrException: JVM Error creating core [biblio]: null [junit] at org.apache.solr.core.CoreContainer.create(CoreContainer.java:833) [junit] at org.apache.solr.core.CoreContainer.access$000(CoreContainer.java:87) [junit] at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:467) [junit] at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:458) [junit] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [junit] at org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor$1.run(ExecutorUtil.java:231) [junit] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [junit] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [junit] at java.lang.Thread.run(Thread.java:745) [junit] Caused by: java.lang.ExceptionInInitializerError [junit] at org.apache.lucene.analysis.icu.segmentation.ICUTokenizerFactory.inform(ICUTokenizerFactory.java:107) [junit] at org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:721) [junit] at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:160) [junit] at org.apache.solr.schema.IndexSchemaFactory.create(IndexSchemaFactory.java:56) [junit] at org.apache.solr.schema.IndexSchemaFactory.buildIndexSchema(IndexSchemaFactory.java:70) [junit] at org.apache.solr.core.ConfigSetService.createIndexSchema(ConfigSetService.java:108) [junit] at org.apache.solr.core.ConfigSetService.getConfig(ConfigSetService.java:79) [junit] at org.apache.solr.core.CoreContainer.create(CoreContainer.java:812) [junit] Caused by: java.lang.RuntimeException: java.io.IOException: Break Iterator Rule Data Magic Number Incorrect, or unsupported data version. [junit] at org.apache.lucene.analysis.icu.segmentation.DefaultICUTokenizerConfig.readBreakIterator(DefaultICUTokenizerConfig.java:125) [junit] at org.apache.lucene.analysis.icu.segmentation.DefaultICUTokenizerConfig.<clinit>(DefaultICUTokenizerConfig.java:66) [junit] Caused by: java.io.IOException: Break Iterator Rule Data Magic Number Incorrect, or unsupported data version. [junit] at com.ibm.icu.text.RBBIDataWrapper.get(RBBIDataWrapper.java:193) [junit] at com.ibm.icu.text.RuleBasedBreakIterator.getInstanceFromCompiledRules(RuleBasedBreakIterator.java:57) [junit] at org.apache.lucene.analysis.icu.segmentation.DefaultICUTokenizerConfig.readBreakIterator(DefaultICUTokenizerConfig.java:120) [junit] [junit] [junit] Testcase: org.vufind.solr.handler.tests.BrowseHandlerTest: Caused an ERROR [junit] null [junit] java.lang.NullPointerException [junit] at org.vufind.solr.handler.tests.BrowseHandlerTest.cleanUpClass(BrowseHandlerTest.java:52) [junit] [junit] [junit] Test org.vufind.solr.handler.tests.BrowseHandlerTest FAILED This is the directory structure: .../solr/vufind/ authority/ conf/ core.properties biblio/ conf/ core.properties index/ solr.xml The solr.solr.home property is set to the solr/vufind directory, and I need to load the biblio core. I don't get to dig into code very often, so my Java and IDE skills are a bit rusty. Any advice is welcome, whether how to fix or an alternate approach. Best, -Tod Tod Olson <t...@uchicago.edu<mailto:t...@uchicago.edu>> Systems Librarian Interim Director for Integrated Library Systems University of Chicago Library