[Hibernate-JIRA] Created: (HSEARCH-698) NPE when loading invalid stopwords file
by Sanne Grinovero (JIRA)
NPE when loading invalid stopwords file
---------------------------------------
Key: HSEARCH-698
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-698
Project: Hibernate Search
Issue Type: Bug
Affects Versions: 3.3.0.Final
Reporter: Sanne Grinovero
Priority: Trivial
Fix For: 3.4.0.Alpha1
It seems that when I define an Analyzer needing a resourcefile, like a file containing the stopwords, and this file doesn't exist, a NullPointerException is thrown instead of saying that the file was not found.
{code}[java] Caused by: org.hibernate.HibernateException: could not init listeners
[java] at org.hibernate.event.EventListeners.initializeListeners(EventListeners.java:205)
[java] at org.hibernate.cfg.Configuration.getInitializedEventListeners(Configuration.java:1983)
[java] at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1845)
[java] at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:902)
[java] ... 4 more
[java] Caused by: java.lang.NullPointerException
[java] at java.io.Reader.<init>(Reader.java:61)
[java] at java.io.InputStreamReader.<init>(InputStreamReader.java:80)
[java] at org.hibernate.search.util.HibernateSearchResourceLoader.getLines(HibernateSearchResourceLoader.java:63)
[java] at org.apache.solr.analysis.BaseTokenStreamFactory.getWordSet(BaseTokenStreamFactory.java:109)
[java] at org.apache.solr.analysis.StopFilterFactory.inform(StopFilterFactory.java:50)
[java] at org.hibernate.search.impl.SolrAnalyzerBuilder.injectResourceLoader(SolrAnalyzerBuilder.java:112)
[java] at org.hibernate.search.impl.SolrAnalyzerBuilder.buildAnalyzer(SolrAnalyzerBuilder.java:88)
[java] at org.hibernate.search.impl.ConfigContext.buildAnalyzer(ConfigContext.java:249)
[java] at org.hibernate.search.impl.ConfigContext.initLazyAnalyzers(ConfigContext.java:217)
[java] at org.hibernate.search.spi.SearchFactoryBuilder.initDocumentBuilders(SearchFactoryBuilder.java:405)
[java] at org.hibernate.search.spi.SearchFactoryBuilder.buildNewSearchFactory(SearchFactoryBuilder.java:262)
[java] at org.hibernate.search.spi.SearchFactoryBuilder.buildSearchFactory(SearchFactoryBuilder.java:144)
[java] at org.hibernate.search.event.FullTextIndexEventListener.initialize(FullTextIndexEventListener.java:150)
[java] at org.hibernate.event.EventListeners$1.processListener(EventListeners.java:198)
[java] at org.hibernate.event.EventListeners.processListeners(EventListeners.java:181)
[java] at org.hibernate.event.EventListeners.initializeListeners(EventListeners.java:194)
[java] ... 7 more
{code}
--
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
13 years, 9 months