You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by Mike <mp...@comcast.net> on 2006/12/19 21:18:56 UTC
NullPointerException when posting file
Hi,
I'm trying to get SOLR up and running with a simple example of my own. The
sample data files provided in the example/exampledocs directory import
flawlessly, as well as querying for their contents through the admin UI. I
know I'm missing something basic, but I just can't figure it out :) I
apologize in advance if this is terribly obvious.
The attached sample.txt is my sample XML file consisting of four data
fields. When I post this document to SOLR, I get a null pointer exception
(see exception.txt for actual command and output). I'm using the default
schema.xml with some minor changes to the <fields> section to match my
sample data. I also add three of these fields to the "text" field to combine
them together.
If it matters, I'm using Apache Tomcat 5.5.20. In the
conf/Catalina/localhost/solr.xml file, I have:
"""
<Context docBase="solr.war" debug="0" crossContext="true" >
<Environment name="solr/home" type="java.lang.String"
value="/var/lib/solr_bg" override="true" />
</Context>
"""
Thanks for your time.
Mike
RE: NullPointerException when posting file
Posted by Mike <mp...@comcast.net>.
Hi Yonik,
I guess I was almost there, but not quite :) I changed the field type to
"integer" and got a step further. I have a bit of tweaking to, so I'll see
how far I get.
Indeed, I do see the "Unknown fieldtype 'int'" in localhost.2006-12-19.log.
I guess I looked over that with all of the other verbose messages.
Thanks a lot for your help!
Mike
-----Original Message-----
From: yseeley@gmail.com [mailto:yseeley@gmail.com] On Behalf Of Yonik Seeley
Sent: Tuesday, December 19, 2006 3:43 PM
To: solr-dev@lucene.apache.org
Subject: Re: NullPointerException when posting file
On 12/19/06, Mike <mp...@comcast.net> wrote:
> > The attached sample.txt is my sample XML file consisting of four
> > data fields. When I post this document to SOLR, I get a null pointer
> > exception
OK, there is a problem with your schema.xml "int" is not a defined
fieldtype... use "integer" or "sint" (see the fieldtype section of
schema.xml)
If you look through your log files, you should see an exception message
telling you this:
15:39:49.494 WARN!! [main]
org.mortbay.jetty.Server.main(Server.java:465) >08> EXCEPTION
org.mortbay.util.MultiException[org.apache.solr.core.SolrException:
Unknown fieldtype 'int']
-Yonik
Re: NullPointerException when posting file
Posted by Yonik Seeley <yo...@apache.org>.
On 12/19/06, Mike <mp...@comcast.net> wrote:
> > The attached sample.txt is my sample XML file consisting of four data
> > fields. When I post this document to SOLR, I get a null pointer
> > exception
OK, there is a problem with your schema.xml
"int" is not a defined fieldtype... use "integer" or "sint" (see the
fieldtype section of schema.xml)
If you look through your log files, you should see an exception
message telling you this:
15:39:49.494 WARN!! [main]
org.mortbay.jetty.Server.main(Server.java:465) >08> EXCEPTION
org.mortbay.util.MultiException[org.apache.solr.core.SolrException:
Unknown fieldtype 'int']
-Yonik
RE: NullPointerException when posting file
Posted by Mike <mp...@comcast.net>.
Hi Yonik,
Yes, I only included the part that I customized. Attached is the complete
file.
Also, the build of SOLR I'm running is from 12/19/2006.
Thanks,
Mike
-----Original Message-----
From: yseeley@gmail.com [mailto:yseeley@gmail.com] On Behalf Of Yonik Seeley
Sent: Tuesday, December 19, 2006 3:30 PM
To: solr-dev@lucene.apache.org
Subject: Re: NullPointerException when posting file
Hi Mike,
Is the attached schema the whole thing? It looks like the first half of the
file is missing.
-Yonik
On 12/19/06, Mike <mp...@comcast.net> wrote:
> Hi,
>
> I'm trying to get SOLR up and running with a simple example of my own.
> The sample data files provided in the example/exampledocs directory
> import flawlessly, as well as querying for their contents through the
> admin UI. I know I'm missing something basic, but I just can't figure
> it out :) I apologize in advance if this is terribly obvious.
>
> The attached sample.txt is my sample XML file consisting of four data
> fields. When I post this document to SOLR, I get a null pointer
> exception (see exception.txt for actual command and output). I'm using
> the default schema.xml with some minor changes to the <fields> section
> to match my sample data. I also add three of these fields to the
> "text" field to combine them together.
>
> If it matters, I'm using Apache Tomcat 5.5.20. In the
> conf/Catalina/localhost/solr.xml file, I have:
>
> """
> <Context docBase="solr.war" debug="0" crossContext="true" >
> <Environment name="solr/home" type="java.lang.String"
> value="/var/lib/solr_bg" override="true" /> </Context> """
>
> Thanks for your time.
>
> Mike
Re: NullPointerException when posting file
Posted by Yonik Seeley <yo...@apache.org>.
Hi Mike,
Is the attached schema the whole thing? It looks like the first half
of the file is missing.
-Yonik
On 12/19/06, Mike <mp...@comcast.net> wrote:
> Hi,
>
> I'm trying to get SOLR up and running with a simple example of my own. The
> sample data files provided in the example/exampledocs directory import
> flawlessly, as well as querying for their contents through the admin UI. I
> know I'm missing something basic, but I just can't figure it out :) I
> apologize in advance if this is terribly obvious.
>
> The attached sample.txt is my sample XML file consisting of four data
> fields. When I post this document to SOLR, I get a null pointer exception
> (see exception.txt for actual command and output). I'm using the default
> schema.xml with some minor changes to the <fields> section to match my
> sample data. I also add three of these fields to the "text" field to combine
> them together.
>
> If it matters, I'm using Apache Tomcat 5.5.20. In the
> conf/Catalina/localhost/solr.xml file, I have:
>
> """
> <Context docBase="solr.war" debug="0" crossContext="true" >
> <Environment name="solr/home" type="java.lang.String"
> value="/var/lib/solr_bg" override="true" />
> </Context>
> """
>
> Thanks for your time.
>
> Mike