You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@lucene.apache.org by "A. Lotfi" <ma...@yahoo.com> on 2013/03/27 20:33:54 UTC

Could not load config for solrconfig.xml

Hi,
I am trying solr with an oracle database, It's working but I have on the top of the page an exception :

SolrCore Initialization Failures
 
solr: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Could not load config for solrconfig.xml


Here is my solrconfig.xml :

<dataConfig>
    <dataSource driver="oracle.jdbc.OracleDriver"
            url="jdbc:oracle:thin:@ourIPaddress:1521:ourDB"
            user="username"
                password="password"/>
    <document>
        <entity name="residential" query="select * from tsunami.consumer_data_01 where state='MA'"
                deltaQuery="select  LEMSMATCHCODE, STREETNAME from residential where last_modified > '${dataimporter.last_index_time}'">
 <field column="LEMSMATCHCODE" name="lemsmatchcode" />
            <field column="STREETNAME" name="streetname" />
        </entity>
    </document>
</dataConfig>

Thanks, your help is appreciated.

Could not load config for solrconfig.xml

Posted by "A. Lotfi" <ma...@yahoo.com>.
Hi,
I am trying solr with an oracle database, It's working but I have on the top of the page an exception :

SolrCore Initialization Failures 
solr: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Could not load config for solrconfig.xml


Here is my db-data-config.xml :

<dataConfig>
    <dataSource driver="oracle.jdbc.OracleDriver"
            url="jdbc:oracle:thin:@ourIPaddress:1521:ourDB"
            user="username"
                password="password"/>
    <document>
        <entity name="residential" query="select * from tsunami.consumer_data_01 where state='MA'"
                deltaQuery="select  LEMSMATCHCODE, STREETNAME from residential where last_modified > '${dataimporter.last_index_time}'">
<field column="LEMSMATCHCODE" name="lemsmatchcode" />
            <field column="STREETNAME" name="streetname" />
        </entity>
    </document>
</dataConfig>

Thanks, your help is appreciated.

Re: Could not load config for solrconfig.xml

Posted by Erick Erickson <er...@gmail.com>.
bq: I have no idea what to do

First thing to do is look at the full stack trace
in the log. The offending bits are usually farther
down the stack.

Best
Erick


On Sat, Aug 10, 2013 at 2:10 PM, shuargan <sh...@gmail.com> wrote:

> Do you remember what was your mistake?
> Im having the same issue
>
> I have this solr.xml conf under Catalina/localhost
>
> <?xml version="1.0" encoding="utf-8"?>
> <Context docBase="/usr/share/tomcat6/webapps/solr.war" debug="0"
> privileged="true" crossContext="true">
>  <Environment name="solr/home" type="java.lang.String"
> value="/home/seba/aux" override="true"/>
> </Context>
>
>
> and is throwing the same error...
> HTTP Status 500 - {msg=SolrCore 'collection1' is not available due to init
> failure: Could not load config for
> solrconfig.xml,trace=org.apache.solr.common.SolrException: SolrCore
> 'collection1' is not available due to init failure: Could not load config
> for solrconfig.xml at
> org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:860) at
>
>
> I have no idea what to do
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Could-not-load-config-for-solrconfig-xml-tp4052152p4083741.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: Could not load config for solrconfig.xml

Posted by shuargan <sh...@gmail.com>.
Do you remember what was your mistake?
Im having the same issue

I have this solr.xml conf under Catalina/localhost

<?xml version="1.0" encoding="utf-8"?>
<Context docBase="/usr/share/tomcat6/webapps/solr.war" debug="0"
privileged="true" crossContext="true">
 <Environment name="solr/home" type="java.lang.String"
value="/home/seba/aux" override="true"/>
</Context>


and is throwing the same error...
HTTP Status 500 - {msg=SolrCore 'collection1' is not available due to init
failure: Could not load config for
solrconfig.xml,trace=org.apache.solr.common.SolrException: SolrCore
'collection1' is not available due to init failure: Could not load config
for solrconfig.xml at
org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:860) at 


I have no idea what to do



--
View this message in context: http://lucene.472066.n3.nabble.com/Could-not-load-config-for-solrconfig-xml-tp4052152p4083741.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Could not load config for solrconfig.xml

