Re: Null pointer exception

2007-05-14 Thread Chris Hostetter
: I have tried indexing from the exampledocs which is just sitting in my
: user home directory but now I get a null pointer exception after
: running:

just to clarify: are you using solr 1.1 or a nightly build? did you check
the log file to ensure thatthere are no exceptions when you start tomcat?
are you using the example solrconfig.xml and schema.xml?  have you tried
doing a search first without indexing any docs to see if that executs and
(correctly) returns 0 docs?

If i had to guess, i'd speculate that you aren't correctly using a system
prop or JNDI to point Solr at your solr home dir, so it's not finding the
configs; either that, or you've modified the configs and there is a
syntax error -- either way there should be an exception when the server
starts up, well before you update any docs.


-Hoss



RE: Null pointer exception

2007-05-14 Thread Gary Browne
Thanks a lot for your reply Chris

I am running v1.1.0. If I do a search (from the admin page), it throws
the following exception:

java.lang.RuntimeException: java.io.IOException:
/var/www/html/solr/data/index not a directory

There are no exceptions on starting Tomcat, only one warning regarding
JMS client lib not found (related to Cocoon). I have named a file
solr.xml in my $TOMCAT_HOME/conf/Catalina/localhost directory containing
the following:





I am using the example configs (unmodified).

Thanks again
Gary


