[jira] [Commented] (SOLR-11153) Incomplete schema results in mysterious error

2017-08-03 Thread Shawn Heisey (JIRA)

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

Shawn Heisey commented on SOLR-11153:
-

Upgraded to Oracle 8u144 and I'm still seeing forbidden-api failures.

I eventually tracked down the problem to commits made this morning (in my 
timezone) for LUCENE-7606.


> Incomplete schema results in mysterious error
> -
>
> Key: SOLR-11153
> URL: https://issues.apache.org/jira/browse/SOLR-11153
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>Affects Versions: 4.4, 5.0, 6.0
>Reporter: Shawn Heisey
>Assignee: Shawn Heisey
> Attachments: SOLR-11153.patch, SOLR-11153.patch, SOLR-11153.patch, 
> SOLR-11153.patch
>
>
> A user on the mailing list was getting a very arcane error trying to load a 
> very minimal solrconfig and schema.  The error was ultimately caused by NPE 
> in SchemaXmlWriter.java at line 85.
> The actual problem turned out to be a missing "name" attribute from the top 
> level XML "schema" element in the file.
> {code}
> 
> 
>   
>  required="true"/>
>  required="true"/>
>   
>   _id
>   
> 
>   
> 
> {code}
> As written, the code will explode with an NPE if the name is missing from the 
> schema.  Although I can state that the user's minimal config/schema are not 
> very useful, Solr should not blow up without a useful error message, and in 
> this case, I think it should have worked, only emitting a WARN message and 
> assuming a default name.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (SOLR-11153) Incomplete schema results in mysterious error

2017-08-03 Thread Shawn Heisey (JIRA)

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

Shawn Heisey commented on SOLR-11153:
-

bq. What version of the JDK?

root@bigindy5:/index/src/lucene-solr# java -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)

It is Oracle Java installed into Ubuntu 14 with a PPA.  I can upgrade it easily 
enough, which would likely make it 8u144.


> Incomplete schema results in mysterious error
> -
>
> Key: SOLR-11153
> URL: https://issues.apache.org/jira/browse/SOLR-11153
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>Affects Versions: 4.4, 5.0, 6.0
>Reporter: Shawn Heisey
>Assignee: Shawn Heisey
> Attachments: SOLR-11153.patch, SOLR-11153.patch, SOLR-11153.patch, 
> SOLR-11153.patch
>
>
> A user on the mailing list was getting a very arcane error trying to load a 
> very minimal solrconfig and schema.  The error was ultimately caused by NPE 
> in SchemaXmlWriter.java at line 85.
> The actual problem turned out to be a missing "name" attribute from the top 
> level XML "schema" element in the file.
> {code}
> 
> 
>   
>  required="true"/>
>  required="true"/>
>   
>   _id
>   
> 
>   
> 
> {code}
> As written, the code will explode with an NPE if the name is missing from the 
> schema.  Although I can state that the user's minimal config/schema are not 
> very useful, Solr should not blow up without a useful error message, and in 
> this case, I think it should have worked, only emitting a WARN message and 
> assuming a default name.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (SOLR-11153) Incomplete schema results in mysterious error

2017-08-03 Thread Erick Erickson (JIRA)

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

Erick Erickson commented on SOLR-11153:
---

I ran precommit yesterday with no problems. What version of the JDK? Uwe made a 
comment recently about older JDKs having a problem that might be relevant.

> Incomplete schema results in mysterious error
> -
>
> Key: SOLR-11153
> URL: https://issues.apache.org/jira/browse/SOLR-11153
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>Affects Versions: 4.4, 5.0, 6.0
>Reporter: Shawn Heisey
>Assignee: Shawn Heisey
> Attachments: SOLR-11153.patch, SOLR-11153.patch, SOLR-11153.patch, 
> SOLR-11153.patch
>
>
> A user on the mailing list was getting a very arcane error trying to load a 
> very minimal solrconfig and schema.  The error was ultimately caused by NPE 
> in SchemaXmlWriter.java at line 85.
> The actual problem turned out to be a missing "name" attribute from the top 
> level XML "schema" element in the file.
> {code}
> 
> 
>   
>  required="true"/>
>  required="true"/>
>   
>   _id
>   
> 
>   
> 
> {code}
> As written, the code will explode with an NPE if the name is missing from the 
> schema.  Although I can state that the user's minimal config/schema are not 
> very useful, Solr should not blow up without a useful error message, and in 
> this case, I think it should have worked, only emitting a WARN message and 
> assuming a default name.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (SOLR-11153) Incomplete schema results in mysterious error