Posted by "A. Lotfi" <ma...@yahoo.com>.
In Unix, in data/index there is :
segments.gen  20 B 3/28/2013   rw-r--r--
segments_1    45 B 3/28/2013 rw-r--r--

I don't know how this was generated , should I delete them from the directory, or from other place ?
If so, how to delete reindex on the UNIX system ?


thanks lot.
 

________________________________
 From: Gora Mohanty <go...@mimirtech.com>
To: A. Lotfi <ma...@yahoo.com> 
Cc: "solr-user@lucene.apache.org" <so...@lucene.apache.org> 
Sent: Thursday, March 28, 2013 9:59 PM
Subject: Re: Could not load config for solrconfig.xml
 
On 29 March 2013 07:23, A. Lotfi <ma...@yahoo.com> wrote:
> In windows when I hit Execute Query button I got this results :
[...]

There seem to be no documents in your Solr index on the
UNIX system. As I mentioned in my previous message, you
either need to copy the index files from the WIndows system
(provided that the Solr index format has not changed, this
will work), or reindex on the UNIX system.

Regards,
Gora

Re: dataimport

Posted by Stefan Matheis <ma...@gmail.com>.
Hey

It well never turn "green" since we have no explicit status for the Importer when it's done. But, what did you see when you hit the "Refresh" Button at the bottom of the page? are the numbers counting? 

Stefan 


On Friday, March 29, 2013 at 5:38 PM, A. Lotfi wrote:

> Hi,
> 
> When I hit Execute button in Query tab I only see :
> 
> Last Update: 12:34:58
> Indexing since 01s
> Requests: 1 (1/s), Fetched: 0 (0/s), Skipped: 0, Processed: 0 (0/s)
> Started: about an hour ago
> 
> did not see  any green entry saying Indexing Completed.
> 
>  Thanks 


dataimport

Posted by "A. Lotfi" <ma...@yahoo.com>.
Hi,

When I hit Execute button in Query tab I only see :

Last Update: 12:34:58
Indexing since 01s
Requests: 1 (1/s), Fetched: 0 (0/s), Skipped: 0, Processed: 0 (0/s)
Started: about an hour ago

did not see  any green entry saying Indexing Completed.

 Thanks

Re: Could not load config for solrconfig.xml

Posted by Gora Mohanty <go...@mimirtech.com>.
On 29 March 2013 07:23, A. Lotfi <ma...@yahoo.com> wrote:
> In windows when I hit Execute Query button I got this results :
[...]

There seem to be no documents in your Solr index on the
UNIX system. As I mentioned in my previous message, you
either need to copy the index files from the WIndows system
(provided that the Solr index format has not changed, this
will work), or reindex on the UNIX system.

Regards,
Gora

Re: Could not load config for solrconfig.xml

Posted by "A. Lotfi" <ma...@yahoo.com>.
In windows when I hit Execute Query button I got this results :

<?xml version="1.0" encoding="UTF-8"?><response><lst name="responseHeader"><int name="status">0</int><int name="QTime">181</int><lst name="params"><str name="indent">true</str><str name="q">streetname:mdw</str><str name="wt">xml</str></lst></lst><result name="response" numFound="13674" start="0"><doc><str name="streetname">MEADOW</str><str name="lemsmatchcode">2501001ABN 1MD 262</str></doc><doc><str name="streetname">MEADOW</str><str name="lemsmatchcode">2501001ABRM1MD 472</str></doc><doc><str name="streetname">MEADOW</str><str name="lemsmatchcode">2501001ADMS1MD 350</str></doc><doc>

......
.....

In Unix with same setup, I got this result :

<?xml version="1.0" encoding="UTF-8"?><response><lst name="responseHeader"><int name="status">0</int><int name="QTime">2</int><lst name="params"><str name="indent">true</str><str name="q">*:*</str><str name="wt">xml</str></lst></lst><result name="response" numFound="0" start="0"></result></response>

 
I did not understand why .
thanks, your help is appreciated.


________________________________
 From: Gora Mohanty <go...@mimirtech.com>
To: solr-user@lucene.apache.org; A. Lotfi <ma...@yahoo.com> 
Sent: Thursday, March 28, 2013 4:40 PM
Subject: Re: Could not load config for solrconfig.xml
 
