SourceForge.net Logo
Main Overview Wiki Issues Forum Build Fisheye
Issue Details (XML | Word | Printable)

Key: CMP-902
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Shay Banon
Reporter: Major Endre
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Compass

jdbc connection of Index blob gets closed and the situation is not handled

Created: 05/Oct/09 01:49 PM   Updated: 05/Oct/09 01:49 PM
Component/s: None
Affects Version/s: 2.1.4
Fix Version/s: None

File Attachments: 1. Java Source File FetchPerTransactionJdbcIndexInput.java (12 kB)

Environment: Windows XP, JBoss 4.2.3 GA, Oracle jdbc, Oracle 10.2.0.1 server


 Description  « Hide
We store the index in the database.
After the system has been idle for an hour or so I get an exception complaining about a closed connection in org.apache.lucene.store.jdbc.index.FetchPerTransactionJdbcIndexInput class.
I added some error handling to remove the faulty blob from memory, see the attached file.
I also added some Oracle specific code to prevent the situation.

The exception I got:

org.apache.lucene.store.jdbc.JdbcStoreException: Failed to read transactional blob [_i.tis]; nested exception is java.sql.SQLException: Connection closed
org.compass.core.lucene.engine.transaction.AbstractTransaction.findByQuery(AbstractTransaction.java:243)
org.compass.core.lucene.engine.transaction.readcommitted.ReadCommittedTransaction.doFind(ReadCommittedTransaction.java:215)
org.compass.core.lucene.engine.transaction.AbstractTransaction.find(AbstractTransaction.java:105)
org.compass.core.lucene.engine.LuceneSearchEngine.find(LuceneSearchEngine.java:358)
org.compass.core.lucene.engine.LuceneSearchEngineQuery.hits(LuceneSearchEngineQuery.java:200)
org.compass.core.impl.DefaultCompassQuery.hits(DefaultCompassQuery.java:170)
id.co.lhsystems.ffp.business.search.compass.service.DefaultSearchService.search(DefaultSearchService.java:48)
id.co.lhsystems.ffp.business.search.compass.action.SimpleSearchAction.execute(SimpleSearchAction.java:149)
sun.reflect.GeneratedMethodAccessor1957.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
com.opensymphony.xwork.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:364)
com.opensymphony.xwork.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:216)
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
com.opensymphony.xwork.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:168)
com.opensymphony.xwork.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
com.opensymphony.xwork.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:115)
com.opensymphony.xwork.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
id.co.lhsystems.ffp.security.interceptor.SecurityInterceptor.intercept(SecurityInterceptor.java:91)
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
com.opensymphony.xwork.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:151)
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
com.opensymphony.xwork.DefaultActionProxy.execute(DefaultActionProxy.java:113)
com.opensymphony.webwork.dispatcher.DispatcherUtils.serviceAction(DispatcherUtils.java:225)
com.opensymphony.webwork.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:202)
com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
id.co.lhsystems.ffp.security.filter.FrequentFlyerContainerChainFilter.doFilter(FrequentFlyerContainerChainFilter.java:193)
id.co.lhsystems.ffp.web.filter.LoadDateConvertersFilter.doFilter(LoadDateConvertersFilter.java:77)
org.nanocontainer.nanowar.webwork2.PicoObjectFactoryFilter.doFilter(PicoObjectFactoryFilter.java:49)
id.co.lhsystems.ffp.web.filter.SetLocaleFilter.doFilter(SetLocaleFilter.java:185)
id.co.lhsystems.ffp.web.filter.NDCLogFilter.doFilter(NDCLogFilter.java:55)
org.nanocontainer.nanowar.ServletRequestContainerFilter.doFilter(ServletRequestContainerFilter.java:44)
com.opensymphony.webwork.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:88)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
</pre></p><p><b>root cause</b> <pre>org.apache.lucene.store.jdbc.JdbcStoreException: Failed to read transactional blob [_i.tis]; nested exception is java.sql.SQLException: Connection closed
org.apache.lucene.store.jdbc.index.FetchPerTransactionJdbcIndexInput.refill(FetchPerTransactionJdbcIndexInput.java:192)
org.apache.lucene.store.ConfigurableBufferedIndexInput.readByte(ConfigurableBufferedIndexInput.java:27)
org.apache.lucene.store.IndexInput.readVInt(IndexInput.java:78)
org.apache.lucene.index.TermBuffer.read(TermBuffer.java:64)
org.apache.lucene.index.SegmentTermEnum.next(SegmentTermEnum.java:127)
org.apache.lucene.index.SegmentTermEnum.scanTo(SegmentTermEnum.java:158)
org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:271)
org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:218)
org.apache.lucene.index.SegmentTermDocs.seek(SegmentTermDocs.java:55)
org.apache.lucene.index.MultiSegmentReader$MultiTermDocs.termDocs(MultiSegmentReader.java:608)
org.apache.lucene.index.MultiSegmentReader$MultiTermDocs.read(MultiSegmentReader.java:572)
org.apache.lucene.search.TermScorer.next(TermScorer.java:106)
org.apache.lucene.search.DisjunctionSumScorer.initScorerDocQueue(DisjunctionSumScorer.java:105)
org.apache.lucene.search.DisjunctionSumScorer.next(DisjunctionSumScorer.java:144)
org.apache.lucene.search.BooleanScorer2.next(BooleanScorer2.java:352)
org.apache.lucene.search.ConjunctionScorer.init(ConjunctionScorer.java:80)
org.apache.lucene.search.ConjunctionScorer.next(ConjunctionScorer.java:48)
org.apache.lucene.search.BooleanScorer2.score(BooleanScorer2.java:319)
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:136)
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:123)
org.apache.lucene.search.Hits.getMoreDocs(Hits.java:113)
org.apache.lucene.search.Hits.<init>(Hits.java:90)
org.apache.lucene.search.Searcher.search(Searcher.java:61)
org.compass.core.lucene.engine.transaction.AbstractTransaction.findByQuery(AbstractTransaction.java:238)
org.compass.core.lucene.engine.transaction.readcommitted.ReadCommittedTransaction.doFind(ReadCommittedTransaction.java:215)
org.compass.core.lucene.engine.transaction.AbstractTransaction.find(AbstractTransaction.java:105)
org.compass.core.lucene.engine.LuceneSearchEngine.find(LuceneSearchEngine.java:358)
org.compass.core.lucene.engine.LuceneSearchEngineQuery.hits(LuceneSearchEngineQuery.java:200)
org.compass.core.impl.DefaultCompassQuery.hits(DefaultCompassQuery.java:170)
id.co.lhsystems.ffp.business.search.compass.service.DefaultSearchService.search(DefaultSearchService.java:48)
id.co.lhsystems.ffp.business.search.compass.action.SimpleSearchAction.execute(SimpleSearchAction.java:149)
sun.reflect.GeneratedMethodAccessor1957.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
com.opensymphony.xwork.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:364)
com.opensymphony.xwork.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:216)
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
com.opensymphony.xwork.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:168)
com.opensymphony.xwork.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
com.opensymphony.xwork.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:115)
com.opensymphony.xwork.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
id.co.lhsystems.ffp.security.interceptor.SecurityInterceptor.intercept(SecurityInterceptor.java:91)
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
com.opensymphony.xwork.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:151)
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
com.opensymphony.xwork.DefaultActionProxy.execute(DefaultActionProxy.java:113)
com.opensymphony.webwork.dispatcher.DispatcherUtils.serviceAction(DispatcherUtils.java:225)
com.opensymphony.webwork.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:202)
com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
id.co.lhsystems.ffp.security.filter.FrequentFlyerContainerChainFilter.doFilter(FrequentFlyerContainerChainFilter.java:193)
id.co.lhsystems.ffp.web.filter.LoadDateConvertersFilter.doFilter(LoadDateConvertersFilter.java:77)
org.nanocontainer.nanowar.webwork2.PicoObjectFactoryFilter.doFilter(PicoObjectFactoryFilter.java:49)
id.co.lhsystems.ffp.web.filter.SetLocaleFilter.doFilter(SetLocaleFilter.java:185)
id.co.lhsystems.ffp.web.filter.NDCLogFilter.doFilter(NDCLogFilter.java:55)
org.nanocontainer.nanowar.ServletRequestContainerFilter.doFilter(ServletRequestContainerFilter.java:44)
com.opensymphony.webwork.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:88)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
</pre></p><p><b>root cause</b> <pre>java.sql.SQLException: Connection closed
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208)
oracle.sql.BLOB.getDBAccess(BLOB.java:955)
oracle.sql.BLOB.getBytes(BLOB.java:288)
oracle.sql.BLOB.getBytes(BLOB.java:192)
org.apache.lucene.store.jdbc.index.FetchPerTransactionJdbcIndexInput.readInternal(FetchPerTransactionJdbcIndexInput.java:247)
org.apache.lucene.store.jdbc.index.FetchPerTransactionJdbcIndexInput.refill(FetchPerTransactionJdbcIndexInput.java:187)
org.apache.lucene.store.ConfigurableBufferedIndexInput.readByte(ConfigurableBufferedIndexInput.java:27)
org.apache.lucene.store.IndexInput.readVInt(IndexInput.java:78)
org.apache.lucene.index.TermBuffer.read(TermBuffer.java:64)
org.apache.lucene.index.SegmentTermEnum.next(SegmentTermEnum.java:127)
org.apache.lucene.index.SegmentTermEnum.scanTo(SegmentTermEnum.java:158)
org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:271)
org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:218)
org.apache.lucene.index.SegmentTermDocs.seek(SegmentTermDocs.java:55)
org.apache.lucene.index.MultiSegmentReader$MultiTermDocs.termDocs(MultiSegmentReader.java:608)
org.apache.lucene.index.MultiSegmentReader$MultiTermDocs.read(MultiSegmentReader.java:572)
org.apache.lucene.search.TermScorer.next(TermScorer.java:106)
org.apache.lucene.search.DisjunctionSumScorer.initScorerDocQueue(DisjunctionSumScorer.java:105)
org.apache.lucene.search.DisjunctionSumScorer.next(DisjunctionSumScorer.java:144)
org.apache.lucene.search.BooleanScorer2.next(BooleanScorer2.java:352)
org.apache.lucene.search.ConjunctionScorer.init(ConjunctionScorer.java:80)
org.apache.lucene.search.ConjunctionScorer.next(ConjunctionScorer.java:48)
org.apache.lucene.search.BooleanScorer2.score(BooleanScorer2.java:319)
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:136)
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:123)
org.apache.lucene.search.Hits.getMoreDocs(Hits.java:113)
org.apache.lucene.search.Hits.<init>(Hits.java:90)
org.apache.lucene.search.Searcher.search(Searcher.java:61)
org.compass.core.lucene.engine.transaction.AbstractTransaction.findByQuery(AbstractTransaction.java:238)
org.compass.core.lucene.engine.transaction.readcommitted.ReadCommittedTransaction.doFind(ReadCommittedTransaction.java:215)
org.compass.core.lucene.engine.transaction.AbstractTransaction.find(AbstractTransaction.java:105)
org.compass.core.lucene.engine.LuceneSearchEngine.find(LuceneSearchEngine.java:358)
org.compass.core.lucene.engine.LuceneSearchEngineQuery.hits(LuceneSearchEngineQuery.java:200)
org.compass.core.impl.DefaultCompassQuery.hits(DefaultCompassQuery.java:170)
id.co.lhsystems.ffp.business.search.compass.service.DefaultSearchService.search(DefaultSearchService.java:48)
id.co.lhsystems.ffp.business.search.compass.action.SimpleSearchAction.execute(SimpleSearchAction.java:149)
sun.reflect.GeneratedMethodAccessor1957.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
com.opensymphony.xwork.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:364)
com.opensymphony.xwork.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:216)
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
com.opensymphony.xwork.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:168)
com.opensymphony.xwork.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
com.opensymphony.xwork.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:115)
com.opensymphony.xwork.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
id.co.lhsystems.ffp.security.interceptor.SecurityInterceptor.intercept(SecurityInterceptor.java:91)
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
com.opensymphony.xwork.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:151)
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
com.opensymphony.xwork.DefaultActionProxy.execute(DefaultActionProxy.java:113)
com.opensymphony.webwork.dispatcher.DispatcherUtils.serviceAction(DispatcherUtils.java:225)
com.opensymphony.webwork.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:202)
com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
id.co.lhsystems.ffp.security.filter.FrequentFlyerContainerChainFilter.doFilter(FrequentFlyerContainerChainFilter.java:193)
id.co.lhsystems.ffp.web.filter.LoadDateConvertersFilter.doFilter(LoadDateConvertersFilter.java:77)
org.nanocontainer.nanowar.webwork2.PicoObjectFactoryFilter.doFilter(PicoObjectFactoryFilter.java:49)
id.co.lhsystems.ffp.web.filter.SetLocaleFilter.doFilter(SetLocaleFilter.java:185)
id.co.lhsystems.ffp.web.filter.NDCLogFilter.doFilter(NDCLogFilter.java:55)
org.nanocontainer.nanowar.ServletRequestContainerFilter.doFilter(ServletRequestContainerFilter.java:44)
com.opensymphony.webwork.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:88)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
</pre></p><p><b>note</b> <u>The full stack trace of the root cause is available in the JBossWeb/2.0.1.GA logs.</u></p><HR size="1" noshade="noshade"><h3>JBossWeb/2.0.1.GA</h3></body></html>
com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException: 500 Internal Server Error for http://10.236.34.139:8080/bo/search/search.action
at com.gargoylesoftware.htmlunit.WebClient.throwFailingHttpStatusCodeExceptionIfNecessary(WebClient.java:536)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:331)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:355)
at com.gargoylesoftware.htmlunit.html.HtmlForm.submit(HtmlForm.java:187)
at com.gargoylesoftware.htmlunit.html.HtmlSubmitInput.doClickAction(HtmlSubmitInput.java:82)
at com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1249)
at com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1208)
at com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1177)
at com.lhsystems.ffp.perftest.HtmlLoadTest.searchCustomerWithName(HtmlLoadTest.java:142)
at com.lhsystems.ffp.perftest.HtmlLoadTest.doTest(HtmlLoadTest.java:80)
at com.lhsystems.ffp.perftest.HtmlLoadTest.run(HtmlLoadTest.java:211)
at java.lang.Thread.run(Unknown Source)



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.