[jsword-devel] [JIRA] Created: (JS-138) Possible to cause Lucene to throw an exception with certain searches

Martin Denham (JIRA) jira at crosswire.org
Sat Dec 4 15:52:29 MST 2010


Possible to cause Lucene to throw an exception with certain searches
--------------------------------------------------------------------

                 Key: JS-138
                 URL: http://www.crosswire.org/bugs/browse/JS-138
             Project: JSword
          Issue Type: Bug
          Components: o.c.jsword.index
         Environment: Android
            Reporter: Martin Denham
            Assignee: DM Smith
            Priority: Minor


1 Open GerNeue
2 Go to Job1:1
3 Copy verse
4 Request Search
5 Paste the verse copied above into search field
6 Start search
7 You get the following exception

12-04 22:35:41.899: ERROR/SearchResults(23453): Error processing search query
12-04 22:35:41.899: ERROR/SearchResults(23453): org.crosswire.jsword.book.BookException: Search failed.
12-04 22:35:41.899: ERROR/SearchResults(23453):     at org.crosswire.jsword.index.lucene.LuceneIndex.find(LuceneIndex.java:309)
12-04 22:35:41.899: ERROR/SearchResults(23453):     at org.crosswire.jsword.index.query.BaseQuery.find(BaseQuery.java:54)
12-04 22:35:41.899: ERROR/SearchResults(23453):     at org.crosswire.jsword.index.lucene.LuceneSearcher.search(LuceneSearcher.java:100)
12-04 22:35:41.899: ERROR/SearchResults(23453):     at org.crosswire.jsword.index.lucene.LuceneSearcher.search(LuceneSearcher.java:87)
12-04 22:35:41.899: ERROR/SearchResults(23453):     at org.crosswire.jsword.book.basic.AbstractBook.find(AbstractBook.java:124)
12-04 22:35:41.899: ERROR/SearchResults(23453):     at org.crosswire.jsword.book.basic.AbstractBook.find(AbstractBook.java:105)
12-04 22:35:41.899: ERROR/SearchResults(23453):     at net.bible.service.sword.SwordApi.search(SwordApi.java:386)
12-04 22:35:41.899: ERROR/SearchResults(23453):     at net.bible.android.view.activity.search.SearchResults.prepareResults(SearchResults.java:92)
12-04 22:35:41.899: ERROR/SearchResults(23453):     at net.bible.android.view.activity.search.SearchResults.onCreate(SearchResults.java:58)
12-04 22:35:41.899: ERROR/SearchResults(23453):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
12-04 22:35:41.899: ERROR/SearchResults(23453):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
12-04 22:35:41.899: ERROR/SearchResults(23453):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
12-04 22:35:41.899: ERROR/SearchResults(23453):     at android.app.ActivityThread.access$2300(ActivityThread.java:125)
12-04 22:35:41.899: ERROR/SearchResults(23453):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
12-04 22:35:41.899: ERROR/SearchResults(23453):     at android.os.Handler.dispatchMessage(Handler.java:99)
12-04 22:35:41.899: ERROR/SearchResults(23453):     at android.os.Looper.loop(Looper.java:123)
12-04 22:35:41.899: ERROR/SearchResults(23453):     at android.app.ActivityThread.main(ActivityThread.java:4627)
12-04 22:35:41.899: ERROR/SearchResults(23453):     at java.lang.reflect.Method.invokeNative(Native Method)
12-04 22:35:41.899: ERROR/SearchResults(23453):     at java.lang.reflect.Method.invoke(Method.java:521)
12-04 22:35:41.899: ERROR/SearchResults(23453):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
12-04 22:35:41.899: ERROR/SearchResults(23453):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
12-04 22:35:41.899: ERROR/SearchResults(23453):     at dalvik.system.NativeStart.main(Native Method)
12-04 22:35:41.899: ERROR/SearchResults(23453): Caused by: org.apache.lucene.queryParser.ParseException: Cannot parse ' +Job +1:1
12-04 22:35:41.899: ERROR/SearchResults(23453):  +Im +Land +Uz +lebte +ein +Mann +namens +Hiob. +Dieser +Mann +war +aufrichtig +und +vollständig +Gott +ergeben. +Er +fürchtete +Gott +und +mied +das +Böse. +
12-04 22:35:41.899: ERROR/SearchResults(23453): ': Encountered "<EOF>" at line 1, column 170.
12-04 22:35:41.899: ERROR/SearchResults(23453): Was expecting one of:
12-04 22:35:41.899: ERROR/SearchResults(23453):     "(" ...
12-04 22:35:41.899: ERROR/SearchResults(23453):     "*" ...
12-04 22:35:41.899: ERROR/SearchResults(23453):     <QUOTED> ...
12-04 22:35:41.899: ERROR/SearchResults(23453):     <TERM> ...
12-04 22:35:41.899: ERROR/SearchResults(23453):     <PREFIXTERM> ...
12-04 22:35:41.899: ERROR/SearchResults(23453):     <WILDTERM> ...
12-04 22:35:41.899: ERROR/SearchResults(23453):     "[" ...
12-04 22:35:41.899: ERROR/SearchResults(23453):     "{" ...
12-04 22:35:41.899: ERROR/SearchResults(23453):     <NUMBER> ...
12-04 22:35:41.899: ERROR/SearchResults(23453):     <TERM> ...
12-04 22:35:41.899: ERROR/SearchResults(23453):     "*" ...
12-04 22:35:41.899: ERROR/SearchResults(23453):     
12-04 22:35:41.899: ERROR/SearchResults(23453):     at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:187)
12-04 22:35:41.899: ERROR/SearchResults(23453):     at org.crosswire.jsword.index.lucene.LuceneIndex.find(LuceneIndex.java:252)
12-04 22:35:41.899: ERROR/SearchResults(23453):     ... 21 more
12-04 22:35:41.899: ERROR/SearchResults(23453): Caused by: org.apache.lucene.queryParser.ParseException: Encountered "<EOF>" at line 1, column 170.
12-04 22:35:41.899: ERROR/SearchResults(23453): Was expecting one of:
12-04 22:35:41.899: ERROR/SearchResults(23453):     "(" ...
12-04 22:35:41.899: ERROR/SearchResults(23453):     "*" ...
12-04 22:35:41.899: ERROR/SearchResults(23453):     <QUOTED> ...
12-04 22:35:41.899: ERROR/SearchResults(23453):     <TERM> ...
12-04 22:35:41.899: ERROR/SearchResults(23453):     <PREFIXTERM> ...
12-04 22:35:41.899: ERROR/SearchResults(23453):     <WILDTERM> ...
12-04 22:35:41.899: ERROR/SearchResults(23453):     "[" ...
12-04 22:35:41.899: ERROR/SearchResults(23453):     "{" ...
12-04 22:35:41.899: ERROR/SearchResults(23453):     <NUMBER> ...
12-04 22:35:41.899: ERROR/SearchResults(23453):     <TERM> ...
12-04 22:35:41.899: ERROR/SearchResults(23453):     "*" ...
12-04 22:35:41.899: ERROR/SearchResults(23453):     
12-04 22:35:41.899: ERROR/SearchResults(23453):     at org.apache.lucene.queryParser.QueryParser.generateParseException(QueryParser.java:1759)
12-04 22:35:41.899: ERROR/SearchResults(23453):     at org.apache.lucene.queryParser.QueryParser.jj_consume_token(QueryParser.java:1641)
12-04 22:35:41.899: ERROR/SearchResults(23453):     at org.apache.lucene.queryParser.QueryParser.Clause(QueryParser.java:1268)
12-04 22:35:41.899: ERROR/SearchResults(23453):     at org.apache.lucene.queryParser.QueryParser.Query(QueryParser.java:1207)
12-04 22:35:41.899: ERROR/SearchResults(23453):     at org.apache.lucene.queryParser.QueryParser.TopLevelQuery(QueryParser.java:1167)
12-04 22:35:41.899: ERROR/SearchResults(23453):     at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:182)
12-04 22:35:41.899: ERROR/SearchResults(23453):     ... 22 more
12-04 22:35:41.949: DEBUG/AndroidRuntime(23453): Shutting down VM
12-04 22:35:41.949: WARN/dalvikvm(23453): threadid=1: thread exiting with uncaught exception (group=0x400207e8)
12-04 22:35:41.959: ERROR/AndroidRuntime(23453): FATAL EXCEPTION: main
12-04 22:35:41.959: ERROR/AndroidRuntime(23453): java.lang.RuntimeException: Unable to start activity ComponentInfo{net.bible.android.activity/net.bible.android.view.activity.search.SearchResults}: java.lang.NullPointerException
12-04 22:35:41.959: ERROR/AndroidRuntime(23453):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
12-04 22:35:41.959: ERROR/AndroidRuntime(23453):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
12-04 22:35:41.959: ERROR/AndroidRuntime(23453):     at android.app.ActivityThread.access$2300(ActivityThread.java:125)
12-04 22:35:41.959: ERROR/AndroidRuntime(23453):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
12-04 22:35:41.959: ERROR/AndroidRuntime(23453):     at android.os.Handler.dispatchMessage(Handler.java:99)
12-04 22:35:41.959: ERROR/AndroidRuntime(23453):     at android.os.Looper.loop(Looper.java:123)
12-04 22:35:41.959: ERROR/AndroidRuntime(23453):     at android.app.ActivityThread.main(ActivityThread.java:4627)
12-04 22:35:41.959: ERROR/AndroidRuntime(23453):     at java.lang.reflect.Method.invokeNative(Native Method)
12-04 22:35:41.959: ERROR/AndroidRuntime(23453):     at java.lang.reflect.Method.invoke(Method.java:521)
12-04 22:35:41.959: ERROR/AndroidRuntime(23453):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
12-04 22:35:41.959: ERROR/AndroidRuntime(23453):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
12-04 22:35:41.959: ERROR/AndroidRuntime(23453):     at dalvik.system.NativeStart.main(Native Method)
12-04 22:35:41.959: ERROR/AndroidRuntime(23453): Caused by: java.lang.NullPointerException
12-04 22:35:41.959: ERROR/AndroidRuntime(23453):     at android.widget.SimpleAdapter.getCount(SimpleAdapter.java:93)
12-04 22:35:41.959: ERROR/AndroidRuntime(23453):     at android.widget.ListView.setAdapter(ListView.java:436)
12-04 22:35:41.959: ERROR/AndroidRuntime(23453):     at android.app.ListActivity.setListAdapter(ListActivity.java:267)
12-04 22:35:41.959: ERROR/AndroidRuntime(23453):     at net.bible.android.view.activity.search.SearchResults.onCreate(SearchResults.java:60)
12-04 22:35:41.959: ERROR/AndroidRuntime(23453):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
12-04 22:35:41.959: ERROR/AndroidRuntime(23453):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
12-04 22:35:41.959: ERROR/AndroidRuntime(23453):     ... 11 more
12-04 22:35:41.979: WARN/ActivityManager(19196):   Force finishing activity net.bible.android.activity/net.bible.android.view.activity.search.SearchResults


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://www.crosswire.org/bugs/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the jsword-devel mailing list