On 29 March 2013 01:59, A. Lotfi <ma...@yahoo.com> wrote:
> Thanks,
> my path to solr home was missing something, it's worlking, but no results, the same solr app with same configuration files worked in windows.

What do you mean by "no results"? Have you indexed stuff, and
are not able to search for it? Are you expecting to copy Solr files
from an old setup with an index, and have things work? That would
be OK, provided that the Solr index formats were compatible,
but you would also need to copy the index, and define dataDir
properly in solrconfig.xml.

Regards,
Gora

Re: Could not load config for solrconfig.xml

Posted by Gora Mohanty <go...@mimirtech.com>.
On 29 March 2013 01:59, A. Lotfi <ma...@yahoo.com> wrote:
> Thanks,
> my path to solr home was missing something, it's worlking, but no results, the same solr app with same configuration files worked in windows.

What do you mean by "no results"? Have you indexed stuff, and
are not able to search for it? Are you expecting to copy Solr files
from an old setup with an index, and have things work? That would
be OK, provided that the Solr index formats were compatible,
but you would also need to copy the index, and define dataDir
properly in solrconfig.xml.

Regards,
Gora

Re: Could not load config for solrconfig.xml

Posted by "A. Lotfi" <ma...@yahoo.com>.
Thanks, 
my path to solr home was missing something, it's worlking, but no results, the same solr app with same configuration files worked in windows.
 
Abdel


________________________________
 From: Gora Mohanty <go...@mimirtech.com>
To: solr-user@lucene.apache.org; A. Lotfi <ma...@yahoo.com> 
Cc: "general@lucene.apache.org" <ge...@lucene.apache.org> 
Sent: Thursday, March 28, 2013 3:22 PM
Subject: Re: Could not load config for solrconfig.xml
 
On 29 March 2013 00:19, A. Lotfi <ma...@yahoo.com> wrote:
> Hi,
> solr setup in windows worked fine,
> I tried to follow installing solr in unix, when I started tomcat I got this exxception :
[...]

Seems it cannot find solrconfig.xml. The relevant part from the logs is:
Caused by: java.io.IOException: Can't find resource 'solrconfig.xml' in classpat
h or '/home/javaguys/solr-home/collection1/conf/', cwd=/home/spbear/javaguys/apa
che-tomcat-7.0.39/bin

Have you defined the solr/home property properly in your Solr
configuration file?

Regards,
Gora

Re: Could not load config for solrconfig.xml

Posted by "A. Lotfi" <ma...@yahoo.com>.
Thanks, 
my path to solr home was missing something, it's worlking, but no results, the same solr app with same configuration files worked in windows.
 
Abdel


________________________________
 From: Gora Mohanty <go...@mimirtech.com>
To: solr-user@lucene.apache.org; A. Lotfi <ma...@yahoo.com> 
Cc: "general@lucene.apache.org" <ge...@lucene.apache.org> 
Sent: Thursday, March 28, 2013 3:22 PM
Subject: Re: Could not load config for solrconfig.xml
 
On 29 March 2013 00:19, A. Lotfi <ma...@yahoo.com> wrote:
> Hi,
> solr setup in windows worked fine,
> I tried to follow installing solr in unix, when I started tomcat I got this exxception :
[...]

Seems it cannot find solrconfig.xml. The relevant part from the logs is:
Caused by: java.io.IOException: Can't find resource 'solrconfig.xml' in classpat
h or '/home/javaguys/solr-home/collection1/conf/', cwd=/home/spbear/javaguys/apa
che-tomcat-7.0.39/bin

Have you defined the solr/home property properly in your Solr
configuration file?

Regards,
Gora

Re: Could not load config for solrconfig.xml

Posted by Gora Mohanty <go...@mimirtech.com>.
On 29 March 2013 00:19, A. Lotfi <ma...@yahoo.com> wrote:
> Hi,
> solr setup in windows worked fine,
> I tried to follow installing solr in unix, when I started tomcat I got this exxception :
[...]

Seems it cannot find solrconfig.xml. The relevant part from the logs is:
Caused by: java.io.IOException: Can't find resource 'solrconfig.xml' in classpat
h or '/home/javaguys/solr-home/collection1/conf/', cwd=/home/spbear/javaguys/apa
che-tomcat-7.0.39/bin

Have you defined the solr/home property properly in your Solr
configuration file?