2017-08-03 Thread Shawn Heisey (JIRA)

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

Shawn Heisey commented on SOLR-11153:
-

The second test run on Windows passed solr-core completely but had one failure 
in solrj that doesn't look related to the patch.

> Incomplete schema results in mysterious error
> -
>
> Key: SOLR-11153
> URL: https://issues.apache.org/jira/browse/SOLR-11153
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>Affects Versions: 4.4, 5.0, 6.0
>Reporter: Shawn Heisey
>Assignee: Shawn Heisey
> Attachments: SOLR-11153.patch, SOLR-11153.patch, SOLR-11153.patch, 
> SOLR-11153.patch
>
>
> A user on the mailing list was getting a very arcane error trying to load a 
> very minimal solrconfig and schema.  The error was ultimately caused by NPE 
> in SchemaXmlWriter.java at line 85.
> The actual problem turned out to be a missing "name" attribute from the top 
> level XML "schema" element in the file.
> {code}
> 
> 
>   
>  required="true"/>
>  required="true"/>
>   
>   _id
>   
> 
>   
> 
> {code}
> As written, the code will explode with an NPE if the name is missing from the 
> schema.  Although I can state that the user's minimal config/schema are not 
> very useful, Solr should not blow up without a useful error message, and in 
> this case, I think it should have worked, only emitting a WARN message and 
> assuming a default name.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (SOLR-11153) Incomplete schema results in mysterious error

2017-08-03 Thread Shawn Heisey (JIRA)

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

Shawn Heisey commented on SOLR-11153:
-

In parallel with running tests on Windows, I did "ant precommit" on a Linux 
machine with my patch applied.  There are failures that have nothing to do with 
my patch.  They look related to LUCENE-7194.  Lots of forbidden usages of 
java.lang.Math#toRadians(double) in a couple of spatial3d test classes.

I double-checked that my checkout of master was up to date and unmodified 
except for my patch for this issue.


> Incomplete schema results in mysterious error
> -
>
> Key: SOLR-11153
> URL: https://issues.apache.org/jira/browse/SOLR-11153
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>Affects Versions: 4.4, 5.0, 6.0
>Reporter: Shawn Heisey
>Assignee: Shawn Heisey
> Attachments: SOLR-11153.patch, SOLR-11153.patch, SOLR-11153.patch, 
> SOLR-11153.patch
>
>
> A user on the mailing list was getting a very arcane error trying to load a 
> very minimal solrconfig and schema.  The error was ultimately caused by NPE 
> in SchemaXmlWriter.java at line 85.
> The actual problem turned out to be a missing "name" attribute from the top 
> level XML "schema" element in the file.
> {code}
> 
> 
>   
>  required="true"/>
>  required="true"/>
>   
>   _id
>   
> 
>   
> 
> {code}
> As written, the code will explode with an NPE if the name is missing from the 
> schema.  Although I can state that the user's minimal config/schema are not 
> very useful, Solr should not blow up without a useful error message, and in 
> this case, I think it should have worked, only emitting a WARN message and 
> assuming a default name.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (SOLR-11153) Incomplete schema results in mysterious error

2017-08-03 Thread Shawn Heisey (JIRA)

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

Shawn Heisey commented on SOLR-11153:
-

With the first test run with an early version of the new patch, I got three 
failures in tests for solr-core.  They did not look related to my patch.

On a second test run that is still underway, where I had updated the patch to 
remove "name" and "version" from one of the test schemas to actually test this 
problem, more than half of the solr-core tests have been done with no failures 
yet.  The first run had its failures before that point.


