You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Lucas Pelegrino <lu...@gmail.com> on 2017/07/25 23:21:02 UTC

Unable to create core [collection] Caused by: null

Hey guys.

Trying to make solr work here, but I'm getting this error from this command:

$ ./solr create -c products -d /Users/lucaswxp/reduza-solr/products/conf/

Error CREATEing SolrCore 'products': Unable to create core [products]
Caused by: null

I'm posting my solrconf.xml, schema.xml and data-config.xml here:
https://pastebin.com/fnYK9pSJ

The debug from log solr: https://pastebin.com/kVLMvBwZ

Not sure what to do, the error isn't very descriptive.

Re: Unable to create core [collection] Caused by: null

Posted by Lucas Pelegrino <lu...@gmail.com>.
Thanks Shawn and everyone!

Solved.

2017-07-27 18:29 GMT-04:00 Shawn Heisey <ap...@elyograg.org>:

> On 7/25/2017 5:21 PM, Lucas Pelegrino wrote:
> > Trying to make solr work here, but I'm getting this error from this
> command:
> >
> > $ ./solr create -c products -d /Users/lucaswxp/reduza-solr/
> products/conf/
> >
> > Error CREATEing SolrCore 'products': Unable to create core [products]
> > Caused by: null
> >
> > I'm posting my solrconf.xml, schema.xml and data-config.xml here:
> > https://pastebin.com/fnYK9pSJ
> >
> > The debug from log solr: https://pastebin.com/kVLMvBwZ
>
> Problems with my email client.  Meant to send this to the list, but only
> sent it to Lucas.  Resending to the list.
>
> In the exception you got, I see that the final "Caused by" section
> starts with this:
>
> Caused by: java.lang.NullPointerException
>     at
> org.apache.solr.response.SchemaXmlWriter.writeResponse(
> SchemaXmlWriter.java:85)
>
> Line 85 of that source code file is this:
>
>    writeAttr(IndexSchema.NAME,
> schemaProperties.get(IndexSchema.NAME).toString());
>
> As Rick noted, the schema should be named "managed-schema" rather than
> "schema.xml", but Solr *should* see the schema.xml, copy it to
> managed-schema, rename it to something else, and continue loading.  I'm
> proceeding based on the idea that Solr *has* found your file.
>
> Looking at your schema, you have not given the schema a name, and that's
> what is causing the problem.  Therefore when the code mentioned above
> tried to get the name of the schema, it got a null.  Java can't perform
> an operation (in this case, toString() is the one being called) on a
> null pointer.  Here is the relevant line from one of the example schemas
> included with Solr 6.6 showing how to give the schema a name:
>
> <schema name="example-basic" version="1.6">
>
> The error could be more descriptive, but a better option is to work
> without creating an error at all.  I opened an issue to deal with the
> problem, and I'm expecting it to be fixed in the next release of Solr:
>
> https://issues.apache.org/jira/browse/SOLR-11153
>
> Thanks,
> Shawn
>
>

Re: Unable to create core [collection] Caused by: null

Posted by Shawn Heisey <ap...@elyograg.org>.
On 7/25/2017 5:21 PM, Lucas Pelegrino wrote:
> Trying to make solr work here, but I'm getting this error from this command:
>
> $ ./solr create -c products -d /Users/lucaswxp/reduza-solr/products/conf/
>
> Error CREATEing SolrCore 'products': Unable to create core [products]
> Caused by: null
>
> I'm posting my solrconf.xml, schema.xml and data-config.xml here:
> https://pastebin.com/fnYK9pSJ
>
> The debug from log solr: https://pastebin.com/kVLMvBwZ

Problems with my email client.  Meant to send this to the list, but only
sent it to Lucas.  Resending to the list.

In the exception you got, I see that the final "Caused by" section
starts with this:

Caused by: java.lang.NullPointerException
    at
org.apache.solr.response.SchemaXmlWriter.writeResponse(SchemaXmlWriter.java:85)

Line 85 of that source code file is this:

   writeAttr(IndexSchema.NAME,
schemaProperties.get(IndexSchema.NAME).toString());

As Rick noted, the schema should be named "managed-schema" rather than
"schema.xml", but Solr *should* see the schema.xml, copy it to
managed-schema, rename it to something else, and continue loading.  I'm
proceeding based on the idea that Solr *has* found your file.