Regards,
Gora

Re: Could not load config for solrconfig.xml

Posted by Gora Mohanty <go...@mimirtech.com>.
On 29 March 2013 00:19, A. Lotfi <ma...@yahoo.com> wrote:
> Hi,
> solr setup in windows worked fine,
> I tried to follow installing solr in unix, when I started tomcat I got this exxception :
[...]

Seems it cannot find solrconfig.xml. The relevant part from the logs is:
Caused by: java.io.IOException: Can't find resource 'solrconfig.xml' in classpat
h or '/home/javaguys/solr-home/collection1/conf/', cwd=/home/spbear/javaguys/apa
che-tomcat-7.0.39/bin

Have you defined the solr/home property properly in your Solr
configuration file?

Regards,
Gora

Could not load config for solrconfig.xml

Posted by "A. Lotfi" <ma...@yahoo.com>.
Hi,
solr setup in windows worked fine,
I tried to follow installing solr in unix, when I started tomcat I got this exxception :


SEVERE: Unable to create core: collection1
org.apache.solr.common.SolrException: Could not load config for solrconfig.xml
        at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java
:991)
        at org.apache.solr.core.CoreContainer.create(CoreContainer.java:1051)
        at org.apache.solr.core.CoreContainer$3.call(CoreContainer.java:634)
        at org.apache.solr.core.CoreContainer$3.call(CoreContainer.java:629)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:44
1)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.IOException: Can't find resource 'solrconfig.xml' in classpat
h or '/home/javaguys/solr-home/collection1/conf/', cwd=/home/spbear/javaguys/apa
che-tomcat-7.0.39/bin
        at org.apache.solr.core.SolrResourceLoader.openResource(SolrResourceLoad
er.java:318)
        at org.apache.solr.core.SolrResourceLoader.openConfig(SolrResourceLoader
.java:283)
        at org.apache.solr.core.Config.<init>(Config.java:103)
        at org.apache.solr.core.Config.<init>(Config.java:73)
        at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:117)
        at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java
:989)
        ... 11 more
Mar 28, 2013 1:39:43 PM org.apache.solr.common.SolrException log
SEVERE: null:org.apache.solr.common.SolrException: Unable to create core: collec
tion1
        at org.apache.solr.core.CoreContainer.recordAndThrow(CoreContainer.java:
1672)
        at org.apache.solr.core.CoreContainer.create(CoreContainer.java:1057)
        at org.apache.solr.core.CoreContainer$3.call(CoreContainer.java:634)
        at org.apache.solr.core.CoreContainer$3.call(CoreContainer.java:629)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:44
1)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
        at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.solr.common.SolrException: Could not load config for solrc
onfig.xml
        at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java
:991)
        at org.apache.solr.core.CoreContainer.create(CoreContainer.java:1051)
        ... 10 more
Caused by: java.io.IOException: Can't find resource 'solrconfig.xml' in classpat
h or '/home/javaguys/solr-home/collection1/conf/', cwd=/home/spbear/javaguys/apa
che-tomcat-7.0.39/bin
        at org.apache.solr.core.SolrResourceLoader.openResource(SolrResourceLoad
er.java:318)
        at org.apache.solr.core.SolrResourceLoader.openConfig(SolrResourceLoader
.java:283)
        at org.apache.solr.core.Config.<init>(Config.java:103)
        at org.apache.solr.core.Config.<init>(Config.java:73)
        at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:117)
        at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java
:989)
        ... 11 more

Mar 28, 2013 1:39:43 PM org.apache.solr.servlet.SolrDispatchFilter init
INFO: user.dir=/home/spbear/javaguys/apache-tomcat-7.0.39/bin
Mar 28, 2013 1:39:43 PM org.apache.solr.servlet.SolrDispatchFilter init
INFO: SolrDispatchFilter.init() done
Mar 28, 2013 1:39:43 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /home/spbear/javaguys/apache-tomcat-7.
INFO: Registering Log Listener
Mar 28, 2013 1:39:42 PM org.apache.solr.core.CoreContainer create
INFO: Creating SolrCore 'collection1' using instanceDir: /home/javaguys/solr-hom
e/collection1
Mar 28, 2013 1:39:42 PM org.apache.solr.core.SolrResourceLoader <init>
INFO: new SolrResourceLoader for directory: '/home/javaguys/solr-home/collection
1/'
Mar 28, 2013 1:39:43 PM org.apache.solr.core.CoreContainer recordAndThrow
SEVERE: Unable to create core: collection1
org.apache.solr.common.SolrException: Could not load config for solrconfig.xml
        at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java
