NullPointerException when posting file

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

NullPointerException when posting file

Mike-194
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



schema.txt (3K) Download Attachment
sample.txt (402 bytes) Download Attachment
exception.txt (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: NullPointerException when posting file

Yonik Seeley-2
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 <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

RE: NullPointerException when posting file

Mike-259
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: [hidden email] [mailto:[hidden email]] On Behalf Of Yonik Seeley
Sent: Tuesday, December 19, 2006 3:30 PM
To: [hidden email]
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 <[hidden email]> 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

schema_full.txt (13K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: NullPointerException when posting file

Yonik Seeley-2
On 12/19/06, Mike <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

RE: NullPointerException when posting file

Mike-259
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: [hidden email] [mailto:[hidden email]] On Behalf Of Yonik Seeley
Sent: Tuesday, December 19, 2006 3:43 PM
To: [hidden email]
Subject: Re: NullPointerException when posting file

On 12/19/06, Mike <[hidden email]> 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