gigaZhang / mmseg4j

Automatically exported from code.google.com/p/mmseg4j
Apache License 2.0
0 stars 0 forks source link

java.lang.OutOfMemoryError after reload Solr on Tomcat #4

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I use mmseg4j-1.7.2 with solr 1.3 (nightly) on Tomcat 6.0.18. When I reload
solr from Tomcat Web Application Manager I get (it works all right after
restart tomcat):

HTTP Status 500 - Severe errors in solr configuration. Check your log files
for more detailed information on what may be wrong. If you want solr to
continue after configuration errors, change:
<abortOnConfigurationError>false</abortOnConfigurationError> in solr.xml
-------------------------------------------------------------
java.lang.OutOfMemoryError: Java heap space at
java.util.HashMap.<init>(HashMap.java:209) at
com.chenlb.mmseg4j.CharNode$TreeNode.<init>(CharNode.java:230) at
com.chenlb.mmseg4j.CharNode$KeyTree.add(CharNode.java:170) at
com.chenlb.mmseg4j.CharNode.addWordTail(CharNode.java:30) at
com.chenlb.mmseg4j.Dictionary$3.row(Dictionary.java:152) at
com.chenlb.mmseg4j.Dictionary.load(Dictionary.java:202) at
com.chenlb.mmseg4j.Dictionary.loadDic(Dictionary.java:141) at
com.chenlb.mmseg4j.Dictionary.init(Dictionary.java:69) at
com.chenlb.mmseg4j.Dictionary.<init>(Dictionary.java:60) at
com.chenlb.mmseg4j.solr.MMSegTokenizerFactory.inform(MMSegTokenizerFactory.java:
80)
at
org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:426)
at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:102) at
org.apache.solr.core.CoreContainer.create(CoreContainer.java:376) at
org.apache.solr.core.CoreContainer.load(CoreContainer.java:237) at
org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:113
)
at
org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:83)
at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConf
ig.java:275)
at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterC
onfig.java:397)
at
org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.
java:108)
at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3709)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4363)
at
org.apache.catalina.core.StandardContext.reload(StandardContext.java:3099)
at
org.apache.catalina.manager.ManagerServlet.reload(ManagerServlet.java:916)
at
org.apache.catalina.manager.HTMLManagerServlet.reload(HTMLManagerServlet.java:53
6)
at
org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:114
)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
at java.lang.reflect.Method.invoke(Method.java:597) at
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
-------------------------------------------------------------
java.lang.OutOfMemoryError: Java heap space at
java.util.HashMap.<init>(HashMap.java:209) at
com.chenlb.mmseg4j.CharNode$TreeNode.<init>(CharNode.java:230) at
com.chenlb.mmseg4j.CharNode$KeyTree.add(CharNode.java:170) at
com.chenlb.mmseg4j.CharNode.addWordTail(CharNode.java:30) at
com.chenlb.mmseg4j.Dictionary$3.row(Dictionary.java:152) at
com.chenlb.mmseg4j.Dictionary.load(Dictionary.java:202) at
com.chenlb.mmseg4j.Dictionary.loadDic(Dictionary.java:141) at
com.chenlb.mmseg4j.Dictionary.init(Dictionary.java:69) at
com.chenlb.mmseg4j.Dictionary.<init>(Dictionary.java:60) at
com.chenlb.mmseg4j.solr.MMSegTokenizerFactory.inform(MMSegTokenizerFactory.java:
80)
at
org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:426)
at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:102) at
org.apache.solr.core.CoreContainer.create(CoreContainer.java:376) at
org.apache.solr.core.CoreContainer.load(CoreContainer.java:237) at
org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:113
)
at
org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:83)
at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConf
ig.java:275)
at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterC
onfig.java:397)
at
org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.
java:108)
at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3709)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4363)
at
org.apache.catalina.core.StandardContext.reload(StandardContext.java:3099)
at
org.apache.catalina.manager.ManagerServlet.reload(ManagerServlet.java:916)
at
org.apache.catalina.manager.HTMLManagerServlet.reload(HTMLManagerServlet.java:53
6)
at
org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:114
)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
at java.lang.reflect.Method.invoke(Method.java:597) at
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)

type Status report