:991)
        at org.apache.solr.core.CoreContainer.create(CoreContainer.java:1051)
        at org.apache.solr.core.CoreContainer$3.call(CoreContainer.java:634)
        at org.apache.solr.core.CoreContainer$3.call(CoreContainer.java:629)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:44
1)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)

 Your help is appreciated.

RE: Is deltaQuery mandatory ?

Posted by Swati Swoboda <ss...@igloosoftware.com>.
No, it's not mandatory. You can't do delta imports without delta queries though; you'd need to do a full-import. Per your query, you'd only ever do objects with rownum<=5000.

-----Original Message-----
From: A. Lotfi [mailto:majidnakit@yahoo.com] 
Sent: Thursday, March 28, 2013 10:07 AM
To: general@lucene.apache.org; solr-user@lucene.apache.org
Subject: Is deltaQuery mandatory ?

Is deltaQuery mandatory in data-config.xml ?

I did it like this :
<entity name="residential" query="select * from tsunami.consumer_data_01 where state='MA' and  rownum <= 5000"
                deltaQuery="select  LEMSMATCHCODE, STREETNAME from residential where last_modified > '${dataimporter.last_index_time}'">
 
Then my manager come and said we don't need it, this is only for incremental.
I took off the line that start with deltaQuery, now in :

http://localhost:8983/solr/#/db/dataimport//dataimport


entity is empty, when I click the button Exwcute, nothing happened,

thanks.

RE: Is deltaQuery mandatory ?

Posted by "Dyer, James" <Ja...@ingramcontent.com>.
You do not need "deltaQuery" unless you're doing delta (incremental) updates.  To configure a full import, try starting with this example:

http://wiki.apache.org/solr/DataImportHandler#A_shorter_data-config

James Dyer
Ingram Content Group
(615) 213-4311


-----Original Message-----
From: A. Lotfi [mailto:majidnakit@yahoo.com] 
Sent: Thursday, March 28, 2013 9:07 AM
To: general@lucene.apache.org; solr-user@lucene.apache.org
Subject: Is deltaQuery mandatory ?

Is deltaQuery mandatory in data-config.xml ?

I did it like this :
<entity name="residential" query="select * from tsunami.consumer_data_01 where state='MA' and  rownum <= 5000"
                deltaQuery="select  LEMSMATCHCODE, STREETNAME from residential where last_modified > '${dataimporter.last_index_time}'">
 
Then my manager come and said we don't need it, this is only for incremental.
I took off the line that start with deltaQuery, now in :

http://localhost:8983/solr/#/db/dataimport//dataimport


entity is empty, when I click the button Exwcute, nothing happened,

thanks.


Is deltaQuery mandatory ?

Posted by "A. Lotfi" <ma...@yahoo.com>.
Is deltaQuery mandatory in data-config.xml ?

I did it like this :
<entity name="residential" query="select * from tsunami.consumer_data_01 where state='MA' and  rownum <= 5000"
                deltaQuery="select  LEMSMATCHCODE, STREETNAME from residential where last_modified > '${dataimporter.last_index_time}'">
 
Then my manager come and said we don't need it, this is only for incremental.
I took off the line that start with deltaQuery, now in :

http://localhost:8983/solr/#/db/dataimport//dataimport


entity is empty, when I click the button Exwcute, nothing happened,

thanks.

Re: Could not load config for solrconfig.xml

Posted by "A. Lotfi" <ma...@yahoo.com>.

 
Hi Hoss,

Thank you for replying to my question,

The solrconfig.xml in the example-DIH in solr download is exactly the same like the links you posted in your reply, so where is the big difference ?

I think I typed a mistake in my last question, instead of saying db-data-config.xml I said solrconfig.xml.

but still did not understand where that exception come from.
Your helps will be appreciated.

Abdel.

________________________________
 From: Chris Hostetter <ho...@fucit.org>
