[jira] [Commented] (SOLR-7462) ArrayIndexOutOfBoundsException in RecordingJSONParser.java

2015-05-01 Thread Scott Dawson (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-7462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14523645#comment-14523645
 ] 

Scott Dawson commented on SOLR-7462:


I've attached a JSON file which can be used to reproduce the bug. I'm posting 
it to Solr like this:
curl 
'http://localhost:8983/solr/struct-json/update/json/docs?split=/&f=/**&srcField=display_json'
 -H 'Content-Type:application/json' --data-binary @SOLR-7462.test.json

This causes the ArrayIndexOutOfBoundsException with out-of-the-box Solr 5.1 but 
works fine with my patched version.

> ArrayIndexOutOfBoundsException in RecordingJSONParser.java
> --
>
> Key: SOLR-7462
> URL: https://issues.apache.org/jira/browse/SOLR-7462
> Project: Solr
>  Issue Type: Bug
>Affects Versions: 5.1
>Reporter: Scott Dawson
> Attachments: SOLR-7462.patch, SOLR-7462.test.json
>
>
> With Solr 5.1 I'm getting an occasional fatal exception during indexing. It's 
> an ArrayIndexOutOfBoundsException at line 61 of 
> org/apache/solr/util/RecordingJSONParser.java. Looking at the code (see 
> below), it seems obvious that the if-statement at line 60 should use a 
> greater-than sign instead of greater-than-or-equals.
>   @Override
>   public CharArr getStringChars() throws IOException {
> CharArr chars = super.getStringChars();
> recordStr(chars.toString());
> position = getPosition();
> // if reading a String , the getStringChars do not return the closing 
> single quote or double quote
> //so, try to capture that
> if(chars.getArray().length >=chars.getStart()+chars.size()) { // line 
> 60
>   char next = chars.getArray()[chars.getStart() + chars.size()]; // line 
> 61
>   if(next =='"' || next == '\'') {
> recordChar(next);
>   }
> }
> return chars;
>   }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (SOLR-7462) ArrayIndexOutOfBoundsException in RecordingJSONParser.java

2015-05-01 Thread Scott Dawson (JIRA)

 [ 
https://issues.apache.org/jira/browse/SOLR-7462?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Scott Dawson updated SOLR-7462:
---
Attachment: SOLR-7462.test.json

> ArrayIndexOutOfBoundsException in RecordingJSONParser.java
> --
>
> Key: SOLR-7462
> URL: https://issues.apache.org/jira/browse/SOLR-7462
> Project: Solr
>  Issue Type: Bug
>Affects Versions: 5.1
>Reporter: Scott Dawson
> Attachments: SOLR-7462.patch, SOLR-7462.test.json
>
>
> With Solr 5.1 I'm getting an occasional fatal exception during indexing. It's 
> an ArrayIndexOutOfBoundsException at line 61 of 
> org/apache/solr/util/RecordingJSONParser.java. Looking at the code (see 
> below), it seems obvious that the if-statement at line 60 should use a 
> greater-than sign instead of greater-than-or-equals.
>   @Override
>   public CharArr getStringChars() throws IOException {
> CharArr chars = super.getStringChars();
> recordStr(chars.toString());
> position = getPosition();
> // if reading a String , the getStringChars do not return the closing 
> single quote or double quote
> //so, try to capture that
> if(chars.getArray().length >=chars.getStart()+chars.size()) { // line 
> 60
>   char next = chars.getArray()[chars.getStart() + chars.size()]; // line 
> 61
>   if(next =='"' || next == '\'') {
> recordChar(next);
>   }
> }
> return chars;
>   }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-7462) ArrayIndexOutOfBoundsException in RecordingJSONParser.java

2015-04-30 Thread Scott Dawson (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-7462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14521528#comment-14521528
 ] 

Scott Dawson commented on SOLR-7462:


Shawn, Erick - is it likely that this patch will be included in Solr 5.2?