> Incomplete schema results in mysterious error
> -
>
> Key: SOLR-11153
> URL: https://issues.apache.org/jira/browse/SOLR-11153
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>Affects Versions: 4.4, 5.0, 6.0
>Reporter: Shawn Heisey
>Assignee: Shawn Heisey
> Attachments: SOLR-11153.patch, SOLR-11153.patch, SOLR-11153.patch
>
>
> A user on the mailing list was getting a very arcane error trying to load a 
> very minimal solrconfig and schema.  The error was ultimately caused by NPE 
> in SchemaXmlWriter.java at line 85.
> The actual problem turned out to be a missing "name" attribute from the top 
> level XML "schema" element in the file.
> {code}
> 
> 
>   
>  required="true"/>
>  required="true"/>
>   
>   _id
>   
> 
>   
> 
> {code}
> As written, the code will explode with an NPE if the name is missing from the 
> schema.  Although I can state that the user's minimal config/schema are not 
> very useful, Solr should not blow up without a useful error message, and in 
> this case, I think it should have worked, only emitting a WARN message and 
> assuming a default name.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (SOLR-11153) Incomplete schema results in mysterious error

2017-08-03 Thread Shawn Heisey (JIRA)

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

Shawn Heisey commented on SOLR-11153:
-

The new patch was created because I noticed that if there's no version, 1.0 is 
already assumed by IndexSchema, and if there's no name, this fact is logged 
before the NPE the original user encountered -- but no action is taken other 
than logging a warning.

With the patch, the user's schema should load as-is.


> Incomplete schema results in mysterious error
> -
>
> Key: SOLR-11153
> URL: https://issues.apache.org/jira/browse/SOLR-11153
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>Affects Versions: 4.4, 5.0, 6.0
>Reporter: Shawn Heisey
>Assignee: Shawn Heisey
> Attachments: SOLR-11153.patch, SOLR-11153.patch, SOLR-11153.patch
>
>
> A user on the mailing list was getting a very arcane error trying to load a 
> very minimal solrconfig and schema.  The error was ultimately caused by NPE 
> in SchemaXmlWriter.java at line 85.
> The actual problem turned out to be a missing "name" attribute from the top 
> level XML "schema" element in the file.
> {code}
> 
> 
>   
>  required="true"/>
>  required="true"/>
>   
>   _id
>   
> 
>   
> 
> {code}
> As written, the code will explode with an NPE if the name is missing from the 
> schema.  Although I can state that the user's minimal config/schema are not 
> very useful, Solr should not blow up without a useful error message, and in 
> this case, I think it should have worked, only emitting a WARN message and 
> assuming a default name.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (SOLR-11153) Incomplete schema results in mysterious error

2017-08-03 Thread Shawn Heisey (JIRA)

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

Shawn Heisey commented on SOLR-11153:
-

I've come up with a different and less invasive way of fixing this.  If tests 
look good, will attach it soon.

I also tested the specific problem.  I created three cores and put minimal 
schemas in all of them.  The "bar" core had no name, but version="1.6".  The 
baz core had the "default-config" name, but no version.  The foo core was 
missing both.  This is what was logged:

{noformat}
2017-08-03 13:55:20.583 INFO  (coreLoadExecutor-6-thread-2) [   x:baz] 
o.a.s.s.IndexSchema [baz] Schema name=default-config
2017-08-03 13:55:20.640 WARN  (coreLoadExecutor-6-thread-3) [   x:foo] 
o.a.s.s.IndexSchema [foo] schema has no name, using exampleSchema
2017-08-03 13:55:20.661 WARN  (coreLoadExecutor-6-thread-1) [   x:bar] 
o.a.s.s.IndexSchema [bar] schema has no name, using exampleSchema
2017-08-03 13:55:20.837 INFO  (coreLoadExecutor-6-thread-1) [   x:bar] 
o.a.s.s.IndexSchema Loaded schema exampleSchema/1.6 with uniqueid field id
2017-08-03 13:55:20.842 INFO  (coreLoadExecutor-6-thread-3) [   x:foo] 
o.a.s.s.IndexSchema Loaded schema exampleSchema/1.0 with uniqueid field id
2017-08-03 13:55:20.843 INFO  (coreLoadExecutor-6-thread-2) [   x:baz] 
o.a.s.s.IndexSchema Loaded schema default-config/1.0 with uniqueid field id
{noformat}

The test suite is running now, it's a little less than ten percent done with no 
failures yet.