To: "general@lucene.apache.org" <ge...@lucene.apache.org>; A. Lotfi <ma...@yahoo.com> 
Sent: Wednesday, March 27, 2013 6:00 PM
Subject: Re: Could not load config for solrconfig.xml
 

1) the email list you want to be using is solr-user@lucene, not 
general@lucene

2) there is a big differnece between "solrconfig.xml" (which controls in 
general how solr works for managing a "SolrCore"); and the config files 
for DIH (which can be used to tell Solr where/how to fetch data to index) 
typically called data-config.xml (but you can name them anything you 
want).

what you have described below is a data config file for DIH, if you are 
trying to use it as a solrconfig.xml file you aren't going to get very 
far.

I suggest you take a gandar at the example config set for using DIH with a 
database...

https://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/example/example-DIH/solr/
https://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/example/example-DIH/solr/db/conf/
https://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/example/example-DIH/solr/db/conf/solrconfig.xml?view=markup
https://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/example/example-DIH/solr/db/conf/db-data-config.xml?view=log

...and keep them in mind while reviewing the DIH docs...

http://wiki.apache.org/solr/DataImportHandler



-Hoss

Re: Could not load config for solrconfig.xml

Posted by "A. Lotfi" <ma...@yahoo.com>.

 
Hi Hoss,

Thank you for replying to my question,

The solrconfig.xml in the example-DIH in solr download is exactly the same like the links you posted in your reply, so where is the big difference ?

I think I typed a mistake in my last question, instead of saying db-data-config.xml I said solrconfig.xml.

but still did not understand where that exception come from.
Your helps will be appreciated.

Abdel.

________________________________
 From: Chris Hostetter <ho...@fucit.org>
To: "general@lucene.apache.org" <ge...@lucene.apache.org>; A. Lotfi <ma...@yahoo.com> 
Sent: Wednesday, March 27, 2013 6:00 PM
Subject: Re: Could not load config for solrconfig.xml
 

1) the email list you want to be using is solr-user@lucene, not 
general@lucene

2) there is a big differnece between "solrconfig.xml" (which controls in 
general how solr works for managing a "SolrCore"); and the config files 
for DIH (which can be used to tell Solr where/how to fetch data to index) 
typically called data-config.xml (but you can name them anything you 
want).

what you have described below is a data config file for DIH, if you are 
trying to use it as a solrconfig.xml file you aren't going to get very 
far.

I suggest you take a gandar at the example config set for using DIH with a 
database...

https://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/example/example-DIH/solr/
https://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/example/example-DIH/solr/db/conf/
https://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/example/example-DIH/solr/db/conf/solrconfig.xml?view=markup
https://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/example/example-DIH/solr/db/conf/db-data-config.xml?view=log

...and keep them in mind while reviewing the DIH docs...

http://wiki.apache.org/solr/DataImportHandler



-Hoss

Could not load config for solrconfig.xml

Posted by "A. Lotfi" <ma...@yahoo.com>.
Hi,
solr setup in windows worked fine,
I tried to follow installing solr in unix, when I started tomcat I got this exxception :


SEVERE: Unable to create core: collection1
org.apache.solr.common.SolrException: Could not load config for solrconfig.xml
        at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java
:991)
        at org.apache.solr.core.CoreContainer.create(CoreContainer.java:1051)
        at org.apache.solr.core.CoreContainer$3.call(CoreContainer.java:634)
        at org.apache.solr.core.CoreContainer$3.call(CoreContainer.java:629)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:44
1)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.IOException: Can't find resource 'solrconfig.xml' in classpat
h or '/home/javaguys/solr-home/collection1/conf/', cwd=/home/spbear/javaguys/apa
che-tomcat-7.0.39/bin
        at org.apache.solr.core.SolrResourceLoader.openResource(SolrResourceLoad
er.java:318)
        at org.apache.solr.core.SolrResourceLoader.openConfig(SolrResourceLoader
.java:283)
        at org.apache.solr.core.Config.<init>(Config.java:103)
        at org.apache.solr.core.Config.<init>(Config.java:73)
        at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:117)
        at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java
:989)
        ... 11 more
Mar 28, 2013 1:39:43 PM org.apache.solr.common.SolrException log
SEVERE: null:org.apache.solr.common.SolrException: Unable to create core: collec
tion1
        at org.apache.solr.core.CoreContainer.recordAndThrow(CoreContainer.java:
1672)
        at org.apache.solr.core.CoreContainer.create(CoreContainer.java:1057)
        at org.apache.solr.core.CoreContainer$3.call(CoreContainer.java:634)
        at org.apache.solr.core.CoreContainer$3.call(CoreContainer.java:629)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:44