> ArrayIndexOutOfBoundsException in RecordingJSONParser.java
> --
>
> Key: SOLR-7462
> URL: https://issues.apache.org/jira/browse/SOLR-7462
> Project: Solr
>  Issue Type: Bug
>Affects Versions: 5.1
>Reporter: Scott Dawson
> Attachments: SOLR-7462.patch
>
>
> With Solr 5.1 I'm getting an occasional fatal exception during indexing. It's 
> an ArrayIndexOutOfBoundsException at line 61 of 
> org/apache/solr/util/RecordingJSONParser.java. Looking at the code (see 
> below), it seems obvious that the if-statement at line 60 should use a 
> greater-than sign instead of greater-than-or-equals.
>   @Override
>   public CharArr getStringChars() throws IOException {
> CharArr chars = super.getStringChars();
> recordStr(chars.toString());
> position = getPosition();
> // if reading a String , the getStringChars do not return the closing 
> single quote or double quote
> //so, try to capture that
> if(chars.getArray().length >=chars.getStart()+chars.size()) { // line 
> 60
>   char next = chars.getArray()[chars.getStart() + chars.size()]; // line 
> 61
>   if(next =='"' || next == '\'') {
> recordChar(next);
>   }
> }
> return chars;
>   }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-7462) ArrayIndexOutOfBoundsException in RecordingJSONParser.java

2015-04-27 Thread Scott Dawson (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-7462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14514359#comment-14514359
 ] 

Scott Dawson commented on SOLR-7462:


Patch file attached. I can now index the JSON that failed before. I started 
from tags/lucene_solr_5_1_0 as Shawn suggested.

> ArrayIndexOutOfBoundsException in RecordingJSONParser.java
> --
>
> Key: SOLR-7462
> URL: https://issues.apache.org/jira/browse/SOLR-7462
> Project: Solr
>  Issue Type: Bug
>Affects Versions: 5.1
>Reporter: Scott Dawson
> Attachments: SOLR-7462.patch
>
>
> With Solr 5.1 I'm getting an occasional fatal exception during indexing. It's 
> an ArrayIndexOutOfBoundsException at line 61 of 
> org/apache/solr/util/RecordingJSONParser.java. Looking at the code (see 
> below), it seems obvious that the if-statement at line 60 should use a 
> greater-than sign instead of greater-than-or-equals.
>   @Override
>   public CharArr getStringChars() throws IOException {
> CharArr chars = super.getStringChars();
> recordStr(chars.toString());
> position = getPosition();
> // if reading a String , the getStringChars do not return the closing 
> single quote or double quote
> //so, try to capture that
> if(chars.getArray().length >=chars.getStart()+chars.size()) { // line 
> 60
>   char next = chars.getArray()[chars.getStart() + chars.size()]; // line 
> 61
>   if(next =='"' || next == '\'') {
> recordChar(next);
>   }
> }
> return chars;
>   }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (SOLR-7462) ArrayIndexOutOfBoundsException in RecordingJSONParser.java

2015-04-27 Thread Scott Dawson (JIRA)

 [ 
https://issues.apache.org/jira/browse/SOLR-7462?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Scott Dawson updated SOLR-7462:
---
Attachment: SOLR-7462.patch

> ArrayIndexOutOfBoundsException in RecordingJSONParser.java
> --
>
> Key: SOLR-7462
> URL: https://issues.apache.org/jira/browse/SOLR-7462
> Project: Solr
>  Issue Type: Bug
>Affects Versions: 5.1
>Reporter: Scott Dawson
> Attachments: SOLR-7462.patch
>
>
> With Solr 5.1 I'm getting an occasional fatal exception during indexing. It's 
> an ArrayIndexOutOfBoundsException at line 61 of 
> org/apache/solr/util/RecordingJSONParser.java. Looking at the code (see 
> below), it seems obvious that the if-statement at line 60 should use a 
> greater-than sign instead of greater-than-or-equals.
>   @Override
>   public CharArr getStringChars() throws IOException {
> CharArr chars = super.getStringChars();
> recordStr(chars.toString());
> position = getPosition();
> // if reading a String , the getStringChars do not return the closing 
> single quote or double quote
> //so, try to capture that
> if(chars.getArray().length >=chars.getStart()+chars.size()) { // line 
> 60
>   char next = chars.getArray()[chars.getStart() + chars.size()]; // line 
> 61
>   if(next =='"' || next == '\'') {
> recordChar(next);
>   }
> }
> return chars;
>   }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-7462) ArrayIndexOutOfBoundsException in RecordingJSONParser.java

2015-04-24 Thread Scott Dawson (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-7462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14511462#comment-14511462
 ] 

