lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukáš Vlček <lukas.vl...@gmail.com>
Subject Re: Solr development with IntelliJIDEA - looking for advice
Date Mon, 07 Sep 2009 09:05:44 GMT
Cool, I figured out the the error for example 1:It was on the IntelliJ IDEA
side. It is necessay to allow *.txt in resource patterns (File -> Settings
[also Ctrl + Alt + S])

Rgds,
Lukas

On Sat, Sep 5, 2009 at 10:23 PM, Lukáš Vlček <lukas.vlcek@gmail.com> wrote:

> Hi,
> First of all, thanks for all your comments. I am trying to set-up just
> "solr-core" for now.
>
> What I mean by this is that I ended up with one project having two modules
> (speaking about IntelliJ IDEA project and modules):
>
> Module 1:
>     Solr-trunk (this is what I consider to be a "solr-core")
>     path: C:\projects\asf\solr-trunk\src
>
>     source folders:
>         - common
>         - java
>         - solrj
>         - test\test-files\solr\conf    ...[!]
>
>     test source folders:
>         - test
>         - test\test-files
>
> Module 2:
>     Webapp (It is necessary to setup Webapp module as the Solr-trunk needs
> it as a dependency - but in fact it seems to be needed just by tests)
>     path: C:\projects\asf\solr-trunk\src\webapp
>
>     source fodlers:
>         - src
>
>
> Now...
> Many individual tests work with this configuration but not all.
> Example 1)
> TestQuerySenderListener
>
> java.lang.RuntimeException: Can't find resource 'stopwords.txt' in
> classpath or 'solr/conf/', cwd=C:\projects\asf\solr-trunk
> at
> org.apache.solr.core.SolrResourceLoader.openResource(SolrResourceLoader.java:197)
>  at
> org.apache.solr.core.SolrResourceLoader.getLines(SolrResourceLoader.java:242)
> at
> org.apache.solr.core.SolrResourceLoader.getLines(SolrResourceLoader.java:216)
>  at
> org.apache.solr.analysis.StopFilterFactory.inform(StopFilterFactory.java:53)
> at
> org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:426)
>  at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:102)
> at org.apache.solr.util.TestHarness.<init>(TestHarness.java:124)
>  at
> org.apache.solr.util.AbstractSolrTestCase.setUp(AbstractSolrTestCase.java:105)
> at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>  at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
>
> I don't know why it does not locate stopwords.txt file while its fodler is
> in source folders list (see [!] above).
>
> Example 2)
> TestSpellCheckResponse
>
> java.lang.RuntimeException: java.lang.RuntimeException: Can't find resource
> '../../../example/solr/conf/solrconfig.xml' in classpath or 'solr/conf/',
> cwd=C:\projects\asf\solr-trunk
>  at org.apache.solr.util.TestHarness.createConfig(TestHarness.java:85)
> at
> org.apache.solr.util.AbstractSolrTestCase.setUp(AbstractSolrTestCase.java:104)
>  at
> org.apache.solr.client.solrj.SolrExampleTestBase.setUp(SolrExampleTestBase.java:41)
> at
> org.apache.solr.client.solrj.response.TestSpellCheckResponse.setUp(TestSpellCheckResponse.java:47)
>  at
> com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>  at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
> Caused by: java.lang.RuntimeException: Can't find resource
> '../../../example/solr/conf/solrconfig.xml' in classpath or 'solr/conf/',
> cwd=C:\projects\asf\solr-trunk
>  at
> org.apache.solr.core.SolrResourceLoader.openResource(SolrResourceLoader.java:197)
> at
> org.apache.solr.core.SolrResourceLoader.openConfig(SolrResourceLoader.java:165)
>  at org.apache.solr.core.Config.<init>(Config.java:101)
> at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:123)
>  at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:89)
> at org.apache.solr.util.TestHarness.createConfig(TestHarness.java:82)
>  ... 21 more
>
> It seems that the source folders list is not complete. I probably need to
> add example folder into source folders list. That is fine but makes me think
> if solr tests are structured in an intuitive way.
>
> Regards,
> Lukas
>
> On Sat, Sep 5, 2009 at 6:11 PM, Yonik Seeley <yonik@lucidimagination.com>wrote:
>
>> On Fri, Sep 4, 2009 at 5:58 PM, Shalin Shekhar
>> Mangar<shalinmangar@gmail.com> wrote:
>> > To run a test from IDEA, set the start path (I don't remember the exact
>> > name) to src/test/test-files.
>>
>> Right, it's the "working directory".
>> I tend to run single tests via intellij for easy debugging and the
>> full testsuite from ant.
>>
>> -Yonik
>> http://www.lucidimagination.com
>>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message