> Incomplete schema results in mysterious error
> -
>
> Key: SOLR-11153
> URL: https://issues.apache.org/jira/browse/SOLR-11153
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>Affects Versions: 4.4, 5.0, 6.0
>Reporter: Shawn Heisey
>Assignee: Shawn Heisey
> Attachments: SOLR-11153.patch, SOLR-11153.patch, SOLR-11153.patch
>
>
> A user on the mailing list was getting a very arcane error trying to load a 
> very minimal solrconfig and schema.  The error was ultimately caused by NPE 
> in SchemaXmlWriter.java at line 85.
> The actual problem turned out to be a missing "name" attribute from the top 
> level XML "schema" element in the file.
> {code}
> 
> 
>   
>  required="true"/>
>  required="true"/>
>   
>   _id
>   
> 
>   
> 
> {code}
> As written, the code will explode with an NPE if either the name or version 
> is missing from the schema.  Although I can state that the user's minimal 
> config/schema are not very useful, Solr should not blow up without a useful 
> error message, and in this case, I think it should have worked, only emitting 
> a WARN message and assuming a default name.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (SOLR-11153) Incomplete schema results in mysterious error

2017-08-02 Thread Shawn Heisey (JIRA)

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

Shawn Heisey commented on SOLR-11153:
-

Finally got around to running tests with the patch.  I got a failure and 
cancelled the run.  Apparently it's not possible to cast from Float to String 
(for the version).  I've made some changes and tests are running again.  So far 
it's looking good.  If this run works, I will attach the new patch.


> Incomplete schema results in mysterious error
> -
>
> Key: SOLR-11153
> URL: https://issues.apache.org/jira/browse/SOLR-11153
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>Affects Versions: 4.4, 5.0, 6.0
>Reporter: Shawn Heisey
>Assignee: Shawn Heisey
> Attachments: SOLR-11153.patch, SOLR-11153.patch
>
>
> A user on the mailing list was getting a very arcane error trying to load a 
> very minimal solrconfig and schema.  The error was ultimately caused by NPE 
> in SchemaXmlWriter.java at line 85.
> The actual problem turned out to be a missing "name" attribute from the top 
> level XML "schema" element in the file.
> {code}
> 
> 
>   
>  required="true"/>
>  required="true"/>
>   
>   _id
>   
> 
>   
> 
> {code}
> As written, the code will explode with an NPE if either the name or version 
> is missing from the schema.  Although I can state that the user's minimal 
> config/schema are not very useful, Solr should not blow up without a useful 
> error message, and in this case, I think it should have worked, only emitting 
> a WARN message and assuming a default name.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (SOLR-11153) Incomplete schema results in mysterious error

2017-08-02 Thread Shawn Heisey (JIRA)

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

Shawn Heisey commented on SOLR-11153:
-

My bias is to stick with 1.0 so we don't have to keep updating it as new 
versions come out.  If somebody deploys an incomplete schema that's missing the 
version, the patch would give them a warning in their log, so in theory that 
should be a clue that they need to configure something.


> Incomplete schema results in mysterious error
> -
>
> Key: SOLR-11153
> URL: https://issues.apache.org/jira/browse/SOLR-11153
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>Affects Versions: 4.4, 5.0, 6.0
>Reporter: Shawn Heisey
>Assignee: Shawn Heisey
> Attachments: SOLR-11153.patch, SOLR-11153.patch
>
>
> A user on the mailing list was getting a very arcane error trying to load a 
> very minimal solrconfig and schema.  The error was ultimately caused by NPE 
> in SchemaXmlWriter.java at line 85.
> The actual problem turned out to be a missing "name" attribute from the top 
> level XML "schema" element in the file.
> {code}
> 
> 
>   
>  required="true"/>
>  required="true"/>
>   
>   _id
>   
> 
>   
> 
> {code}
> As written, the code will explode with an NPE if either the name or version 
> is missing from the schema.  Although I can state that the user's minimal 
> config/schema are not very useful, Solr should not blow up without a useful 
> error message, and in this case, I think it should have worked, only emitting 
> a WARN message and assuming a default name.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (SOLR-11153) Incomplete schema results in mysterious error

2017-07-28 Thread Shawn Heisey (JIRA)

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

Shawn Heisey commented on SOLR-11153:
-

Additional thoughts regarding whether to go with 1.0 or 1.6:

It's easy enough for a user to get the exact behavior they want -- they just 
need to include the version in their schema.