Scott Dawson commented on SOLR-7462:


Shawn, Erick - Thanks. I'll follow your instructions and report back when I 
have some test results.

> ArrayIndexOutOfBoundsException in RecordingJSONParser.java
> --
>
> Key: SOLR-7462
> URL: https://issues.apache.org/jira/browse/SOLR-7462
> Project: Solr
>  Issue Type: Bug
>Affects Versions: 5.1
>Reporter: Scott Dawson
>
> With Solr 5.1 I'm getting an occasional fatal exception during indexing. It's 
> an ArrayIndexOutOfBoundsException at line 61 of 
> org/apache/solr/util/RecordingJSONParser.java. Looking at the code (see 
> below), it seems obvious that the if-statement at line 60 should use a 
> greater-than sign instead of greater-than-or-equals.
>   @Override
>   public CharArr getStringChars() throws IOException {
> CharArr chars = super.getStringChars();
> recordStr(chars.toString());
> position = getPosition();
> // if reading a String , the getStringChars do not return the closing 
> single quote or double quote
> //so, try to capture that
> if(chars.getArray().length >=chars.getStart()+chars.size()) { // line 
> 60
>   char next = chars.getArray()[chars.getStart() + chars.size()]; // line 
> 61
>   if(next =='"' || next == '\'') {
> recordChar(next);
>   }
> }
> return chars;
>   }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-7462) ArrayIndexOutOfBoundsException in RecordingJSONParser.java

2015-04-24 Thread Scott Dawson (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-7462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14511155#comment-14511155
 ] 

Scott Dawson commented on SOLR-7462:


Shawn - no, I haven't tried patching it myself. I haven't built Solr before so 
I'll do some research on what is required...

Our target environment is Java 1.8. Should I build with 1.8 or 1.7?

> ArrayIndexOutOfBoundsException in RecordingJSONParser.java
> --
>
> Key: SOLR-7462
> URL: https://issues.apache.org/jira/browse/SOLR-7462
> Project: Solr
>  Issue Type: Bug
>Affects Versions: 5.1
>Reporter: Scott Dawson
>
> With Solr 5.1 I'm getting an occasional fatal exception during indexing. It's 
> an ArrayIndexOutOfBoundsException at line 61 of 
> org/apache/solr/util/RecordingJSONParser.java. Looking at the code (see 
> below), it seems obvious that the if-statement at line 60 should use a 
> greater-than sign instead of greater-than-or-equals.
>   @Override
>   public CharArr getStringChars() throws IOException {
> CharArr chars = super.getStringChars();
> recordStr(chars.toString());
> position = getPosition();
> // if reading a String , the getStringChars do not return the closing 
> single quote or double quote
> //so, try to capture that
> if(chars.getArray().length >=chars.getStart()+chars.size()) { // line 
> 60
>   char next = chars.getArray()[chars.getStart() + chars.size()]; // line 
> 61
>   if(next =='"' || next == '\'') {
> recordChar(next);
>   }
> }
> return chars;
>   }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-7462) ArrayIndexOutOfBoundsException in RecordingJSONParser.java

2015-04-24 Thread Scott Dawson (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-7462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14511141#comment-14511141
 ] 

Scott Dawson commented on SOLR-7462:


A little more info about what I'm doing when the exception occurs... This 
happens sporadically when I'm indexing custom JSON:
$ curl 
'http://localhost:8983/solr/struct-json/update/json/docs?split=/&f=/**&srcField=display_json'
 -H 'Content-Type:application/json' --data-binary @tg.json