message Severe errors in solr configuration. Check your log files for more
detailed information on what may be wrong. If you want solr to continue
after configuration errors, change:
<abortOnConfigurationError>false</abortOnConfigurationError> in solr.xml
-------------------------------------------------------------
java.lang.OutOfMemoryError: Java heap space at
java.util.HashMap.<init>(HashMap.java:209) at
com.chenlb.mmseg4j.CharNode$TreeNode.<init>(CharNode.java:230) at
com.chenlb.mmseg4j.CharNode$KeyTree.add(CharNode.java:170) at
com.chenlb.mmseg4j.CharNode.addWordTail(CharNode.java:30) at
com.chenlb.mmseg4j.Dictionary$3.row(Dictionary.java:152) at
com.chenlb.mmseg4j.Dictionary.load(Dictionary.java:202) at
com.chenlb.mmseg4j.Dictionary.loadDic(Dictionary.java:141) at
com.chenlb.mmseg4j.Dictionary.init(Dictionary.java:69) at
com.chenlb.mmseg4j.Dictionary.<init>(Dictionary.java:60) at
com.chenlb.mmseg4j.solr.MMSegTokenizerFactory.inform(MMSegTokenizerFactory.java:
80)
at
org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:426)
at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:102) at
org.apache.solr.core.CoreContainer.create(CoreContainer.java:376) at
org.apache.solr.core.CoreContainer.load(CoreContainer.java:237) at
org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:113
)
at
org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:83)
at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConf
ig.java:275)
at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterC
onfig.java:397)
at
org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.
java:108)
at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3709)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4363)
at
org.apache.catalina.core.StandardContext.reload(StandardContext.java:3099)
at
org.apache.catalina.manager.ManagerServlet.reload(ManagerServlet.java:916)
at
org.apache.catalina.manager.HTMLManagerServlet.reload(HTMLManagerServlet.java:53
6)
at
org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:114
)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
at java.lang.reflect.Method.invoke(Method.java:597) at
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
-------------------------------------------------------------
java.lang.OutOfMemoryError: Java heap space at
java.util.HashMap.<init>(HashMap.java:209) at
com.chenlb.mmseg4j.CharNode$TreeNode.<init>(CharNode.java:230) at
com.chenlb.mmseg4j.CharNode$KeyTree.add(CharNode.java:170) at
com.chenlb.mmseg4j.CharNode.addWordTail(CharNode.java:30) at
com.chenlb.mmseg4j.Dictionary$3.row(Dictionary.java:152) at
com.chenlb.mmseg4j.Dictionary.load(Dictionary.java:202) at
com.chenlb.mmseg4j.Dictionary.loadDic(Dictionary.java:141) at
com.chenlb.mmseg4j.Dictionary.init(Dictionary.java:69) at
com.chenlb.mmseg4j.Dictionary.<init>(Dictionary.java:60) at
com.chenlb.mmseg4j.solr.MMSegTokenizerFactory.inform(MMSegTokenizerFactory.java:
80)
at
org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:426)
at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:102) at
org.apache.solr.core.CoreContainer.create(CoreContainer.java:376) at
org.apache.solr.core.CoreContainer.load(CoreContainer.java:237) at
org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:113
)
at
org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:83)
at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConf
ig.java:275)
at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterC
onfig.java:397)
at
org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.
java:108)
at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3709)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4363)
at
org.apache.catalina.core.StandardContext.reload(StandardContext.java:3099)
at
org.apache.catalina.manager.ManagerServlet.reload(ManagerServlet.java:916)
at
org.apache.catalina.manager.HTMLManagerServlet.reload(HTMLManagerServlet.java:53
6)
at
org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:114
)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
at java.lang.reflect.Method.invoke(Method.java:597) at
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)