1)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
        at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.solr.common.SolrException: Could not load config for solrc
onfig.xml
        at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java
:991)
        at org.apache.solr.core.CoreContainer.create(CoreContainer.java:1051)
        ... 10 more
Caused by: java.io.IOException: Can't find resource 'solrconfig.xml' in classpat
h or '/home/javaguys/solr-home/collection1/conf/', cwd=/home/spbear/javaguys/apa
che-tomcat-7.0.39/bin
        at org.apache.solr.core.SolrResourceLoader.openResource(SolrResourceLoad
er.java:318)
        at org.apache.solr.core.SolrResourceLoader.openConfig(SolrResourceLoader
.java:283)
        at org.apache.solr.core.Config.<init>(Config.java:103)
        at org.apache.solr.core.Config.<init>(Config.java:73)
        at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:117)
        at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java
:989)
        ... 11 more

Mar 28, 2013 1:39:43 PM org.apache.solr.servlet.SolrDispatchFilter init
INFO: user.dir=/home/spbear/javaguys/apache-tomcat-7.0.39/bin
Mar 28, 2013 1:39:43 PM org.apache.solr.servlet.SolrDispatchFilter init
INFO: SolrDispatchFilter.init() done
Mar 28, 2013 1:39:43 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /home/spbear/javaguys/apache-tomcat-7.
INFO: Registering Log Listener
Mar 28, 2013 1:39:42 PM org.apache.solr.core.CoreContainer create
INFO: Creating SolrCore 'collection1' using instanceDir: /home/javaguys/solr-hom
e/collection1
Mar 28, 2013 1:39:42 PM org.apache.solr.core.SolrResourceLoader <init>
INFO: new SolrResourceLoader for directory: '/home/javaguys/solr-home/collection
1/'
Mar 28, 2013 1:39:43 PM org.apache.solr.core.CoreContainer recordAndThrow
SEVERE: Unable to create core: collection1
org.apache.solr.common.SolrException: Could not load config for solrconfig.xml
        at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java
:991)
        at org.apache.solr.core.CoreContainer.create(CoreContainer.java:1051)
        at org.apache.solr.core.CoreContainer$3.call(CoreContainer.java:634)
        at org.apache.solr.core.CoreContainer$3.call(CoreContainer.java:629)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:44
1)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)

 Your help is appreciated.

Is deltaQuery mandatory ?

Posted by "A. Lotfi" <ma...@yahoo.com>.
Is deltaQuery mandatory in data-config.xml ?

I did it like this :
<entity name="residential" query="select * from tsunami.consumer_data_01 where state='MA' and  rownum <= 5000"
                deltaQuery="select  LEMSMATCHCODE, STREETNAME from residential where last_modified > '${dataimporter.last_index_time}'">
 
Then my manager come and said we don't need it, this is only for incremental.
I took off the line that start with deltaQuery, now in :

http://localhost:8983/solr/#/db/dataimport//dataimport


entity is empty, when I click the button Exwcute, nothing happened,

thanks.

Re: Could not load config for solrconfig.xml

Posted by Chris Hostetter <ho...@fucit.org>.
1) the email list you want to be using is solr-user@lucene, not 
general@lucene

2) there is a big differnece between "solrconfig.xml" (which controls in 
general how solr works for managing a "SolrCore"); and the config files 
for DIH (which can be used to tell Solr where/how to fetch data to index) 
typically called data-config.xml (but you can name them anything you 
want).

what you have described below is a data config file for DIH, if you are 
trying to use it as a solrconfig.xml file you aren't going to get very 
far.

I suggest you take a gandar at the example config set for using DIH with a 
database...

https://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/example/example-DIH/solr/
https://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/example/example-DIH/solr/db/conf/
https://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/example/example-DIH/solr/db/conf/solrconfig.xml?view=markup
https://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/example/example-DIH/solr/db/conf/db-data-config.xml?view=log

...and keep them in mind while reviewing the DIH docs...

http://wiki.apache.org/solr/DataImportHandler



-Hoss