On the other hand, should we default to a schema version that behaves in a very 
different manner than what the user (and us in a support role) will probably be 
expecting from a modern Solr version?  Any confusion would be cleared up once 
the schema is shared, of course.


> Incomplete schema results in mysterious error
> -
>
> Key: SOLR-11153
> URL: https://issues.apache.org/jira/browse/SOLR-11153
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>Affects Versions: 4.4, 5.0, 6.0
>Reporter: Shawn Heisey
>Assignee: Shawn Heisey
> Attachments: SOLR-11153.patch
>
>
> A user on the mailing list was getting a very arcane error trying to load a 
> very minimal solrconfig and schema.  The error was ultimately caused by NPE 
> in SchemaXmlWriter.java at line 85.
> The actual problem turned out to be a missing "name" attribute from the top 
> level XML "schema" element in the file.
> {code}
> 
> 
>   
>  required="true"/>
>  required="true"/>
>   
>   _id
>   
> 
>   
> 
> {code}
> As written, the code will explode with an NPE if either the name or version 
> is missing from the schema.  Although I can state that the user's minimal 
> config/schema are not very useful, Solr should not blow up without a useful 
> error message, and in this case, I think it should have worked, only emitting 
> a WARN message and assuming a default name.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (SOLR-11153) Incomplete schema results in mysterious error

2017-07-28 Thread Shawn Heisey (JIRA)

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

Shawn Heisey commented on SOLR-11153:
-

I've done some additional work to put constants for the default values in 
IndexSchema.  Eclipse is doing its best to stand in my way of getting anything 
done, so I will get a new patch up soon.

I do have a question for everyone, though.  Should the version default to 1.0 
or 1.6?  Advantages to 1.0: We never need to touch it again.  Advantages to the 
latest version: The user gets years of improvements to Solr's behavior.


> Incomplete schema results in mysterious error
> -
>
> Key: SOLR-11153
> URL: https://issues.apache.org/jira/browse/SOLR-11153
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>Affects Versions: 4.4, 5.0, 6.0
>Reporter: Shawn Heisey
>Assignee: Shawn Heisey
> Attachments: SOLR-11153.patch
>
>
> A user on the mailing list was getting a very arcane error trying to load a 
> very minimal solrconfig and schema.  The error was ultimately caused by NPE 
> in SchemaXmlWriter.java at line 85.
> The actual problem turned out to be a missing "name" attribute from the top 
> level XML "schema" element in the file.
> {code}
> 
> 
>   
>  required="true"/>
>  required="true"/>
>   
>   _id
>   
> 
>   
> 
> {code}
> As written, the code will explode with an NPE if either the name or version 
> is missing from the schema.  Although I can state that the user's minimal 
> config/schema are not very useful, Solr should not blow up without a useful 
> error message, and in this case, I think it should have worked, only emitting 
> a WARN message and assuming a default name.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (SOLR-11153) Incomplete schema results in mysterious error

2017-07-27 Thread Jason Gerlowski (JIRA)

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

Jason Gerlowski commented on SOLR-11153:


LGTM.

As for having a place to record default values, I think it'd definitely be an 
improvement, but I'm not sure of a place that exists now.  The 
"org.apache.solr.common.params" package in SolrJ comes the closest AFAICT, but 
I'm not sure that's a good fit here.  Another option would be to put the 
default values in {{IndexSchema}}- it looks like there are constants there for 
many of the param names.  Might be reasonable to put default values there too.

> Incomplete schema results in mysterious error
> -
>
> Key: SOLR-11153
> URL: https://issues.apache.org/jira/browse/SOLR-11153
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>Affects Versions: 4.4, 5.0, 6.0
>Reporter: Shawn Heisey
>Assignee: Shawn Heisey
> Attachments: SOLR-11153.patch
>
>
> A user on the mailing list was getting a very arcane error trying to load a 
> very minimal solrconfig and schema.  The error was ultimately caused by NPE 
> in SchemaXmlWriter.java at line 85.
> The actual problem turned out to be a missing "name" attribute from the top 
> level XML "schema" element in the file.
> {code}
> 
> 
>   
>  required="true"/>
>  required="true"/>
>   
>   _id
>   
> 
>   
> 
> {code}
> As written, the code will explode with an NPE if either the name or version 
> is missing from the schema.  Although I can state that the user's minimal 
> config/schema are not very useful, Solr should not blow up without a useful 
> error message, and in this case, I think it should have worked, only emitting 
> a WARN message and assuming a default name.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (SOLR-11153) Incomplete schema results in mysterious error

