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

Hoss Man commented on SOLR-5814:
--------------------------------

As an example, i did this...

{noformat}
hossman@frisbee:~/lucene/4x_dev/solr/example$ echo "giberish" > 
solr/collection1/conf/solrconfig.xml
{noformat}

And then started solr and got this...

{noformat}
1450 [main] INFO  org.apache.solr.core.CoresLocator  – Looking for core 
definitions underneath /home/hossman/lucene/4x_dev/solr/example/solr
1457 [main] INFO  org.apache.solr.core.CoresLocator  – Found core collection1 
in /home/hossman/lucene/4x_dev/solr/example/solr/collection1/
1467 [main] INFO  org.apache.solr.core.CoresLocator  – Found 1 core definitions
1470 [coreLoadExecutor-4-thread-1] INFO  org.apache.solr.core.CoreContainer  – 
Creating SolrCore 'collection1' using instanceDir: 
/home/hossman/lucene/4x_dev/solr/example/solr/collection1
1470 [coreLoadExecutor-4-thread-1] INFO  
org.apache.solr.core.SolrResourceLoader  – new SolrResourceLoader for 
directory: '/home/hossman/lucene/4x_dev/solr/example/solr/collection1/'
1568 [coreLoadExecutor-4-thread-1] ERROR org.apache.solr.core.Config  – 
Exception during parsing file: solrconfig.xml:org.xml.sax.SAXParseException; 
systemId: solrres:/solrconfig.xml; lineNumber: 1; columnNumber: 1; Content is 
not allowed in prolog.
        at 
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)
        at 
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
        at 
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:441)
        at 
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:368)
        at 
com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1436)
        at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:999)
        at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
...
        at org.apache.solr.core.Config.<init>(Config.java:134)
        at org.apache.solr.core.Config.<init>(Config.java:86)
        at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:140)
        at 
org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:527)
        at org.apache.solr.core.CoreContainer.create(CoreContainer.java:597)
        at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:258)
        at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:250)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:744)

1570 [coreLoadExecutor-4-thread-1] ERROR org.apache.solr.core.CoreContainer  – 
Failed to load file 
/home/hossman/lucene/4x_dev/solr/example/solr/collection1/solrconfig.xml
1570 [coreLoadExecutor-4-thread-1] ERROR org.apache.solr.core.CoreContainer  – 
Unable to create core: collection1
org.apache.solr.common.SolrException: Could not load config file 
/home/hossman/lucene/4x_dev/solr/example/solr/collection1/solrconfig.xml
        at 
org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:530)
        at org.apache.solr.core.CoreContainer.create(CoreContainer.java:597)
        at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:258)
        at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:250)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:744)
Caused by: org.apache.solr.common.SolrException: org.xml.sax.SAXParseException; 
systemId: solrres:/solrconfig.xml; lineNumber: 1; columnNumber: 1; Content is 
not allowed in prolog.
        at org.apache.solr.core.Config.<init>(Config.java:148)
        at org.apache.solr.core.Config.<init>(Config.java:86)
        at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:140)
        at 
org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:527)
        ... 9 more
Caused by: org.xml.sax.SAXParseException; systemId: solrres:/solrconfig.xml; 
lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
        at 
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)
...
{noformat}

Note in particular the line that says: {{1570 \[coreLoadExecutor-4-thread-1\] 
ERROR org.apache.solr.core.CoreContainer  – Failed to load file 
*/home/hossman/lucene/4x_dev/solr/example/solr/collection1/solrconfig.xml*}}

which is also what was front and center when i tried to load the admin UI in 
the browser.

If i then stop solr and naively attempt to "fix" the problem...

{noformat}
hossman@frisbee:~/lucene/4x_dev/solr/example$ mv 
solr/collection1/conf/solrconfig.xml solr/collection1/solrconfig.xml
{noformat}

Restarting solr gives an even less helpful variant of the same basic error 
(because there is no longer any useful root cause - the file really can't be 
found, just not in the place the main error says solr is looking) ...

{noformat}
1497 [main] INFO  org.apache.solr.core.CoresLocator  – Found core collection1 
in /home/hossman/lucene/4x_dev/solr/example/solr/collection1/
1498 [main] INFO  org.apache.solr.core.CoresLocator  – Found 1 core definitions
1500 [coreLoadExecutor-4-thread-1] INFO  org.apache.solr.core.CoreContainer  – 
Creating SolrCore 'collection1' using instanceDir: 
/home/hossman/lucene/4x_dev/solr/example/solr/collection1
1500 [coreLoadExecutor-4-thread-1] INFO  
org.apache.solr.core.SolrResourceLoader  – new SolrResourceLoader for 
directory: '/home/hossman/lucene/4x_dev/solr/example/solr/collection1/'
1512 [coreLoadExecutor-4-thread-1] ERROR org.apache.solr.core.CoreContainer  – 
Failed to load file 
/home/hossman/lucene/4x_dev/solr/example/solr/collection1/solrconfig.xml
1514 [coreLoadExecutor-4-thread-1] ERROR org.apache.solr.core.CoreContainer  – 
Unable to create core: collection1
org.apache.solr.common.SolrException: Could not load config file 
/home/hossman/lucene/4x_dev/solr/example/solr/collection1/solrconfig.xml
        at 
org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:530)
        at org.apache.solr.core.CoreContainer.create(CoreContainer.java:597)
        at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:258)
...
Caused by: java.io.IOException: Can't find resource 'solrconfig.xml' in 
classpath or '/home/hossman/lucene/4x_dev/solr/example/solr/collection1/conf'
        at 
org.apache.solr.core.SolrResourceLoader.openResource(SolrResourceLoader.java:342)
        at 
org.apache.solr.core.SolrResourceLoader.openConfig(SolrResourceLoader.java:288)
        at org.apache.solr.core.Config.<init>(Config.java:116)
        at org.apache.solr.core.Config.<init>(Config.java:86)
        at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:140)
        at 
org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:527)
        ... 9 more
1517 [coreLoadExecutor-4-thread-1] ERROR org.apache.solr.core.CoreContainer  – 
null:org.apache.solr.common.SolrException: Unable to create core: collection1
        at 
org.apache.solr.core.CoreContainer.recordAndThrow(CoreContainer.java:989)
        at org.apache.solr.core.CoreContainer.create(CoreContainer.java:606)
        at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:258)
        at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:250)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
{noformat}


> CoreContainer reports incorrect & missleading path for solrconfig.xml when 
> there are loading problems
> -----------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-5814
>                 URL: https://issues.apache.org/jira/browse/SOLR-5814
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Hoss Man
>
> The error messages thrown by CoreContainer when there is a problem loading 
> solrconfig.xml refer to the wrong path (leaves out "conf/").
> This is missleading users (who may not notice the root cause) into thinking 
> they need to move their solrconfig.xml from 
> {{collection_name/conf/solrconfig.xml}} to {{collection_name/solrconfig.xml}} 
> at which point they still get the same error message because solr still can't 
> find the file in the conf dir



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to