[jsword-devel] jsword-devel Digest, Vol 46, Issue 11

Yiguang Hu yighu at yahoo.com
Sat Mar 22 13:06:40 MST 2008


I looked the tomcat log file and found the following.
I check the folders /root/.jsword/lucene/Sword/*
and found all of them are empty.

Is there any configuration file I should look at?
 Do I need to download the bible module files and put
it somewhere like the sword web?

Thanks
Yiguang

Mar 22, 2008 3:54:10 PM
org.apache.catalina.startup.Catalina start
INFO: Server startup in 2814 ms
Mar 22, 2008 3:54:32 PM
org.crosswire.jsword.index.lucene.LuceneIndex activate
INFO: second load failure
java.io.FileNotFoundException: no segments* file found
in
org.apache.lucene.store.FSDirectory@/root/.jsword/lucene/Sword/KJV:
files:
        at
org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:516)
        at
org.apache.lucene.index.IndexReader.open(IndexReader.java:185)
        at
org.apache.lucene.index.IndexReader.open(IndexReader.java:148)
        at
org.apache.lucene.search.IndexSearcher.<init>(IndexSearcher.java:48)
        at
org.crosswire.jsword.index.lucene.LuceneIndex.activate(LuceneIndex.java:303)
        at
org.crosswire.common.activate.Activator.activate(Activator.java:57)
        at
org.crosswire.jsword.index.lucene.LuceneIndex.checkActive(LuceneIndex.java:338)
        at
org.crosswire.jsword.index.lucene.LuceneIndex.find(LuceneIndex.java:200)
        at
org.crosswire.jsword.index.query.BaseQuery.find(BaseQuery.java:53)
        at
org.crosswire.jsword.index.lucene.LuceneSearcher.search(LuceneSearcher.java:86)
        at
org.crosswire.jsword.index.lucene.LuceneSearcher.search(LuceneSearcher.java:76)
        at
org.crosswire.jsword.book.basic.AbstractBook.find(AbstractBook.java:116)
        at
org.crosswire.jsword.book.basic.AbstractBook.find(AbstractBook.java:96)
        at
org.crosswire.client.webjsword.SearchController.searchandshow(SearchController.java:242)
        at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at
java.lang.reflect.Method.invoke(Method.java:597)
        at
org.apache.el.parser.AstValue.invoke(AstValue.java:152)
        at
org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
        at
org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)
        at
javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
        at
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
        at
com.sun.rave.web.ui.appbase.faces.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
        at
javax.faces.component.UICommand.broadcast(UICommand.java:383)
        at
javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:447)
        at
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:752)
        at
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
        at
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
        at
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
        at
com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.execute(PartialTraversalLifecycle.java:94)
        at
javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:267)


In the other log file:
SEVERE: #{searchcontroller.searchandshow}:
java.lang.NullPointerException
javax.faces.FacesException:
#{searchcontroller.searchandshow}:
java.lang.NullPointerException
        at
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:107)
        at
com.sun.rave.web.ui.appbase.faces.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
        at
javax.faces.component.UICommand.broadcast(UICommand.java:383)
        at
javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:447)
        at
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:752)
        at
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
        at
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
        at
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
        at
com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.execute(PartialTraversalLifecycle.java:94)
        at
javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:267)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:619)
Caused by: javax.faces.el.EvaluationException:
java.lang.NullPointerException
        at
javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:91)
        at
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
        ... 24 more
Caused by: java.lang.NullPointerException
        at
org.crosswire.jsword.index.lucene.LuceneIndex.deactivate(LuceneIndex.java:320)
        at
org.crosswire.common.activate.Activator.deactivate(Activator.java:82)
        at
org.crosswire.jsword.index.lucene.LuceneIndex.find(LuceneIndex.java:270)
        at
org.crosswire.jsword.index.query.BaseQuery.find(BaseQuery.java:53)
        at
org.crosswire.jsword.index.lucene.LuceneSearcher.search(LuceneSearcher.java:86)
        at
org.crosswire.jsword.index.lucene.LuceneSearcher.search(LuceneSearcher.java:76)
        at
org.crosswire.jsword.book.basic.AbstractBook.find(AbstractBook.java:116)

--- jsword-devel-request at crosswire.org wrote:

> Send jsword-devel mailing list submissions to
> 	jsword-devel at crosswire.org
> 
> To subscribe or unsubscribe via the World Wide Web,
> visit
> 
>
http://www.crosswire.org/mailman/listinfo/jsword-devel
> or, via email, send a message with subject or body
> 'help' to
> 	jsword-devel-request at crosswire.org
> 
> You can reach the person managing the list at
> 	jsword-devel-owner at crosswire.org
> 
> When replying, please edit your Subject line so it
> is more specific
> than "Re: Contents of jsword-devel digest..."
> 
> 
> Today's Topics:
> 
>    1. Jsword web (Yiguang Hu)
> 
> 
>
----------------------------------------------------------------------
> 
> Message: 1
> Date: Fri, 21 Mar 2008 20:00:37 -0700 (PDT)
> From: Yiguang Hu <yighu at yahoo.com>
> Subject: [jsword-devel] Jsword web
> To: jsword-devel at crosswire.org
> Message-ID:
> <90747.71223.qm at web36102.mail.mud.yahoo.com>
> Content-Type: text/plain; charset=iso-8859-1
> 
> DM,
> 
> I am trying to revitalize an effort to build a web
> front based on jsword. I got a simple page doing
> bible
> search working on my local desktop since I have
> installed Bibles with the Bible desktop. But when I
> deployed the war to a tomcat on linux, the search
> FAILED since I didn't install  any Bible. I wrote a
> simple code based on the sample code on the UI but
> got
> nullpointerexception on the following line when I
> try
> to use it to install bible.
> 
>              installer.reloadBookList();
> What am I missing?
> Thanks
> Yiguang
>  
> public Testcode {
> .....
> public void installBook(String booktoinstall){
>  
>          // An installer knows how to install books
>          Installer installer = null;
>          
>          InstallManager imanager = new
> InstallManager();
>  
>         // Ask the Install Manager for a map of all
> known module sites
>          Map installers = imanager.getInstallers();
>  
>          // Get all the installers one after the
> other
>          Iterator iter =
> installers.keySet().iterator();
>          while (iter.hasNext())
>          {
>              String name = (String) iter.next();
>              installer = (Installer)
> installers.get(name);
>              
>          }
>  
>          // If we know the name of the installer we
> can get it directly
>          installer =
> imanager.getInstaller("CrossWire"); //$NON-NLS-1$
>  
>          // Now we can get the list of books
>          try
>          {
>              installer.reloadBookList();
>          }
>          catch (InstallException e)
>          {
>              e.printStackTrace();
>          }
>  
>          // Get a list of all the available books
>          List availableBooks = installer.getBooks();
>  
>          // get some available books. In this case,
> just one book.
>          availableBooks = installer.getBooks(new
> MyBookFilter(booktoinstall)); //$NON-NLS-1$
>  
>          Book book = (Book) availableBooks.get(0);
>  
>          if (book != null)
>          {
>              System.out.println("Book " +
> book.getInitials() + " is available"); //$NON-NLS-1$
> //$NON-NLS-2$
>  
>              // Delete the book, if present
>              // At the moment, JSword will not
> re-install. Later it will, if the remote version is
> greater.
>              try
>              {
>                  if
> (Books.installed().getBook(booktoinstall) != null)
> //$NON-NLS-1$
>                  {
>                      // Make the book unavailable.
>                      // This is normally done via
> listeners.
>                     
> Books.installed().removeBook(book);
>  
>                      // Actually do the delete
>                      // This should be a call on
> installer.
>                      book.getDriver().delete(book);
>                  }
>              }
>              catch (BookException e1)
>              {
>                  e1.printStackTrace();
>              }
>  
>              try
>              {
>                  // Now install it. Note this is a
> background task.
>                  installer.install(book);
>              }
>              catch (InstallException e)
>              {
>                  e.printStackTrace();
>              }
>          }
>      }
> 
> static class MyBookFilter implements BookFilter
>      {
>          public MyBookFilter(String bookName)
>          {
>              name = bookName;
>          }
>  
>          public boolean test(Book bk)
>          {
>              return bk.getInitials().equals(name);
>          }
>  
>          private String name;
>      }
>  
>      /**
>       * A simple BooksListener that actually does
> nothing.
>       */
>      static class MyBooksListener implements
> BooksListener
>      {
>          /* (non-Javadoc)
>           * @see
>
org.crosswire.jsword.book.BooksListener#bookAdded(org.crosswire.jsword.book.BooksEvent)
>           */
>          public void bookAdded(BooksEvent ev)
>          {
>          }
>  
>          /* (non-Javadoc)
>           * @see
>
org.crosswire.jsword.book.BooksListener#bookRemoved(org.crosswire.jsword.book.BooksEvent)
>           */
>          public void bookRemoved(BooksEvent ev)
>          {
>          }
>      }
>      public static void main(String[] args){
>          Testcode sc=new Testcode();
>          sc.installBook(args[0]);
>      }
> }
> 
> 
>      
>
____________________________________________________________________________________
> Never miss a thing.  Make Yahoo your home page. 
> http://www.yahoo.com/r/hs
> 
=== message truncated ===



      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping




More information about the jsword-devel mailing list