2017-07-26 Thread Shawn Heisey (JIRA)

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

Shawn Heisey commented on SOLR-11153:
-

If there are constants defined somewhere that I should use for the default 
values, I'd like to know about it.

> Incomplete schema results in mysterious error
> -
>
> Key: SOLR-11153
> URL: https://issues.apache.org/jira/browse/SOLR-11153
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>Affects Versions: 4.4, 5.0, 6.0
>Reporter: Shawn Heisey
>Assignee: Shawn Heisey
> Attachments: SOLR-11153.patch
>
>
> A user on the mailing list was getting a very arcane error trying to load a 
> very minimal solrconfig and schema.  The error was ultimately caused by NPE 
> in SchemaXmlWriter.java at line 85.
> The actual problem turned out to be a missing "name" attribute from the top 
> level XML "schema" element in the file.
> {code}
> 
> 
>   
>  required="true"/>
>  required="true"/>
>   
>   _id
>   
> 
>   
> 
> {code}
> As written, the code will explode with an NPE if either the name or version 
> is missing from the schema.  Although I can state that the user's minimal 
> config/schema are not very useful, Solr should not blow up without a useful 
> error message, and in this case, I think it should have worked, only emitting 
> a WARN message and assuming a default name.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (SOLR-11153) Incomplete schema results in mysterious error

2017-07-26 Thread Shawn Heisey (JIRA)

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

Shawn Heisey commented on SOLR-11153:
-

I put 6.6 for the affected version, but I am pretty sure that this code has 
been around for a LONG time, so the problem likely affects most versions of 
Solr that have ever been released.

> Incomplete schema results in mysterious error
> -
>
> Key: SOLR-11153
> URL: https://issues.apache.org/jira/browse/SOLR-11153
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>Affects Versions: 6.6
>Reporter: Shawn Heisey
>Assignee: Shawn Heisey
> Attachments: SOLR-11153.patch
>
>
> A user on the mailing list was getting a very arcane error trying to load a 
> very minimal solrconfig and schema.  The error was ultimately caused by NPE 
> in SchemaXmlWriter.java at line 85.
> The actual problem turned out to be a missing "name" attribute from the top 
> level XML "schema" element in the file.
> {code}
> 
> 
>   
>  required="true"/>
>  required="true"/>
>   
>   _id
>   
> 
>   
> 
> {code}
> As written, the code will explode with an NPE if either the name or version 
> is missing from the schema.  Although I can state that the user's minimal 
> config/schema are not very useful, Solr should not blow up without a useful 
> error message, and in this case, I think it should have worked, only emitting 
> a WARN message and assuming a default name.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (SOLR-11153) Incomplete schema results in mysterious error

2017-07-26 Thread Shawn Heisey (JIRA)

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

Shawn Heisey commented on SOLR-11153:
-

If anyone sees anywhere else where a missing value causes a problem that cannot 
be easily diagnosed by a novice, please speak up and let's get it fixed.

> Incomplete schema results in mysterious error
> -
>
> Key: SOLR-11153
> URL: https://issues.apache.org/jira/browse/SOLR-11153
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>Affects Versions: 6.6
>Reporter: Shawn Heisey
>Assignee: Shawn Heisey
> Attachments: SOLR-11153.patch
>
>
> A user on the mailing list was getting a very arcane error trying to load a 
> very minimal solrconfig and schema.  The error was ultimately caused by NPE 
> in SchemaXmlWriter.java at line 85.
> The actual problem turned out to be a missing "name" attribute from the top 
> level XML "schema" element in the file.
> {code}
> 
> 
>   
>  required="true"/>
>  required="true"/>
>   
>   _id
>   
> 
>   
> 
> {code}
> As written, the code will explode with an NPE if either the name or version 
> is missing from the schema.  Although I can state that the user's minimal 
> config/schema are not very useful, Solr should not blow up without a useful 
> error message, and in this case, I think it should have worked, only emitting 
> a WARN message and assuming a default name.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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