Here's the full stacktrace:
java.lang.ArrayIndexOutOfBoundsException:
at 
org.apache.solr.util.RecordingJSONParser.getStringChars(RecordingJSONParser.java:61)
at org.noggit.JSONParser.getString(JSONParser.java:1017)
at 
org.apache.solr.common.util.JsonRecordReader.parseSingleFieldValue(JsonRecordReader.java:513)
at 
org.apache.solr.common.util.JsonRecordReader.parseArrayFieldValue(JsonRecordReader.java:565)
at 
org.apache.solr.common.util.JsonRecordReader.parseSingleFieldValue(JsonRecordReader.java:526)
at 
org.apache.solr.common.util.JsonRecordReader$Node.handleObjectStart(JsonRecordReader.java:384)
at 
org.apache.solr.common.util.JsonRecordReader$Node.access$300(JsonRecordReader.java:154)
at 
org.apache.solr.common.util.JsonRecordReader$Node$1Wrapper.walk(JsonRecordReader.java:345)
at 
org.apache.solr.common.util.JsonRecordReader.parseSingleFieldValue(JsonRecordReader.java:529)
at 
org.apache.solr.common.util.JsonRecordReader$Node.handleObjectStart(JsonRecordReader.java:384)
at 
org.apache.solr.common.util.JsonRecordReader$Node.access$300(JsonRecordReader.java:154)
at 
org.apache.solr.common.util.JsonRecordReader$Node$1Wrapper.walk(JsonRecordReader.java:345)
at 
org.apache.solr.common.util.JsonRecordReader.parseSingleFieldValue(JsonRecordReader.java:529)
at 
org.apache.solr.common.util.JsonRecordReader.parseArrayFieldValue(JsonRecordReader.java:565)
at 
org.apache.solr.common.util.JsonRecordReader.parseSingleFieldValue(JsonRecordReader.java:526)
at 
org.apache.solr.common.util.JsonRecordReader$Node.handleObjectStart(JsonRecordReader.java:384)
at 
org.apache.solr.common.util.JsonRecordReader$Node.access$300(JsonRecordReader.java:154)
at 
org.apache.solr.common.util.JsonRecordReader$Node$1Wrapper.walk(JsonRecordReader.java:345)
at 
org.apache.solr.common.util.JsonRecordReader.parseSingleFieldValue(JsonRecordReader.java:529)
at 
org.apache.solr.common.util.JsonRecordReader$Node.handleObjectStart(JsonRecordReader.java:384)
at 
org.apache.solr.common.util.JsonRecordReader$Node.parse(JsonRecordReader.java:295)
at 
org.apache.solr.common.util.JsonRecordReader$Node.access$200(JsonRecordReader.java:154)
at 
org.apache.solr.common.util.JsonRecordReader.streamRecords(JsonRecordReader.java:138)
at 
org.apache.solr.handler.loader.JsonLoader$SingleThreadedJsonLoader.handleSplitMode(JsonLoader.java:205)
at 
org.apache.solr.handler.loader.JsonLoader$SingleThreadedJsonLoader.processUpdate(JsonLoader.java:122)
at 
org.apache.solr.handler.loader.JsonLoader$SingleThreadedJsonLoader.load(JsonLoader.java:110)
at org.apache.solr.handler.loader.JsonLoader.load(JsonLoader.java:73)
at 
org.apache.solr.handler.UpdateRequestHandler$1.load(UpdateRequestHandler.java:103)
at 
org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:74)
at 
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:143)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1984)
at 
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:829)
at 
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:446)
at 
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:220)
at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
at 
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at 
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
at 
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at 
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
at 
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
at 
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at 
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at 
org.eclipse.jetty.server.handler.ContextHandlerCollection.

[jira] [Created] (SOLR-7462) ArrayIndexOutOfBoundsException in RecordingJSONParser.java

2015-04-24 Thread Scott Dawson (JIRA)
Scott Dawson created SOLR-7462:
--

 Summary: ArrayIndexOutOfBoundsException in RecordingJSONParser.java
 Key: SOLR-7462
 URL: https://issues.apache.org/jira/browse/SOLR-7462
 Project: Solr
  Issue Type: Bug
Affects Versions: 5.1
Reporter: Scott Dawson


With Solr 5.1 I'm getting an occasional fatal exception during indexing. It's 
an ArrayIndexOutOfBoundsException at line 61 of 
org/apache/solr/util/RecordingJSONParser.java. Looking at the code (see below), 
it seems obvious that the if-statement at line 60 should use a greater-than 
sign instead of greater-than-or-equals.

  @Override
  public CharArr getStringChars() throws IOException {
CharArr chars = super.getStringChars();
recordStr(chars.toString());
position = getPosition();
// if reading a String , the getStringChars do not return the closing 
single quote or double quote
//so, try to capture that
if(chars.getArray().length >=chars.getStart()+chars.size()) { // line 60
  char next = chars.getArray()[chars.getStart() + chars.size()]; // line 61
  if(next =='"' || next == '\'') {
recordChar(next);
  }
}
return chars;
  }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org