Looking at your schema, you have not given the schema a name, and that's
what is causing the problem.  Therefore when the code mentioned above
tried to get the name of the schema, it got a null.  Java can't perform
an operation (in this case, toString() is the one being called) on a
null pointer.  Here is the relevant line from one of the example schemas
included with Solr 6.6 showing how to give the schema a name:

<schema name="example-basic" version="1.6">

The error could be more descriptive, but a better option is to work
without creating an error at all.  I opened an issue to deal with the
problem, and I'm expecting it to be fixed in the next release of Solr:

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

Thanks,
Shawn


Re: Unable to create core [collection] Caused by: null

Posted by Rick Leir <rl...@leirtech.com>.
Lucas,

What is in the log before that stackdump?

The stackdump seems to indicate that Solr is trying to run with a 
managed schema. Looking at the cwiki, "When a |<schemaFactory/>|is not 
explicitly declared in a |solrconfig.xml|file, Solr implicitly uses 
a|ManagedIndexSchemaFactory|, which is by default|"mutable"|and keeps 
schema information in a |managed-schema|file."*. So your schema.xml 
would be ignored.

Have you tried using a solrconfig.xml copied from one of the examples, 
perhaps with minor changes?
cheers -- Rick

* 
https://cwiki.apache.org/confluence/display/solr/Schema+Factory+Definition+in+SolrConfig

On 2017-07-25 07:21 PM, Lucas Pelegrino wrote:
> Hey guys.
>
> Trying to make solr work here, but I'm getting this error from this command:
>
> $ ./solr create -c products -d /Users/lucaswxp/reduza-solr/products/conf/
>
> Error CREATEing SolrCore 'products': Unable to create core [products]
> Caused by: null
>
> I'm posting my solrconf.xml, schema.xml and data-config.xml here:
> https://pastebin.com/fnYK9pSJ
>
> The debug from log solr: https://pastebin.com/kVLMvBwZ
>
> Not sure what to do, the error isn't very descriptive.
>


Re: Unable to create core [collection] Caused by: null

Posted by Nawab Zada Asad Iqbal <kh...@gmail.com>.
Lucas may be hitting this issue:
https://stackoverflow.com/questions/4659151/recurring-exception-without-a-stack-trace-how-to-reset


Could you try running your server with jvm value:
-XX:-OmitStackTraceInFastThrow
?



Nawab

On Wed, Jul 26, 2017 at 11:42 AM, Anshum Gupta <an...@apple.com> wrote:

> Hi Lucas,
>
> It would be super useful if you provided more information with the
> question. A few things you might want to include are - version of Solr, how
> did you start it, stack trace from the log etc.
>
>
> -Anshum
>
>
>
> > On Jul 25, 2017, at 4:21 PM, Lucas Pelegrino <lu...@gmail.com>
> wrote:
> >
> > Hey guys.
> >
> > Trying to make solr work here, but I'm getting this error from this
> command:
> >
> > $ ./solr create -c products -d /Users/lucaswxp/reduza-solr/
> products/conf/
> >
> > Error CREATEing SolrCore 'products': Unable to create core [products]
> > Caused by: null
> >
> > I'm posting my solrconf.xml, schema.xml and data-config.xml here:
> > https://pastebin.com/fnYK9pSJ
> >
> > The debug from log solr: https://pastebin.com/kVLMvBwZ
> >
> > Not sure what to do, the error isn't very descriptive.
>
>

Re: Unable to create core [collection] Caused by: null

Posted by Anshum Gupta <an...@apple.com>.
Hi Lucas,

It would be super useful if you provided more information with the question. A few things you might want to include are - version of Solr, how did you start it, stack trace from the log etc.


-Anshum



> On Jul 25, 2017, at 4:21 PM, Lucas Pelegrino <lu...@gmail.com> wrote:
> 
> Hey guys.
> 
> Trying to make solr work here, but I'm getting this error from this command:
> 
> $ ./solr create -c products -d /Users/lucaswxp/reduza-solr/products/conf/
> 
> Error CREATEing SolrCore 'products': Unable to create core [products]
> Caused by: null
> 
> I'm posting my solrconf.xml, schema.xml and data-config.xml here:
> https://pastebin.com/fnYK9pSJ
> 
> The debug from log solr: https://pastebin.com/kVLMvBwZ
> 
> Not sure what to do, the error isn't very descriptive.