Gary Browne
Development Programmer
Library IT Services
University of Sydney
Australia
ph: 61-2-9351 5946 
-Original Message-
From: Chris Hostetter [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 15 May 2007 7:27 AM
To: solr-user@lucene.apache.org
Subject: Re: Null pointer exception

: I have tried indexing from the exampledocs which is just sitting in my
: user home directory but now I get a null pointer exception after
: running:

just to clarify: are you using solr 1.1 or a nightly build? did you
check
the log file to ensure thatthere are no exceptions when you start
tomcat?
are you using the example solrconfig.xml and schema.xml?  have you tried
doing a search first without indexing any docs to see if that executs
and
(correctly) returns 0 docs?

If i had to guess, i'd speculate that you aren't correctly using a
system
prop or JNDI to point Solr at your solr home dir, so it's not finding
the
configs; either that, or you've modified the configs and there is a
syntax error -- either way there should be an exception when the server
starts up, well before you update any docs.


-Hoss



RE: Null pointer exception

2007-05-14 Thread Chris Hostetter
: I am running v1.1.0. If I do a search (from the admin page), it throws
: the following exception:
:
: java.lang.RuntimeException: java.io.IOException:
: /var/www/html/solr/data/index not a directory

does /var/www/html/solr/data/ exist? ... if so does the effective userID
for tomcat have permission to write to it?  if not does the effective
userID for tomcat have permission to write to /var/www/html/solr/ ?



-Hoss



RE: Null pointer exception

2007-05-14 Thread Gary Browne
Hi Chris

The /var/www/html/solr/data/ directory did exist. I tried opening up
permissions completely for testing but no luck (the tomcat user had
write permissions).

I decided to trash the whole installation and start again. I downloaded
last nights build and untarred it. Put the .war into
$TOMCAT_HOME/webapps. Copied the example/solr directory as
/var/www/html/solr. No JNDI file this time, just updated solrconfig to
read /var/www/html/solr as my data.dir.

I can access the admin page but when I try an index action from the
commandline, or a search from the admin page, I get something like:

"The requested resource (/solr/select/) is not available"

I have other apps running under tomcat okay, seems like it can't find
the lib .jars or can't access the classes within them?

Stuck...

Cheers
Gary



Gary Browne
Development Programmer
Library IT Services
University of Sydney
Australia
ph: 61-2-9351 5946 

-Original Message-
From: Chris Hostetter [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 15 May 2007 9:51 AM
To: solr-user@lucene.apache.org
Subject: RE: Null pointer exception

: I am running v1.1.0. If I do a search (from the admin page), it throws
: the following exception:
:
: java.lang.RuntimeException: java.io.IOException:
: /var/www/html/solr/data/index not a directory

does /var/www/html/solr/data/ exist? ... if so does the effective userID
for tomcat have permission to write to it?  if not does the effective
userID for tomcat have permission to write to /var/www/html/solr/ ?



-Hoss



RE: Null pointer exception

2007-05-15 Thread Chris Hostetter

: I decided to trash the whole installation and start again. I downloaded
: last nights build and untarred it. Put the .war into
: $TOMCAT_HOME/webapps. Copied the example/solr directory as
: /var/www/html/solr. No JNDI file this time, just updated solrconfig to
: read /var/www/html/solr as my data.dir.

if you don't use JNDI or a system property to point solr at your
/var/www/html/solr directory, then it's never going to be able to find
your solrconfig.xml to know where your data directory is.

with a setup like that, besides the error you got in your browser trying
to load the admin page, you should have seen an exception in (one of) the
tomcat logs on startup, most likely a NoClassDefFoundError ... if you
dont' see an excpetion like that then you are *definiely* not seeing all
of your errors, maybe you've got ctomcat configured to not log them, or
maybe it's logging them someplace you arent' expecting, because based on
what you described you would definitely get one.




-Hoss



Re: Null Pointer Exception while indexing

2010-09-15 Thread Yonik Seeley
On Wed, Sep 15, 2010 at 1:12 PM, andrewdps  wrote:
>
> What could be possible error for
>
> 14-Sep-10 4:28:47 PM org.apache.solr.common.SolrException log
> SEVERE: java.util.concurrent.ExecutionException:
> java.lang.NullPointerException
>   at java.util.concurrent.FutureTask$Sync.innerGet(libgcj.so.90)

You're using GCJ, which isn't supported.  Use the Sun (now Oracle)
JVM, OpenJDK, or IBM's JVM.

-Yonik
http://lucenerevolution.org  Lucene/Solr Conference, Boston Oct 7-8


Re: Null Pointer Exception while indexing

2010-09-15 Thread andrewdps

I'm sorry,but how do I use that.Is that something to do with uninstalling
"gcu" and installing jvm and openJDK?

Thanks
-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/Null-Pointer-Exception-while-indexing-tp1481154p1481285.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Null Pointer Exception while indexing

2010-09-15 Thread andrewdps

I still get the same error when I try to index the mrc file...

This was the previous version of the Java on our server.
# java -version
java version "1.5.0"
gij (GNU libgcj) version 4.3.2

Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

And then I've installed openjdk which gives me

# java -version
java version "1.6.0_0"
OpenJDK  Runtime Environment (build 1.6.0_0-b11)
OpenJDK 64-Bit Server VM (build 1.6.0_0-b11, mixed mode)

Am I doing fine with the installation.
-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/Null-Pointer-Exception-while-indexing-tp1481154p1481410.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Null Pointer Exception while indexing

2010-09-16 Thread Lance Norskog
Which version of Solr? 1.4?, 1.4.1? 3.x branch? trunk? if the 3.x or the 
trunk, when did you pull it?


andrewdps wrote:

What could be possible error for

14-Sep-10 4:28:47 PM org.apache.solr.common.SolrException log
SEVERE: java.util.concurrent.ExecutionException:
java.lang.NullPointerException
at java.util.concurrent.FutureTask$Sync.innerGet(libgcj.so.90)
at java.util.concurrent.FutureTask.get(libgcj.so.90)
at
org.apache.solr.update.DirectUpdateHandler2.commit(DirectUpdateHandler2.java:439)
at
org.apache.solr.update.DirectUpdateHandler2$CommitTracker.run(DirectUpdateHandler2.java:602)
at java.util.concurrent.Executors$RunnableAdapter.call(libgcj.so.90)
at java.util.concurrent.FutureTask$Sync.innerRun(libgcj.so.90)
at java.util.concurrent.FutureTask.run(libgcj.so.90)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$2(libgcj.so.90)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(libgcj.so.90)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(libgcj.so.90)
at java.lang.Thread.run(libgcj.so.90)
Caused by: java.lang.NullPointerException
at
org.apache.solr.search.FastLRUCache.getStatistics(FastLRUCache.java:252)
at org.apache.solr.search.FastLRUCache.toString(FastLRUCache.java:280)
at java.lang.StringBuilder.append(libgcj.so.90)
at
org.apache.solr.search.SolrIndexSearcher.close(SolrIndexSearcher.java:223)
at org.apache.solr.core.SolrCore$6.close(SolrCore.java:1246)
at org.apache.solr.util.RefCounted.decref(RefCounted.java:57)
at org.apache.solr.core.SolrCore$5.call(SolrCore.java:1192)
at java.util.concurrent.FutureTask$Sync.innerRun(libgcj.so.90)
at java.util.concurrent.FutureTask.run(libgcj.so.90)
...3 more

I get this error(after indexing a few records I get the above error and
again starts indexing.i get the same error after indexing few hundred
records) when I try to index the marc record on the server.I worked fine on
the local system.

Thanks
   


Re: Null Pointer Exception while indexing

2010-09-16 Thread Israel Ekpo
Try removing the data directory and then restart your Servlet container and
see if that helps.

On Thu, Sep 16, 2010 at 3:28 AM, Lance Norskog  wrote:

> Which version of Solr? 1.4?, 1.4.1? 3.x branch? trunk? if the 3.x or the
> trunk, when did you pull it?
>
>
> andrewdps wrote:
>
>> What could be possible error for
>>
>> 14-Sep-10 4:28:47 PM org.apache.solr.common.SolrException log
>> SEVERE: java.util.concurrent.ExecutionException:
>> java.lang.NullPointerException
>>at java.util.concurrent.FutureTask$Sync.innerGet(libgcj.so.90)
>>at java.util.concurrent.FutureTask.get(libgcj.so.90)
>>at
>>
>> org.apache.solr.update.DirectUpdateHandler2.commit(DirectUpdateHandler2.java:439)
>>at
>>
>> org.apache.solr.update.DirectUpdateHandler2$CommitTracker.run(DirectUpdateHandler2.java:602)
>>at java.util.concurrent.Executors$RunnableAdapter.call(libgcj.so.90)
>>at java.util.concurrent.FutureTask$Sync.innerRun(libgcj.so.90)
>>at java.util.concurrent.FutureTask.run(libgcj.so.90)
>>at
>>
>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$2(libgcj.so.90)
>>at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(libgcj.so.90)
>>at java.util.concurrent.ThreadPoolExecutor$Worker.run(libgcj.so.90)
>>at java.lang.Thread.run(libgcj.so.90)
>> Caused by: java.lang.NullPointerException
>>at
>> org.apache.solr.search.FastLRUCache.getStatistics(FastLRUCache.java:252)
>>at org.apache.solr.search.FastLRUCache.toString(FastLRUCache.java:280)
>>at java.lang.StringBuilder.append(libgcj.so.90)
>>at
>> org.apache.solr.search.SolrIndexSearcher.close(SolrIndexSearcher.java:223)
>>at org.apache.solr.core.SolrCore$6.close(SolrCore.java:1246)
>>at org.apache.solr.util.RefCounted.decref(RefCounted.java:57)
>>at org.apache.solr.core.SolrCore$5.call(SolrCore.java:1192)
>>at java.util.concurrent.FutureTask$Sync.innerRun(libgcj.so.90)
>>at java.util.concurrent.FutureTask.run(libgcj.so.90)
>>...3 more
>>
>> I get this error(after indexing a few records I get the above error and
>> again starts indexing.i get the same error after indexing few hundred
>> records) when I try to index the marc record on the server.I worked fine
>> on
>> the local system.
>>
>> Thanks
>>
>>
>


-- 
°O°
"Good Enough" is not good enough.
To give anything less than your best is to sacrifice the gift.
Quality First. Measure Twice. Cut Once.
http://www.israelekpo.com/


Re: Null Pointer Exception while indexing

2010-09-16 Thread Yonik Seeley
On Wed, Sep 15, 2010 at 2:01 PM, andrewdps  wrote:
> I still get the same error when I try to index the mrc file...

If you get the exact same error, then you are still using GCJ.
When you type "java" it's probably going to GCJ because of your path
(i.e. change it or directly specify the path to the new JVM you just
installed).

-Yonik
http://lucenerevolution.org  Lucene/Solr Conference, Boston Oct 7-8


Re: Null Pointer Exception while indexing

2010-09-16 Thread andrewdps

Thanks for all the suggestions.

As far as JAVA is concerned,I'm worried to see different things.I'm afraid
if things are going wrong with the settings.

r...@zoombox:/etc# echo $JAVA_HOME
/usr/lib/jvm/default-java
r...@zoombox:/etc# java -version
java version "1.6.0_0"
OpenJDK  Runtime Environment (build 1.6.0_0-b11)
OpenJDK 64-Bit Server VM (build 1.6.0_0-b11, mixed mode)
r...@zoombox:/etc# locate javac |grep bin
/usr/bin/javac
/usr/lib/jvm/java-1.5.0-gcj-4.3-1.5.0.0/bin/javac
/usr/lib/jvm/java-6-sun-1.6.0.20/bin/javac

I've many sub-directories in JVM directory

default-java
java-6-sun-1.6.0.20
java-6-sun
java-6-openjdk
java-1.5.0-gcj-4.3-1.5.0.0
java-gcj

and the /etc/profile looks like

/etc# more profile
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).

if [ -d /etc/profile.d ]; then
  for i in /etc/profile.d/*.sh; do
if [ -r $i ]; then
  . $i
fi
  done
  unset i
fi

if [ "$PS1" ]; then
  if [ "$BASH" ]; then
PS1='\...@\h:\w\$ '
if [ -f /etc/bash.bashrc ]; then
. /etc/bash.bashrc
fi
  else
if [ "`id -u`" -eq 0 ]; then
  PS1='# '
else
  PS1='$ '
fi
  fi
fi

umask 022
export JAVA_HOME="/usr/lib/jvm/java-6-sun-1.6.0.20"
export PATH="$JAVA_HOME/bin:$PATH"

Please let me know what went wrong.
-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/Null-Pointer-Exception-while-indexing-tp1481154p1488279.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Null Pointer Exception while indexing

2010-09-16 Thread andrewdps

Also,the solr Java properties looks like this using gcj,despite setting
java_home in /etc/profile

jetty.logs = /usr/local/vufind/solr/jetty/logs
path.separator = :
java.vm.name = GNU libgcj
java.vm.specification.name = Java(tm) Virtual Machine Specification
java.runtime.version = 1.5.0
java.home = /usr/lib/jvm/java-1.5.0-gcj-4.3-1.5.0.0/jre
java.vm.specification.version = 1.0
line.separator = 


-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/Null-Pointer-Exception-while-indexing-tp1481154p1488292.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Null Pointer Exception while indexing

2010-09-16 Thread andrewdps

Lance,

We are on Solr Specification Version: 1.4.1
-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/Null-Pointer-Exception-while-indexing-tp1481154p1488320.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Null Pointer Exception while indexing

2010-09-16 Thread Thomas Joiner
My guess would be that Jetty has some configuration somewhere that is
telling it to use GCJ.  Is it possible to completely remove GCJ from the
system?  Another possibility would be to uninstall Jetty, and then reinstall
it, and hope that on the reinstall it would pick up on the OpenJDK.

What distro of linux are you using?  It probably depends on that how to set
the JVM.

On Thu, Sep 16, 2010 at 10:22 AM, andrewdps  wrote:

>
> Lance,
>
> We are on Solr Specification Version: 1.4.1
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Null-Pointer-Exception-while-indexing-tp1481154p1488320.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>


Re: Null Pointer Exception while indexing

2010-09-16 Thread Lance Norskog
Good eye, Thomas! Yes, GCJ is a non-starter. You're best off downloading 
Java 1.6 yourself, but I understand that it is easier to use the public 
package repositories.


Thomas Joiner wrote:

My guess would be that Jetty has some configuration somewhere that is
telling it to use GCJ.  Is it possible to completely remove GCJ from the
system?  Another possibility would be to uninstall Jetty, and then reinstall
it, and hope that on the reinstall it would pick up on the OpenJDK.

What distro of linux are you using?  It probably depends on that how to set
the JVM.

On Thu, Sep 16, 2010 at 10:22 AM, andrewdps  wrote:

   

Lance,

We are on Solr Specification Version: 1.4.1
--
View this message in context:
http://lucene.472066.n3.nabble.com/Null-Pointer-Exception-while-indexing-tp1481154p1488320.html
Sent from the Solr - User mailing list archive at Nabble.com.

 
   


Re: Null Pointer Exception while indexing

2010-09-16 Thread Lance Norskog
Andrew, you should download Solr from the apache site. This packaging is 
wrong-headed.


As to Java, a Linux person would know the system for picking which is 
the standard Java.


andrewdps wrote:

Also,the solr Java properties looks like this using gcj,despite setting
java_home in /etc/profile

jetty.logs = /usr/local/vufind/solr/jetty/logs
path.separator = :
java.vm.name = GNU libgcj
java.vm.specification.name = Java(tm) Virtual Machine Specification
java.runtime.version = 1.5.0
java.home = /usr/lib/jvm/java-1.5.0-gcj-4.3-1.5.0.0/jre
java.vm.specification.version = 1.0
line.separator =


   


Re: Null pointer exception when mixing highlighter & shards & q.alt

2010-09-07 Thread Marc Sturlese

I noticed that long ago.
Fixed it doing in HighlightComponent finishStage:
  @Override
  public void finishStage(ResponseBuilder rb) {
boolean hasHighlighting = true ;
if (rb.doHighlights && rb.stage == ResponseBuilder.STAGE_GET_FIELDS) {

  Map.Entry[] arr = new
NamedList.NamedListEntry[rb.resultIds.size()];

  // TODO: make a generic routine to do automatic merging of id keyed
data
  for (ShardRequest sreq : rb.finished) {
if ((sreq.purpose & ShardRequest.PURPOSE_GET_HIGHLIGHTS) == 0)
continue;
for (ShardResponse srsp : sreq.responses) {
  NamedList hl =
(NamedList)srsp.getSolrResponse().getResponse().get("highlighting");
  //patch bug
  if(hl != null) {
for (int i=0; ihttp://lucene.472066.n3.nabble.com/Null-pointer-exception-when-mixing-highlighter-shards-q-alt-tp1430353p1431253.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Null pointer exception when mixing highlighter & shards & q.alt

2010-09-07 Thread Ron Mayer
Marc Sturlese wrote:
> I noticed that long ago.
> Fixed it doing in HighlightComponent finishStage:
> ...
>   public void finishStage(ResponseBuilder rb) {
>...
>   }

Thanks!   I'll try that


I also seem to have a similar problem with shards + facets -- in particular
it seems like the error occurrs when some of the shards have no values for
some of the facets.

Any chance you (or anyone else) have a fix for that one too?

Here's the backtrace I'm getting from a few day old svn trunk.

Sep 7, 2010 6:03:58 AM org.apache.solr.common.SolrException log
SEVERE: java.lang.NullPointerException
at 
org.apache.solr.handler.component.FacetComponent.refineFacets(FacetComponent.java:340)
at 
org.apache.solr.handler.component.FacetComponent.handleResponses(FacetComponent.java:232)
at 
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:301)
at 
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1323)
at 
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:337)
at 
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:240)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
at 
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
at 
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at 
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at 
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at 
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
at 
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)


Re: Null pointer exception when mixing highlighter & shards & q.alt

2010-09-14 Thread Chris Hostetter

I didn't see any open Jira issues for this, so i created one...

https://issues.apache.org/jira/browse/SOLR-2121

: Date: Tue, 7 Sep 2010 01:35:39 -0700 (PDT)
: From: Marc Sturlese 
: Reply-To: solr-user@lucene.apache.org
: To: solr-user@lucene.apache.org
: Subject: Re: Null pointer exception when mixing highlighter & shards & q.alt
: 
: 
: I noticed that long ago.
: Fixed it doing in HighlightComponent finishStage:
:   @Override
:   public void finishStage(ResponseBuilder rb) {
: boolean hasHighlighting = true ;
: if (rb.doHighlights && rb.stage == ResponseBuilder.STAGE_GET_FIELDS) {
: 
:   Map.Entry[] arr = new
: NamedList.NamedListEntry[rb.resultIds.size()];
: 
:   // TODO: make a generic routine to do automatic merging of id keyed
: data
:   for (ShardRequest sreq : rb.finished) {
: if ((sreq.purpose & ShardRequest.PURPOSE_GET_HIGHLIGHTS) == 0)
: continue;
: for (ShardResponse srsp : sreq.responses) {
:   NamedList hl =
: (NamedList)srsp.getSolrResponse().getResponse().get("highlighting");
:   //patch bug
:   if(hl != null) {
: for (int i=0; ihttp://lucene.472066.n3.nabble.com/Null-pointer-exception-when-mixing-highlighter-shards-q-alt-tp1430353p1431253.html
: Sent from the Solr - User mailing list archive at Nabble.com.
: 

-Hoss

--
http://lucenerevolution.org/  ...  October 7-8, Boston
http://bit.ly/stump-hoss  ...  Stump The Chump!



Re: Null pointer exception on use of ImportDataHandler (useSolrAddSchema="true")

2009-03-18 Thread Shalin Shekhar Mangar
On Thu, Mar 19, 2009 at 1:29 AM, Sam Keen  wrote:

>
> What I am now attempting to do is leverage 'useSolrAddSchema="true"' .
> I have a URL the responds with a well formatted solr add xml (I'm able
> to add it by POSTing).  But when I try to add it using
> http://localhost:8983/solr/dataimport?command=full-import i get a null
> pointer exception.


You need to use XPathEntityProcessor. If you do not specify a processor, the
default is SqlEntityProcessor (used for DB imports).

Add the attribute processor="XPathEntityProcessor" to the entity and try.

-- 
Regards,
Shalin Shekhar Mangar.


Re: Null pointer exception on use of ImportDataHandler (useSolrAddSchema="true")

2009-03-18 Thread Sam Keen
that worked perfectly Shalin.  thanks so much for your help!

sam keen


On Wed, Mar 18, 2009 at 1:15 PM, Shalin Shekhar Mangar
 wrote:
> On Thu, Mar 19, 2009 at 1:29 AM, Sam Keen  wrote:
>
>>
>> What I am now attempting to do is leverage 'useSolrAddSchema="true"' .
>> I have a URL the responds with a well formatted solr add xml (I'm able
>> to add it by POSTing).  But when I try to add it using
>> http://localhost:8983/solr/dataimport?command=full-import i get a null
>> pointer exception.
>
>
> You need to use XPathEntityProcessor. If you do not specify a processor, the
> default is SqlEntityProcessor (used for DB imports).
>
> Add the attribute processor="XPathEntityProcessor" to the entity and try.
>
> --
> Regards,
> Shalin Shekhar Mangar.
>


Re: Null pointer exception on use of ImportDataHandler (useSolrAddSchema="true")

2009-03-19 Thread Sam Keen
guess I spoke to soon.  The above setup (with Shalin's fix) works for
a mock run of 2 records.  But when I try it with the production data
of about 450 records, I get this error.

again, any help is greatly appreciated

sam keen

Mar 19, 2009 3:59:20 PM
org.apache.solr.handler.dataimport.DataImporter doFullImport
INFO: Starting Full Import
Mar 19, 2009 3:59:20 PM org.apache.solr.core.SolrCore execute
INFO: [] webapp=/solr path=/dataimport params={command=full-import}
status=0 QTime=6
Mar 19, 2009 3:59:20 PM org.apache.solr.update.DirectUpdateHandler2 deleteAll
INFO: [] REMOVING ALL DOCUMENTS FROM INDEX
Mar 19, 2009 3:59:20 PM
org.apache.solr.handler.dataimport.HttpDataSource getData
INFO: Created URL to: http://local.smwe.com/factsheets/feed
Mar 19, 2009 3:59:36 PM
org.apache.solr.handler.dataimport.DataImporter doFullImport
SEVERE: Full Import failed
java.lang.RuntimeException: java.lang.IndexOutOfBoundsException:
Index: 3, Size: 3
at 
org.apache.solr.handler.dataimport.XPathRecordReader.streamRecords(XPathRecordReader.java:85)
at 
org.apache.solr.handler.dataimport.XPathEntityProcessor.initQuery(XPathEntityProcessor.java:226)
at 
org.apache.solr.handler.dataimport.XPathEntityProcessor.fetchNextRow(XPathEntityProcessor.java:180)
at 
org.apache.solr.handler.dataimport.XPathEntityProcessor.nextRow(XPathEntityProcessor.java:163)
at 
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:285)
at 
org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:178)
at 
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:136)
at 
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:334)
at 
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:386)
at 
org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:377)
Caused by: java.lang.IndexOutOfBoundsException: Index: 3, Size: 3
at java.util.ArrayList.RangeCheck(ArrayList.java:546)
at java.util.ArrayList.get(ArrayList.java:321)
at 
org.apache.solr.handler.dataimport.XPathEntityProcessor.readRow(XPathEntityProcessor.java:266)
at 
org.apache.solr.handler.dataimport.XPathEntityProcessor.access$100(XPathEntityProcessor.java:53)
at 
org.apache.solr.handler.dataimport.XPathEntityProcessor$1.handle(XPathEntityProcessor.java:229)
at 
org.apache.solr.handler.dataimport.XPathRecordReader$Node.parse(XPathRecordReader.java:149)
at 
org.apache.solr.handler.dataimport.XPathRecordReader$Node.parse(XPathRecordReader.java:174)
at 
org.apache.solr.handler.dataimport.XPathRecordReader$Node.parse(XPathRecordReader.java:174)
at 
org.apache.solr.handler.dataimport.XPathRecordReader$Node.access$000(XPathRecordReader.java:89)
at 
org.apache.solr.handler.dataimport.XPathRecordReader.streamRecords(XPathRecordReader.java:82)
... 9 more




On Wed, Mar 18, 2009 at 2:58 PM, Sam Keen  wrote:
> that worked perfectly Shalin.  thanks so much for your help!
>
> sam keen
>
>
> On Wed, Mar 18, 2009 at 1:15 PM, Shalin Shekhar Mangar
>  wrote:
>> On Thu, Mar 19, 2009 at 1:29 AM, Sam Keen  wrote:
>>
>>>
>>> What I am now attempting to do is leverage 'useSolrAddSchema="true"' .
>>> I have a URL the responds with a well formatted solr add xml (I'm able
>>> to add it by POSTing).  But when I try to add it using
>>> http://localhost:8983/solr/dataimport?command=full-import i get a null
>>> pointer exception.
>>
>>
>> You need to use XPathEntityProcessor. If you do not specify a processor, the
>> default is SqlEntityProcessor (used for DB imports).
>>
>> Add the attribute processor="XPathEntityProcessor" to the entity and try.
>>
>> --
>> Regards,
>> Shalin Shekhar Mangar.
>>
>


Re: Null pointer exception on use of ImportDataHandler (useSolrAddSchema="true")

2009-03-19 Thread Noble Paul നോബിള്‍ नोब्ळ्
it is a bug , I have raised an issue

https://issues.apache.org/jira/browse/SOLR-1077

On Fri, Mar 20, 2009 at 4:41 AM, Sam Keen  wrote:
> guess I spoke to soon.  The above setup (with Shalin's fix) works for
> a mock run of 2 records.  But when I try it with the production data
> of about 450 records, I get this error.
>
> again, any help is greatly appreciated
>
> sam keen
>
> Mar 19, 2009 3:59:20 PM
> org.apache.solr.handler.dataimport.DataImporter doFullImport
> INFO: Starting Full Import
> Mar 19, 2009 3:59:20 PM org.apache.solr.core.SolrCore execute
> INFO: [] webapp=/solr path=/dataimport params={command=full-import}
> status=0 QTime=6
> Mar 19, 2009 3:59:20 PM org.apache.solr.update.DirectUpdateHandler2 deleteAll
> INFO: [] REMOVING ALL DOCUMENTS FROM INDEX
> Mar 19, 2009 3:59:20 PM
> org.apache.solr.handler.dataimport.HttpDataSource getData
> INFO: Created URL to: http://local.smwe.com/factsheets/feed
> Mar 19, 2009 3:59:36 PM
> org.apache.solr.handler.dataimport.DataImporter doFullImport
> SEVERE: Full Import failed
> java.lang.RuntimeException: java.lang.IndexOutOfBoundsException:
> Index: 3, Size: 3
>        at 
> org.apache.solr.handler.dataimport.XPathRecordReader.streamRecords(XPathRecordReader.java:85)
>        at 
> org.apache.solr.handler.dataimport.XPathEntityProcessor.initQuery(XPathEntityProcessor.java:226)
>        at 
> org.apache.solr.handler.dataimport.XPathEntityProcessor.fetchNextRow(XPathEntityProcessor.java:180)
>        at 
> org.apache.solr.handler.dataimport.XPathEntityProcessor.nextRow(XPathEntityProcessor.java:163)
>        at 
> org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:285)
>        at 
> org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:178)
>        at 
> org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:136)
>        at 
> org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:334)
>        at 
> org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:386)
>        at 
> org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:377)
> Caused by: java.lang.IndexOutOfBoundsException: Index: 3, Size: 3
>        at java.util.ArrayList.RangeCheck(ArrayList.java:546)
>        at java.util.ArrayList.get(ArrayList.java:321)
>        at 
> org.apache.solr.handler.dataimport.XPathEntityProcessor.readRow(XPathEntityProcessor.java:266)
>        at 
> org.apache.solr.handler.dataimport.XPathEntityProcessor.access$100(XPathEntityProcessor.java:53)
>        at 
> org.apache.solr.handler.dataimport.XPathEntityProcessor$1.handle(XPathEntityProcessor.java:229)
>        at 
> org.apache.solr.handler.dataimport.XPathRecordReader$Node.parse(XPathRecordReader.java:149)
>        at 
> org.apache.solr.handler.dataimport.XPathRecordReader$Node.parse(XPathRecordReader.java:174)
>        at 
> org.apache.solr.handler.dataimport.XPathRecordReader$Node.parse(XPathRecordReader.java:174)
>        at 
> org.apache.solr.handler.dataimport.XPathRecordReader$Node.access$000(XPathRecordReader.java:89)
>        at 
> org.apache.solr.handler.dataimport.XPathRecordReader.streamRecords(XPathRecordReader.java:82)
>        ... 9 more
>
>
>
>
> On Wed, Mar 18, 2009 at 2:58 PM, Sam Keen  wrote:
>> that worked perfectly Shalin.  thanks so much for your help!
>>
>> sam keen
>>
>>
>> On Wed, Mar 18, 2009 at 1:15 PM, Shalin Shekhar Mangar
>>  wrote:
>>> On Thu, Mar 19, 2009 at 1:29 AM, Sam Keen  wrote:
>>>

 What I am now attempting to do is leverage 'useSolrAddSchema="true"' .
 I have a URL the responds with a well formatted solr add xml (I'm able
 to add it by POSTing).  But when I try to add it using
 http://localhost:8983/solr/dataimport?command=full-import i get a null
 pointer exception.
>>>
>>>
>>> You need to use XPathEntityProcessor. If you do not specify a processor, the
>>> default is SqlEntityProcessor (used for DB imports).
>>>
>>> Add the attribute processor="XPathEntityProcessor" to the entity and try.
>>>
>>> --
>>> Regards,
>>> Shalin Shekhar Mangar.
>>>
>>
>



-- 
--Noble Paul


Re: Null pointer exception on use of ImportDataHandler (useSolrAddSchema="true")

2009-03-20 Thread Sam Keen
thanks,
I applied the patch in SOLR-1077 and this is now fixed for me (i
updated the bug w/ a comment)

sam keen

2009/3/19 Noble Paul നോബിള്‍  नोब्ळ् :
> it is a bug , I have raised an issue
>
> https://issues.apache.org/jira/browse/SOLR-1077
>
> On Fri, Mar 20, 2009 at 4:41 AM, Sam Keen  wrote:
>> guess I spoke to soon.  The above setup (with Shalin's fix) works for
>> a mock run of 2 records.  But when I try it with the production data
>> of about 450 records, I get this error.
>>
>> again, any help is greatly appreciated
>>
>> sam keen
>>
>> Mar 19, 2009 3:59:20 PM
>> org.apache.solr.handler.dataimport.DataImporter doFullImport
>> INFO: Starting Full Import
>> Mar 19, 2009 3:59:20 PM org.apache.solr.core.SolrCore execute
>> INFO: [] webapp=/solr path=/dataimport params={command=full-import}
>> status=0 QTime=6
>> Mar 19, 2009 3:59:20 PM org.apache.solr.update.DirectUpdateHandler2 deleteAll
>> INFO: [] REMOVING ALL DOCUMENTS FROM INDEX
>> Mar 19, 2009 3:59:20 PM
>> org.apache.solr.handler.dataimport.HttpDataSource getData
>> INFO: Created URL to: http://local.smwe.com/factsheets/feed
>> Mar 19, 2009 3:59:36 PM
>> org.apache.solr.handler.dataimport.DataImporter doFullImport
>> SEVERE: Full Import failed
>> java.lang.RuntimeException: java.lang.IndexOutOfBoundsException:
>> Index: 3, Size: 3
>>        at 
>> org.apache.solr.handler.dataimport.XPathRecordReader.streamRecords(XPathRecordReader.java:85)
>>        at 
>> org.apache.solr.handler.dataimport.XPathEntityProcessor.initQuery(XPathEntityProcessor.java:226)
>>        at 
>> org.apache.solr.handler.dataimport.XPathEntityProcessor.fetchNextRow(XPathEntityProcessor.java:180)
>>        at 
>> org.apache.solr.handler.dataimport.XPathEntityProcessor.nextRow(XPathEntityProcessor.java:163)
>>        at 
>> org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:285)
>>        at 
>> org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:178)
>>        at 
>> org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:136)
>>        at 
>> org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:334)
>>        at 
>> org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:386)
>>        at 
>> org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:377)
>> Caused by: java.lang.IndexOutOfBoundsException: Index: 3, Size: 3
>>        at java.util.ArrayList.RangeCheck(ArrayList.java:546)
>>        at java.util.ArrayList.get(ArrayList.java:321)
>>        at 
>> org.apache.solr.handler.dataimport.XPathEntityProcessor.readRow(XPathEntityProcessor.java:266)
>>        at 
>> org.apache.solr.handler.dataimport.XPathEntityProcessor.access$100(XPathEntityProcessor.java:53)
>>        at 
>> org.apache.solr.handler.dataimport.XPathEntityProcessor$1.handle(XPathEntityProcessor.java:229)
>>        at 
>> org.apache.solr.handler.dataimport.XPathRecordReader$Node.parse(XPathRecordReader.java:149)
>>        at 
>> org.apache.solr.handler.dataimport.XPathRecordReader$Node.parse(XPathRecordReader.java:174)
>>        at 
>> org.apache.solr.handler.dataimport.XPathRecordReader$Node.parse(XPathRecordReader.java:174)
>>        at 
>> org.apache.solr.handler.dataimport.XPathRecordReader$Node.access$000(XPathRecordReader.java:89)
>>        at 
>> org.apache.solr.handler.dataimport.XPathRecordReader.streamRecords(XPathRecordReader.java:82)
>>        ... 9 more
>>
>>
>>
>>
>> On Wed, Mar 18, 2009 at 2:58 PM, Sam Keen  wrote:
>>> that worked perfectly Shalin.  thanks so much for your help!
>>>
>>> sam keen
>>>
>>>
>>> On Wed, Mar 18, 2009 at 1:15 PM, Shalin Shekhar Mangar
>>>  wrote:
 On Thu, Mar 19, 2009 at 1:29 AM, Sam Keen  wrote:

>
> What I am now attempting to do is leverage 'useSolrAddSchema="true"' .
> I have a URL the responds with a well formatted solr add xml (I'm able
> to add it by POSTing).  But when I try to add it using
> http://localhost:8983/solr/dataimport?command=full-import i get a null
> pointer exception.


 You need to use XPathEntityProcessor. If you do not specify a processor, 
 the
 default is SqlEntityProcessor (used for DB imports).

 Add the attribute processor="XPathEntityProcessor" to the entity and try.

 --
 Regards,
 Shalin Shekhar Mangar.

>>>
>>
>
>
>
> --
> --Noble Paul
>


Re: Null Pointer Exception with shards&facets where some shards have no values for some facets.

2010-09-07 Thread Yonik Seeley
Thanks for the report Ron, can you open a JIRA issue?
What version of Solr is this?

-Yonik
http://lucenerevolution.org Lucene/Solr Conference, Boston Oct 7-8


On Tue, Sep 7, 2010 at 8:31 PM, Ron Mayer  wrote:
> Short summary:
>  * Mixing Facets and Shards give me a NullPointerException
>    when not all docs have all facets.
>  * Attached patch improves the failure mode, but still
>    spews errors in the log file
>  * Suggestions how to fix that would be appreciated.
>
>
> In my system, I tried separating out a couple similar but different
> types of documents into a couple different shards.
>
> Both shards have the identical schema; with the facets defined as a 
> dynamicfield:
>   stored="false" multiValued="true"  />
> Some facets only have documents with a value for them in the first shard,
> Other facets only have documents with a value for them in the second shard.
>
> When I try to do a query that asks for a facet.field that's only
> has values in the first shard, and for a different facet.field
> that only has values in the second shard, I'm getting this
> exception:
>
> Sep 7, 2010 4:55:38 PM org.apache.solr.common.SolrException log
> SEVERE: java.lang.NullPointerException
>        at 
> org.apache.solr.handler.component.FacetComponent.refineFacets(FacetComponent.java:340)
>        at 
> org.apache.solr.handler.component.FacetComponent.handleResponses(FacetComponent.java:232)
>        at 
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:301)
>        at 
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
>        at org.apache.solr.core.SolrCore.execute(SolrCore.java:1323)
>        at 
> org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:337)
>        at 
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:240)
>        at 
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
>        at 
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
>        at 
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>        at 
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
>        at 
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
>        at 
> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
>        at 
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
>        at 
> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>        at 
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>        at org.mortbay.jetty.Server.handle(Server.java:326)
>        at 
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
>        at 
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
>        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
>        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
>        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>        at 
> org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
>        at 
> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
>
> I don't have a real simple test case yet; but could work on one if
> it'd make it easier to track down.    Also, I could post the schema
> and solrconfig if that'd help.
>
>
>
>
>
> The attached patch seems to mostly work for me; in that it's returning
> valid search results and at least some facet information, but with
> that patch I'm then getting this exception showing up:
>
> Sep 7, 2010 5:28:30 PM org.apache.solr.common.SolrException log
> SEVERE: Exception during facet 
> counts:org.apache.lucene.queryParser.ParseException: Expected identifier at 
> pos 20 str='{!terms=$involvement/race_facet__terms}involvement/race_facet'
>        at 
> org.apache.solr.search.QueryParsing$StrParser.getId(QueryParsing.java:718)
>        at 
> org.apache.solr.search.QueryParsing.parseLocalParams(QueryParsing.java:165)
>        at 
> org.apache.solr.search.QueryParsing.getLocalParams(QueryParsing.java:221)
>        at 
> org.apache.solr.request.SimpleFacets.parseParams(SimpleFacets.java:102)
>        at 
> org.apache.solr.request.SimpleFacets.getFacetFieldCounts(SimpleFacets.java:327)
>        at 
> org.apache.solr.request.SimpleFacets.getFacetCounts(SimpleFacets.java:188)
>        at 
> org.apache.solr.handler.component.FacetComponent.process(FacetComponent.java:72)
>        at 
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:206)
>        at 
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
>        at org.apache.solr.core.SolrCore.execute(SolrCore.java:1323)
>        at 
> org.apache.solr.servlet.SolrDispatchFilter.execute(Sol

Re: Null Pointer Exception with shards&facets where some shards have no values for some facets.

2010-09-07 Thread Ron Mayer
Yonik Seeley wrote:
> Thanks for the report Ron, can you open a JIRA issue?

Sure.  I'll do it at work tomorrow morning, hopefully
after I try to verify with a standalone test case.

> What version of Solr is this?

This is trunk as of a few days ago.   I can update to
the latest trunk and check there too.


> -Yonik
> http://lucenerevolution.org Lucene/Solr Conference, Boston Oct 7-8
> 
> 
> On Tue, Sep 7, 2010 at 8:31 PM, Ron Mayer  wrote:
>> Short summary:
>>  * Mixing Facets and Shards give me a NullPointerException
>>when not all docs have all facets.
>>  * Attached patch improves the failure mode, but still
>>spews errors in the log file
>>  * Suggestions how to fix that would be appreciated.
>>
>>
>> In my system, I tried separating out a couple similar but different
>> types of documents into a couple different shards.
>>
>> Both shards have the identical schema; with the facets defined as a 
>> dynamicfield:
>>  > stored="false" multiValued="true"  />
>> Some facets only have documents with a value for them in the first shard,
>> Other facets only have documents with a value for them in the second shard.
>>
>> When I try to do a query that asks for a facet.field that's only
>> has values in the first shard, and for a different facet.field
>> that only has values in the second shard, I'm getting this
>> exception:
>>
>> Sep 7, 2010 4:55:38 PM org.apache.solr.common.SolrException log
>> SEVERE: java.lang.NullPointerException
>>at 
>> org.apache.solr.handler.component.FacetComponent.refineFacets(FacetComponent.java:340)
>>at 
>> org.apache.solr.handler.component.FacetComponent.handleResponses(FacetComponent.java:232)
>>at 
>> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:301)
>>at 
>> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
>>at org.apache.solr.core.SolrCore.execute(SolrCore.java:1323)
>>at 
>> org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:337)
>>at 
>> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:240)
>>at 
>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
>>at 
>> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
>>at 
>> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>>at 
>> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
>>at 
>> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
>>at 
>> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
>>at 
>> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
>>at 
>> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>>at 
>> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>>at org.mortbay.jetty.Server.handle(Server.java:326)
>>at 
>> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
>>at 
>> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
>>at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
>>at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
>>at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>>at 
>> org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
>>at 
>> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
>>
>> I don't have a real simple test case yet; but could work on one if
>> it'd make it easier to track down.Also, I could post the schema
>> and solrconfig if that'd help.
>>
>>
>>
>>
>>
>> The attached patch seems to mostly work for me; in that it's returning
>> valid search results and at least some facet information, but with
>> that patch I'm then getting this exception showing up:
>>
>> Sep 7, 2010 5:28:30 PM org.apache.solr.common.SolrException log
>> SEVERE: Exception during facet 
>> counts:org.apache.lucene.queryParser.ParseException: Expected identifier at 
>> pos 20 str='{!terms=$involvement/race_facet__terms}involvement/race_facet'
>>at 
>> org.apache.solr.search.QueryParsing$StrParser.getId(QueryParsing.java:718)
>>at 
>> org.apache.solr.search.QueryParsing.parseLocalParams(QueryParsing.java:165)
>>at 
>> org.apache.solr.search.QueryParsing.getLocalParams(QueryParsing.java:221)
>>at 
>> org.apache.solr.request.SimpleFacets.parseParams(SimpleFacets.java:102)
>>at 
>> org.apache.solr.request.SimpleFacets.getFacetFieldCounts(SimpleFacets.java:327)
>>at 
>> org.apache.solr.request.SimpleFacets.getFacetCounts(SimpleFacets.java:188)
>>at 
>> org.apache.solr.handler.component.FacetComponent.process(FacetComponent.java:72)
>>a

Re: Null Pointer Exception with shards&facets where some shards have no values for some facets.

2010-09-08 Thread Yonik Seeley
On Tue, Sep 7, 2010 at 8:31 PM, Ron Mayer  wrote:
> Short summary:
>  * Mixing Facets and Shards give me a NullPointerException
>    when not all docs have all facets.

https://issues.apache.org/jira/browse/SOLR-2110

I believe the underlying real issue stemmed from your use of a complex
key "involvement/race_facet".

-Yonik
http://lucenerevolution.org  Lucene/Solr Conference, Boston Oct 7-8


Re: Null Pointer Exception with shards&facets where some shards have no values for some facets.

2010-09-08 Thread Ron Mayer
Yonik Seeley wrote:
> On Tue, Sep 7, 2010 at 8:31 PM, Ron Mayer  wrote:
>> Short summary:
>>  * Mixing Facets and Shards give me a NullPointerException
>>when not all docs have all facets.
> 
> https://issues.apache.org/jira/browse/SOLR-2110
> 
> I believe the underlying real issue stemmed from your use of a complex
> key "involvement/race_facet".

Thanks!Yes - that looks like the actual reason, rather than what
I was guessing. I spent a while this morning trying to reproduce the
problem with a simpler example, and wasn't able to - probably because
I overlooked that part.


I see changes have been made (based on comments in) SOLR-2110 and
SOLR-2111, so I'll try with the current trunk..
 [trying now with trunk as of a few minutes ago]
Looking much better.

I'm seeing this in the log files:
SEVERE: Exception during facet.field of 
{!terms=$involvement/gender_facet__terms}involvement/gender_facet:org.a
pache.lucene.queryParser.ParseException: Expected identifier at pos 20 
str='{!terms=$involvement/gender_facet__
terms}involvement/gender_facet'
at 
org.apache.solr.search.QueryParsing$StrParser.getId(QueryParsing.java:718)
at 
org.apache.solr.search.QueryParsing.parseLocalParams(QueryParsing.java:165)
...
but at least I'm getting results, and results that look right for both the body 
of
the document and for most of the facets.

Perhaps next thing I try will be simplifying my keys for my own sanity as much
as for solr's.


Re: Null Pointer Exception with shards&facets where some shards have no values for some facets.

2010-09-08 Thread Yonik Seeley
I just checked in the last part of those changes that should eliminate
any restriction on key.
But, that last part dealt with escaping keys that contained whitespace or }
Your example really should have worked after my previous 2 commits.
Perhaps not all of the servers got successfully upgraded?
Can you try trunk again now?

-Yonik
http://lucenerevolution.org  Lucene/Solr Conference, Boston Oct 7-8

On Wed, Sep 8, 2010 at 6:28 PM, Ron Mayer  wrote:
> Yonik Seeley wrote:
>> On Tue, Sep 7, 2010 at 8:31 PM, Ron Mayer  wrote:
>>> Short summary:
>>>  * Mixing Facets and Shards give me a NullPointerException
>>>    when not all docs have all facets.
>>
>> https://issues.apache.org/jira/browse/SOLR-2110
>>
>> I believe the underlying real issue stemmed from your use of a complex
>> key "involvement/race_facet".
>
> Thanks!    Yes - that looks like the actual reason, rather than what
> I was guessing. I spent a while this morning trying to reproduce the
> problem with a simpler example, and wasn't able to - probably because
> I overlooked that part.
>
>
> I see changes have been made (based on comments in) SOLR-2110 and
> SOLR-2111, so I'll try with the current trunk..
>     [trying now with trunk as of a few minutes ago]
> Looking much better.
>
> I'm seeing this in the log files:
> SEVERE: Exception during facet.field of 
> {!terms=$involvement/gender_facet__terms}involvement/gender_facet:org.a
> pache.lucene.queryParser.ParseException: Expected identifier at pos 20 
> str='{!terms=$involvement/gender_facet__
> terms}involvement/gender_facet'
>        at 
> org.apache.solr.search.QueryParsing$StrParser.getId(QueryParsing.java:718)
>        at 
> org.apache.solr.search.QueryParsing.parseLocalParams(QueryParsing.java:165)
>        ...
> but at least I'm getting results, and results that look right for both the 
> body of
> the document and for most of the facets.
>
> Perhaps next thing I try will be simplifying my keys for my own sanity as much
> as for solr's.
>


Re: Null Pointer Exception with shards&facets where some shards have no values for some facets.

2010-09-08 Thread Ron Mayer
Yonik Seeley wrote:
> I just checked in the last part of those changes that should eliminate
> any restriction on key.
> But, that last part dealt with escaping keys that contained whitespace or }
> Your example really should have worked after my previous 2 commits.
> Perhaps not all of the servers got successfully upgraded?

Yes, quite possible.

> Can you try trunk again now?

Will check sometime tomorrow.


Re: Null Pointer Exception with shards&facets where some shards have no values for some facets.

2010-09-10 Thread Ron Mayer
Ron Mayer wrote:
> Yonik Seeley wrote:
>> I just checked in the last part of those changes that should eliminate
>> any restriction on key.
>> But, that last part dealt with escaping keys that contained whitespace or }
>> Your example really should have worked after my previous 2 commits.
>> Perhaps not all of the servers got successfully upgraded?
> 
> Yes, quite possible.
> 
>> Can you try trunk again now?
> 
> Will check sometime tomorrow.


Yes, looks good now.
Thanks!



Re: Null Pointer Exception with shards&facets where some shards have no values for some facets.

2010-09-10 Thread Yonik Seeley
On Fri, Sep 10, 2010 at 7:21 PM, Ron Mayer  wrote:
> Ron Mayer wrote:
> Yes, looks good now.
> Thanks!

Great, thanks for the report!

-Yonik
http://lucenerevolution.org  Lucene/Solr Conference, Boston Oct 7-8