You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Jian Han Guo <ji...@gmail.com> on 2009/05/01 00:03:34 UTC

NullPointException during creating snapshot

Hi,

If there is no new document added since the last snapshot is created, the
request solr/replication?command=snapshoot returns the following response

<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader"><int name="status">0</int><int
name="QTime">8</int></lst><str
name="exception">java.lang.NullPointerException:java.lang.NullPointerException</str>
</response>

Is this something expected? There was no error message found in the log
file.

I expected no snapshot will be created (since there is no new doc/index),
but I didn't expect to see NullPointException in the response.

Thanks,

Jianhan

Re: NullPointException during creating snapshot

Posted by Otis Gospodnetic <ot...@yahoo.com>.
Jianhan,

You didn't mention how old your version of Solr is.  Try with the latest nightly build first, please.

Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch



----- Original Message ----
> From: Jian Han Guo <ji...@gmail.com>
> To: solr-user@lucene.apache.org
> Sent: Thursday, April 30, 2009 6:03:34 PM
> Subject: NullPointException during creating snapshot
> 
> Hi,
> 
> If there is no new document added since the last snapshot is created, the
> request solr/replication?command=snapshoot returns the following response
> 
> 
> 
> 0
> name="QTime">8
> name="exception">java.lang.NullPointerException:java.lang.NullPointerException
> 
> 
> Is this something expected? There was no error message found in the log
> file.
> 
> I expected no snapshot will be created (since there is no new doc/index),
> but I didn't expect to see NullPointException in the response.
> 
> Thanks,
> 
> Jianhan


Re: NullPointException during creating snapshot

Posted by Jian Han Guo <ji...@gmail.com>.
solr-dev is probably a better place to discuss this.

I did a bit of investigation and found the problem was in
ReplicationHandler.doSnapShoot, and here is the code

  private void doSnapShoot(SolrQueryResponse rsp) {
    try {
      new
SnapShooter(core).createSnapAsync(core.getDeletionPolicy().getLatestCommit().getFileNames());
    } catch (Exception e) {
      rsp.add("exception", e);
    }
  }

and when there was no update after the last snapshot,
core.getDeletionPolicy().getLatestCommit() returns null (though I saw at one
time that it returns none null value). Since there were no logging in the
catch block, no stacktrace was seen in the log file.

Oh, the operating system I am using is Mac OS 10.5.6

Thanks,

Jianhan



2009/4/30 Noble Paul നോബിള്‍ नोब्ळ् <no...@gmail.com>

> The snapshoot feature is not yet tested . Could you please post the
> full stacktrace from the server console. I shall open an issue
>
> --Noble
>
> On Fri, May 1, 2009 at 3:33 AM, Jian Han Guo <ji...@gmail.com> wrote:
> > Hi,
> >
> > If there is no new document added since the last snapshot is created, the
> > request solr/replication?command=snapshoot returns the following response
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <response>
> > <lst name="responseHeader"><int name="status">0</int><int
> > name="QTime">8</int></lst><str
> >
> name="exception">java.lang.NullPointerException:java.lang.NullPointerException</str>
> > </response>
> >
> > Is this something expected? There was no error message found in the log
> > file.
> >
> > I expected no snapshot will be created (since there is no new doc/index),
> > but I didn't expect to see NullPointException in the response.
> >
> > Thanks,
> >
> > Jianhan
> >
>
>
>
> --
> --Noble Paul
>

Re: NullPointException during creating snapshot

Posted by Noble Paul നോബിള്‍ नोब्ळ् <no...@gmail.com>.
The snapshoot feature is not yet tested . Could you please post the
full stacktrace from the server console. I shall open an issue

--Noble

On Fri, May 1, 2009 at 3:33 AM, Jian Han Guo <ji...@gmail.com> wrote:
> Hi,
>
> If there is no new document added since the last snapshot is created, the
> request solr/replication?command=snapshoot returns the following response
>
> <?xml version="1.0" encoding="UTF-8"?>
> <response>
> <lst name="responseHeader"><int name="status">0</int><int
> name="QTime">8</int></lst><str
> name="exception">java.lang.NullPointerException:java.lang.NullPointerException</str>
> </response>
>
> Is this something expected? There was no error message found in the log
> file.
>
> I expected no snapshot will be created (since there is no new doc/index),
> but I didn't expect to see NullPointException in the response.
>
> Thanks,
>
> Jianhan
>



-- 
--Noble Paul