description The server encountered an internal error (Severe errors in solr
configuration. Check your log files for more detailed information on what
may be wrong. If you want solr to continue after configuration errors,
change: <abortOnConfigurationError>false</abortOnConfigurationError> in
solr.xml -------------------------------------------------------------
java.lang.OutOfMemoryError: Java heap space at
java.util.HashMap.<init>(HashMap.java:209) at
com.chenlb.mmseg4j.CharNode$TreeNode.<init>(CharNode.java:230) at
com.chenlb.mmseg4j.CharNode$KeyTree.add(CharNode.java:170) at
com.chenlb.mmseg4j.CharNode.addWordTail(CharNode.java:30) at
com.chenlb.mmseg4j.Dictionary$3.row(Dictionary.java:152) at
com.chenlb.mmseg4j.Dictionary.load(Dictionary.java:202) at
com.chenlb.mmseg4j.Dictionary.loadDic(Dictionary.java:141) at
com.chenlb.mmseg4j.Dictionary.init(Dictionary.java:69) at
com.chenlb.mmseg4j.Dictionary.<init>(Dictionary.java:60) at
com.chenlb.mmseg4j.solr.MMSegTokenizerFactory.inform(MMSegTokenizerFactory.java:
80)
at
org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:426)
at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:102) at
org.apache.solr.core.CoreContainer.create(CoreContainer.java:376) at
org.apache.solr.core.CoreContainer.load(CoreContainer.java:237) at
org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:113
)
at
org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:83)
at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConf
ig.java:275)
at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterC
onfig.java:397)
at
org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.
java:108)
at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3709)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4363)
at
org.apache.catalina.core.StandardContext.reload(StandardContext.java:3099)
at
org.apache.catalina.manager.ManagerServlet.reload(ManagerServlet.java:916)
at
org.apache.catalina.manager.HTMLManagerServlet.reload(HTMLManagerServlet.java:53
6)
at
org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:114
)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
at java.lang.reflect.Method.invoke(Method.java:597) at
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
-------------------------------------------------------------
java.lang.OutOfMemoryError: Java heap space at
java.util.HashMap.<init>(HashMap.java:209) at
com.chenlb.mmseg4j.CharNode$TreeNode.<init>(CharNode.java:230) at
com.chenlb.mmseg4j.CharNode$KeyTree.add(CharNode.java:170) at
com.chenlb.mmseg4j.CharNode.addWordTail(CharNode.java:30) at
com.chenlb.mmseg4j.Dictionary$3.row(Dictionary.java:152) at
com.chenlb.mmseg4j.Dictionary.load(Dictionary.java:202) at
com.chenlb.mmseg4j.Dictionary.loadDic(Dictionary.java:141) at
com.chenlb.mmseg4j.Dictionary.init(Dictionary.java:69) at
com.chenlb.mmseg4j.Dictionary.<init>(Dictionary.java:60) at
com.chenlb.mmseg4j.solr.MMSegTokenizerFactory.inform(MMSegTokenizerFactory.java:
80)
at
org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:426)
at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:102) at
org.apache.solr.core.CoreContainer.create(CoreContainer.java:376) at
org.apache.solr.core.CoreContainer.load(CoreContainer.java:237) at
org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:113
)
at
org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:83)
at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConf
ig.java:275)
at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterC
onfig.java:397)
at
org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.
java:108)
at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3709)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4363)
at
org.apache.catalina.core.StandardContext.reload(StandardContext.java:3099)
at
org.apache.catalina.manager.ManagerServlet.reload(ManagerServlet.java:916)
at
org.apache.catalina.manager.HTMLManagerServlet.reload(HTMLManagerServlet.java:53
6)
at
org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:114
)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
at java.lang.reflect.Method.invoke(Method.java:597) at
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244) )
that prevented it from fulfilling this request.
Apache Tomcat/6.0.18

Original issue reported on code.google.com by shenzh...@gmail.com on 1 Jul 2009 at 8:27

GoogleCodeExporter commented 8 years ago
你名字可以看出,你可能读中文的。呵呵

mmseg4j 1.7.3 
中解决了此问题。http://mmseg4j.googlecode.com/files/mmseg4j-1.7.3.zip

Dictionary 添加 finalize 方法释放资源。

多谢提出 bug

Original comment by chenlb2...@gmail.com on 8 Aug 2009 at 2:50

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
mmseg4j-4.patch

Original comment by chenlb2...@gmail.com on 8 Aug 2009 at 4:20

Attachments:

GoogleCodeExporter commented 8 years ago
Try this and add in your data-configfile

http://www.cabotsolutions.com/blog/200905/javalangoutofmemoryerror-when-indexing
-large-databases-in-solr/
http://wiki.apache.org/solr/DataImportHandlerFaq#head-346bc6622c328a146d1691bc4e
d6deb51086d9b3

Thank you,
Vijayant Kumar
Software Engineer
Website Toolbox Inc.
http://www.websitetoolbox.com
1-800-921-7803 x211

Original comment by kumar.vi...@gmail.com on 8 Jan 2010 at 2:50