Cannot run Solr4 from Intellij Idea

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Cannot run Solr4 from Intellij Idea

Artem Lukanin
After 2 days I have figured out how to open Solr 4 in IntelliJ IDEA 11.1.4 on Tomcat 7. IntelliJ IDEA finds webapp/web/WEB-INF/web.xml and offers to make a facet from it and adds this facet to the "parent" module, from which an artifact can be created.

The problem is that Solr cannot run properly. I get this message:

SEVERE: Unable to create core: mycore
org.apache.solr.common.SolrException: Plugin init failure for [schema.xml] fieldType "text": Plugin init failure for [schema.xml] analyzer/tokenizer: Error loading class 'solr.StandardTokenizerFactory'
        at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:177)
        at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:369)
        at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:113)
        at org.apache.solr.core.CoreContainer.create(CoreContainer.java:846)
        at org.apache.solr.core.CoreContainer.load(CoreContainer.java:534)
        at org.apache.solr.core.CoreContainer.load(CoreContainer.java:356)
        at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:308)
        at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:107)
        at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:277)
        at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)
        at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:382)
        at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:103)
        at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:650)
        at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1582)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        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(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.solr.common.SolrException: Plugin init failure for [schema.xml] analyzer/tokenizer: Error loading class 'solr.StandardTokenizerFactory'
        at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:177)
        at org.apache.solr.schema.FieldTypePluginLoader.readAnalyzer(FieldTypePluginLoader.java:344)
        at org.apache.solr.schema.FieldTypePluginLoader.create(FieldTypePluginLoader.java:95)
        at org.apache.solr.schema.FieldTypePluginLoader.create(FieldTypePluginLoader.java:43)
        at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:151)
        ... 25 more
Caused by: org.apache.solr.common.SolrException: Error loading class 'solr.StandardTokenizerFactory'
        at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:436)
        at org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:457)
        at org.apache.solr.util.plugin.AbstractPluginLoader.create(AbstractPluginLoader.java:89)
        at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:151)
        ... 29 more
Caused by: java.lang.ClassNotFoundException: solr.StandardTokenizerFactory
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:627)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:247)
        at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:420)
        ... 32 more

I tried to debug it and found it cannot resolve 'solr.StandardTokenizerFactory' because it searches this class inside solr, when it is inside lucene. I can update my schema.xml and replace all solr shorname with full class names, but I don't think it is correct, because Solr runs properly with this schema on Tomcat 7 if run not from Intellij Idea.

Does anybody know how to solve this problem without expanding "solr." shortname into full lucene class names? Or can anybody advise me on proper configuring Intellij Idea with Solr 4 on Tomcat 7? http://wiki.apache.org/lucene-java/HowtoConfigureIntelliJ didn't help.
Reply | Threaded
Open this post in threaded view
|

Re: Cannot run Solr4 from Intellij Idea

Aaron Daubman
Interestingly, I have run in to this same (or very similar) issue when
attempting to run embedded solr. All of the solr.* classes that were
recently moved to lucene would not work with the solr.* shorthand - I had
to replace them with the full classpath. As you found, these shorthands in
the same schema worked fine from within solr "proper" (webapp).

Is there a workaround for this? (It would be great to have a unified schema
between embedded and webapp solr instances)

Thanks,
     Aaron


On Tue, Dec 4, 2012 at 7:37 AM, Artyom <[hidden email]> wrote:

> After 2 days I have figured out how to open Solr 4 in IntelliJ IDEA 11.1.4
> on
> Tomcat 7. IntelliJ IDEA finds webapp/web/WEB-INF/web.xml and offers to make
> a facet from it and adds this facet to the "parent" module, from which an
> artifact can be created.
>
> The problem is that Solr cannot run properly. I get this message:
>
> SEVERE: Unable to create core: mycore
> org.apache.solr.common.SolrException: Plugin init failure for [schema.xml]
> fieldType "text": Plugin init failure for [schema.xml] analyzer/tokenizer:
> Error loading class 'solr.StandardTokenizerFactory'
>         at
>
> org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:177)
>         at
> org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:369)
>         at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:113)
>         at
> org.apache.solr.core.CoreContainer.create(CoreContainer.java:846)
>         at org.apache.solr.core.CoreContainer.load(CoreContainer.java:534)
>         at org.apache.solr.core.CoreContainer.load(CoreContainer.java:356)
>         at
>
> org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:308)
>         at
>
> org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:107)
>         at
>
> org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:277)
>         at
>
> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)
>         at
>
> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:382)
>         at
>
> org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:103)
>         at
>
> org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650)
>         at
>
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306)
>         at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>         at
>
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
>         at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
>         at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)
>         at
>
> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:650)
>         at
>
> org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1582)
>         at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         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(ThreadPoolExecutor.java:886)
>         at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:662)
> Caused by: org.apache.solr.common.SolrException: Plugin init failure for
> [schema.xml] analyzer/tokenizer: Error loading class
> 'solr.StandardTokenizerFactory'
>         at
>
> org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:177)
>         at
>
> org.apache.solr.schema.FieldTypePluginLoader.readAnalyzer(FieldTypePluginLoader.java:344)
>         at
>
> org.apache.solr.schema.FieldTypePluginLoader.create(FieldTypePluginLoader.java:95)
>         at
>
> org.apache.solr.schema.FieldTypePluginLoader.create(FieldTypePluginLoader.java:43)
>         at
>
> org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:151)
>         ... 25 more
> Caused by: org.apache.solr.common.SolrException: Error loading class
> 'solr.StandardTokenizerFactory'
>         at
>
> org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:436)
>         at
>
> org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:457)
>         at
>
> org.apache.solr.util.plugin.AbstractPluginLoader.create(AbstractPluginLoader.java:89)
>         at
>
> org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:151)
>         ... 29 more
> Caused by: java.lang.ClassNotFoundException: solr.StandardTokenizerFactory
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>         at
> java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:627)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:247)
>         at
>
> org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:420)
>         ... 32 more
>
> I tried to debug it and found it cannot resolve
> 'solr.StandardTokenizerFactory' because it searches this class inside solr,
> when it is inside lucene. I can update my schema.xml and replace all solr
> shorname with full class names, but I don't think it is correct, because
> Solr runs properly with this schema on Tomcat 7 if run not from Intellij
> Idea.
>
> Does anybody know how to solve this problem without expanding "solr."
> shortname into full lucene class names? Or can anybody advise me on proper
> configuring Intellij Idea with Solr 4 on Tomcat 7?
> http://wiki.apache.org/lucene-java/HowtoConfigureIntelliJ didn't help.
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Cannot-run-Solr4-from-Intellij-Idea-tp4024233.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: Cannot run Solr4 from Intellij Idea

Artem Lukanin
In reply to this post by Artem Lukanin
InelliJ IDEA is not so intelligent with Solr: to fix this problem I've dragged these modules into the IDEA's artifact (parent module is wrong):

analysis-common
analysis-extras
analysis-uima
clustering
codecs
codecs-resources
dataimporthandler
dataimporthandler-extras
lucene-core
lucene-core-resources
solr-core
Reply | Threaded
Open this post in threaded view
|

Re: Cannot run Solr4 from Intellij Idea

sarowe
Hi Artyom,

I don't use IntelliJ artifacts - I just edit/compile/test.

I can include this stuff in the IntelliJ configuration if you'll help me.  Can you share screenshots of what you're talking about, and/or IntelliJ config files?

Steve

On Dec 5, 2012, at 8:24 AM, Artyom <[hidden email]> wrote:

> InelliJ IDEA is not so intelligent with Solr: to fix this problem I've
> dragged these modules into the IDEA's artifact (parent module is wrong):
>
> analysis-common
> analysis-extras
> analysis-uima
> clustering
> codecs
> codecs-resources
> dataimporthandler
> dataimporthandler-extras
> lucene-core
> lucene-core-resources
> solr-core
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Cannot-run-Solr4-from-Intellij-Idea-tp4024233p4024452.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re[2]: Cannot run Solr4 from Intellij Idea

Artem Lukanin
See the screenshots:

solr_idea1: adding an IDEA tomcat artifact
solr_idea2: adding an IDEA facet
solr_idea3: placing modules into the artifact (drag modules from the "Available Elements" to <output root>) and the created facet


Среда, 5 декабря 2012, 7:28 от "sarowe [via Lucene]" <[hidden email]>:
Hi Artyom,

I don't use IntelliJ artifacts - I just edit/compile/test.

I can include this stuff in the IntelliJ configuration if you'll help me.  Can you share screenshots of what you're talking about, and/or IntelliJ config files?

Steve

On Dec 5, 2012, at 8:24 AM, Artyom <[hidden email]> wrote:

> InelliJ IDEA is not so intelligent with Solr: to fix this problem I've
> dragged these modules into the IDEA's artifact (parent module is wrong):
>
> analysis-common
> analysis-extras
> analysis-uima
> clustering
> codecs
> codecs-resources
> dataimporthandler
> dataimporthandler-extras
> lucene-core
> lucene-core-resources
> solr-core
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Cannot-run-Solr4-from-Intellij-Idea-tp4024233p4024452.html
> Sent from the Solr - User mailing list archive at Nabble.com.



If you reply to this email, your message will be added to the discussion below:
http://lucene.472066.n3.nabble.com/Cannot-run-Solr4-from-Intellij-Idea-tp4024233p4024484.html
To unsubscribe from Cannot run Solr4 from Intellij Idea, click here.
NAML


=?UTF-8?B?c29scl9pZGVhMS5wbmc=?= (102K) Download Attachment
=?UTF-8?B?c29scl9pZGVhMi5wbmc=?= (117K) Download Attachment
=?UTF-8?B?c29scl9pZGVhMy5wbmc=?= (148K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Re[2]: Cannot run Solr4 from Intellij Idea

Erick Erickson
Why do this? It's trivial to attach IntelliJ to a running solr, just create
"remote" configuration. When you do, it'll give you parameters you'll be
able to start Solr with and attach from IntelliJ, set breakpoints, etc.
Something like:
java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5900
-jar start.jar

You'll get the parameters to start Solr with when you create the "remote"
configuration in IntelliJ. Then, I do an "ant example" from
<solrhome>/solr, go into the example dir and I'm off to the races. The
"suspend=y" means that solr just sits there until you attach IntelliJ.

I suspect that if you've copied things around, if you change Solr you'll
have a world of problems getting the changed jars to the right places.

It's a bit of a pain that when you do make changes to solr code, you have
to do another "ant example" but if your goal is to simply step through Solr
code, it's much easier to do a remote debugging session.

Best
Erick


On Wed, Dec 5, 2012 at 11:55 PM, Artyom <[hidden email]> wrote:

> See the screenshots:
>
> solr_idea1: adding an IDEA tomcat artifact
> solr_idea2: adding an IDEA facet
> solr_idea3: placing modules into the artifact (drag modules from the
> "Available Elements" to <output root>) and the created facet
>
>
> Среда,  5 декабря 2012, 7:28  от "sarowe [via Lucene]" <
> [hidden email]>:
> >
> >
> >
>
>
> >
>
>
>
> >
>
>         Hi Artyom,
> >
> >I don't use IntelliJ artifacts - I just edit/compile/test.
> >
> >I can include this stuff in the IntelliJ configuration if you'll help me.
>  Can you share screenshots of what you're talking about, and/or IntelliJ
> config files?
> >
> >Steve
> >
> >On Dec 5, 2012, at 8:24 AM, Artyom <[hidden email]> wrote:
> >
> >
> >> InelliJ IDEA is not so intelligent with Solr: to fix this problem I've
> >> dragged these modules into the IDEA's artifact (parent module is wrong):
> >>
> >> analysis-common
> >> analysis-extras
> >> analysis-uima
> >> clustering
> >> codecs
> >> codecs-resources
> >> dataimporthandler
> >> dataimporthandler-extras
> >> lucene-core
> >> lucene-core-resources
> >> solr-core
> >>
> >>
> >>
> >> --
> >> View this message in context:
> http://lucene.472066.n3.nabble.com/Cannot-run-Solr4-from-Intellij-Idea-tp4024233p4024452.html
> >> Sent from the Solr - User mailing list archive at Nabble.com.
> >
>
>
>
>
>
> >
>
> >
>
> >>----------------------------------------------------------------------
> >
> >
>
> >If you reply to this email, your message will be added to the discussion
> below:
>
> http://lucene.472066.n3.nabble.com/Cannot-run-Solr4-from-Intellij-Idea-tp4024233p4024484.html
>
>
> >
>
>                 To unsubscribe from Cannot run Solr4 from Intellij Idea,
> click here.
> >
>                 NAML
>
> >
>
>
>
>
>
> >
>
>
>
> =?UTF-8?B?c29scl9pZGVhMS5wbmc=?= (102K) <
> http://lucene.472066.n3.nabble.com/attachment/4024723/0/%3D%3FUTF-8%3FB%3Fc29scl9pZGVhMS5wbmc%3D%3F%3D
> >
> =?UTF-8?B?c29scl9pZGVhMi5wbmc=?= (117K) <
> http://lucene.472066.n3.nabble.com/attachment/4024723/1/%3D%3FUTF-8%3FB%3Fc29scl9pZGVhMi5wbmc%3D%3F%3D
> >
> =?UTF-8?B?c29scl9pZGVhMy5wbmc=?= (148K) <
> http://lucene.472066.n3.nabble.com/attachment/4024723/2/%3D%3FUTF-8%3FB%3Fc29scl9pZGVhMy5wbmc%3D%3F%3D
> >
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Cannot-run-Solr4-from-Intellij-Idea-tp4024233p4024723.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: Cannot run Solr4 from Intellij Idea

sarowe
+1 to using IntelliJ's remote debugging facilities.

I've done this with Tomcat too - just edit catalina.sh to add the parameters to the JVM invocation that the IntelliJ remote run configuration suggests.

With Tomcat you'll have to build the war using the Ant build, but that's more sensible anyway, since that's the official/supported build.

Steve

On Dec 6, 2012, at 7:06 PM, Erick Erickson <[hidden email]> wrote:

> Why do this? It's trivial to attach IntelliJ to a running solr, just create
> "remote" configuration. When you do, it'll give you parameters you'll be
> able to start Solr with and attach from IntelliJ, set breakpoints, etc.
> Something like:
> java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5900
> -jar start.jar
>
> You'll get the parameters to start Solr with when you create the "remote"
> configuration in IntelliJ. Then, I do an "ant example" from
> <solrhome>/solr, go into the example dir and I'm off to the races. The
> "suspend=y" means that solr just sits there until you attach IntelliJ.
>
> I suspect that if you've copied things around, if you change Solr you'll
> have a world of problems getting the changed jars to the right places.
>
> It's a bit of a pain that when you do make changes to solr code, you have
> to do another "ant example" but if your goal is to simply step through Solr
> code, it's much easier to do a remote debugging session.
>
> Best
> Erick
>
>
> On Wed, Dec 5, 2012 at 11:55 PM, Artyom <[hidden email]> wrote:
>
>> See the screenshots:
>>
>> solr_idea1: adding an IDEA tomcat artifact
>> solr_idea2: adding an IDEA facet
>> solr_idea3: placing modules into the artifact (drag modules from the
>> "Available Elements" to <output root>) and the created facet
>>
>>
>> Среда,  5 декабря 2012, 7:28  от "sarowe [via Lucene]" <
>> [hidden email]>:
>>>
>>>
>>>
>>
>>
>>>
>>
>>
>>
>>>
>>
>>        Hi Artyom,
>>>
>>> I don't use IntelliJ artifacts - I just edit/compile/test.
>>>
>>> I can include this stuff in the IntelliJ configuration if you'll help me.
>> Can you share screenshots of what you're talking about, and/or IntelliJ
>> config files?
>>>
>>> Steve
>>>
>>> On Dec 5, 2012, at 8:24 AM, Artyom <[hidden email]> wrote:
>>>
>>>
>>>> InelliJ IDEA is not so intelligent with Solr: to fix this problem I've
>>>> dragged these modules into the IDEA's artifact (parent module is wrong):
>>>>
>>>> analysis-common
>>>> analysis-extras
>>>> analysis-uima
>>>> clustering
>>>> codecs
>>>> codecs-resources
>>>> dataimporthandler
>>>> dataimporthandler-extras
>>>> lucene-core
>>>> lucene-core-resources
>>>> solr-core
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context:
>> http://lucene.472066.n3.nabble.com/Cannot-run-Solr4-from-Intellij-Idea-tp4024233p4024452.html
>>>> Sent from the Solr - User mailing list archive at Nabble.com.
>>>
>>
>>
>>
>>
>>
>>>
>>
>>>
>>
>>>> ----------------------------------------------------------------------
>>>
>>>
>>
>>> If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://lucene.472066.n3.nabble.com/Cannot-run-Solr4-from-Intellij-Idea-tp4024233p4024484.html
>>
>>
>>>
>>
>>                To unsubscribe from Cannot run Solr4 from Intellij Idea,
>> click here.
>>>
>>                NAML
>>
>>>
>>
>>
>>
>>
>>
>>>
>>
>>
>>
>> =?UTF-8?B?c29scl9pZGVhMS5wbmc=?= (102K) <
>> http://lucene.472066.n3.nabble.com/attachment/4024723/0/%3D%3FUTF-8%3FB%3Fc29scl9pZGVhMS5wbmc%3D%3F%3D
>>>
>> =?UTF-8?B?c29scl9pZGVhMi5wbmc=?= (117K) <
>> http://lucene.472066.n3.nabble.com/attachment/4024723/1/%3D%3FUTF-8%3FB%3Fc29scl9pZGVhMi5wbmc%3D%3F%3D
>>>
>> =?UTF-8?B?c29scl9pZGVhMy5wbmc=?= (148K) <
>> http://lucene.472066.n3.nabble.com/attachment/4024723/2/%3D%3FUTF-8%3FB%3Fc29scl9pZGVhMy5wbmc%3D%3F%3D
>>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://lucene.472066.n3.nabble.com/Cannot-run-Solr4-from-Intellij-Idea-tp4024233p4024723.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>

Reply | Threaded
Open this post in threaded view
|

Re[4]: Cannot run Solr4 from Intellij Idea

Artem Lukanin
In reply to this post by Erick Erickson
Thank you. I will read about these commands.
I don't copy anything anywhere. I just edit the code and click Run, IDEA does everything for me. I guess, IDEA's artifacts are exactly for these routines.

Anyway, there are no such instructions, you described, anywhere in the solr wiki, so it's hard to start developing Solr for novices like me.


Четверг, 6 декабря 2012, 16:06 от "Erick Erickson [via Lucene]" <[hidden email]>:
Why do this? It's trivial to attach IntelliJ to a running solr, just create
"remote" configuration. When you do, it'll give you parameters you'll be
able to start Solr with and attach from IntelliJ, set breakpoints, etc.
Something like:
java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5900
-jar start.jar

You'll get the parameters to start Solr with when you create the "remote"
configuration in IntelliJ. Then, I do an "ant example" from
<solrhome>/solr, go into the example dir and I'm off to the races. The
"suspend=y" means that solr just sits there until you attach IntelliJ.

I suspect that if you've copied things around, if you change Solr you'll
have a world of problems getting the changed jars to the right places.

It's a bit of a pain that when you do make changes to solr code, you have
to do another "ant example" but if your goal is to simply step through Solr
code, it's much easier to do a remote debugging session.

Best
Erick


On Wed, Dec 5, 2012 at 11:55 PM, Artyom <[hidden email]> wrote:

> See the screenshots:
>
> solr_idea1: adding an IDEA tomcat artifact
> solr_idea2: adding an IDEA facet
> solr_idea3: placing modules into the artifact (drag modules from the
> "Available Elements" to <output root>) and the created facet
>
>
> Среда,  5 декабря 2012, 7:28  от "sarowe [via Lucene]" <
> [hidden email]>:
> >
> >
> >
>
>
> >
>
>
>
> >
>
>         Hi Artyom,
> >
> >I don't use IntelliJ artifacts - I just edit/compile/test.
> >
> >I can include this stuff in the IntelliJ configuration if you'll help me.
>  Can you share screenshots of what you're talking about, and/or IntelliJ
> config files?
> >
> >Steve
> >
> >On Dec 5, 2012, at 8:24 AM, Artyom <[hidden email]> wrote:
> >
> >
> >> InelliJ IDEA is not so intelligent with Solr: to fix this problem I've
> >> dragged these modules into the IDEA's artifact (parent module is wrong):
> >>
> >> analysis-common
> >> analysis-extras
> >> analysis-uima
> >> clustering
> >> codecs
> >> codecs-resources
> >> dataimporthandler
> >> dataimporthandler-extras
> >> lucene-core
> >> lucene-core-resources
> >> solr-core
> >>
> >>
> >>
> >> --
> >> View this message in context:
> http://lucene.472066.n3.nabble.com/Cannot-run-Solr4-from-Intellij-Idea-tp4024233p4024452.html
> >> Sent from the Solr - User mailing list archive at Nabble.com.
> >
>
>
>
>
>
> >
>
> >
>
> >>----------------------------------------------------------------------
> >
> >
>
> >If you reply to this email, your message will be added to the discussion
> below:
>
> http://lucene.472066.n3.nabble.com/Cannot-run-Solr4-from-Intellij-Idea-tp4024233p4024484.html
>
>
> >
>
>                 To unsubscribe from Cannot run Solr4 from Intellij Idea,
> click here.
> >
>                 NAML
>
> >
>
>
>
>
>
> >
>
>
>
> =?UTF-8?B?c29scl9pZGVhMS5wbmc=?= (102K) <
> http://lucene.472066.n3.nabble.com/attachment/4024723/0/%3D%3FUTF-8%3FB%3Fc29scl9pZGVhMS5wbmc%3D%3F%3D
> >
> =?UTF-8?B?c29scl9pZGVhMi5wbmc=?= (117K) <
> http://lucene.472066.n3.nabble.com/attachment/4024723/1/%3D%3FUTF-8%3FB%3Fc29scl9pZGVhMi5wbmc%3D%3F%3D
> >
> =?UTF-8?B?c29scl9pZGVhMy5wbmc=?= (148K) <
> http://lucene.472066.n3.nabble.com/attachment/4024723/2/%3D%3FUTF-8%3FB%3Fc29scl9pZGVhMy5wbmc%3D%3F%3D
> >
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Cannot-run-Solr4-from-Intellij-Idea-tp4024233p4024723.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



If you reply to this email, your message will be added to the discussion below:
http://lucene.472066.n3.nabble.com/Cannot-run-Solr4-from-Intellij-Idea-tp4024233p4024970.html
To unsubscribe from Cannot run Solr4 from Intellij Idea, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: Re[4]: Cannot run Solr4 from Intellij Idea

Erick Erickson
Good point. There is some documentation now, see:
http://wiki.apache.org/lucene-java/HowtoConfigureIntelliJ

Please feel free to modify the instructions any way you see fit, it's often
valuable to have someone who's fresh look over instructions and clarify
steps..

Best
Erick


On Thu, Dec 6, 2012 at 9:22 PM, Artyom <[hidden email]> wrote:

> Thank you. I will read about these commands.
> I don't copy anything anywhere. I just edit the code and click Run, IDEA
> does everything for me. I guess, IDEA's artifacts are exactly for these
> routines.
>
> Anyway, there are no such instructions, you described, anywhere in the
> solr wiki, so it's hard to start developing Solr for novices like me.
>
>
> Четверг,  6 декабря 2012, 16:06  от "Erick Erickson [via Lucene]" <
> [hidden email]>:
> >
> >
> >
>
>
> >
>
>
>
> >
>
>         Why do this? It's trivial to attach IntelliJ to a running solr,
> just create
> >"remote" configuration. When you do, it'll give you parameters you'll be
> >able to start Solr with and attach from IntelliJ, set breakpoints, etc.
> >Something like:
> >java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5900
> >-jar start.jar
> >
> >You'll get the parameters to start Solr with when you create the "remote"
> >configuration in IntelliJ. Then, I do an "ant example" from
> ><solrhome>/solr, go into the example dir and I'm off to the races. The
> >"suspend=y" means that solr just sits there until you attach IntelliJ.
> >
> >I suspect that if you've copied things around, if you change Solr you'll
> >have a world of problems getting the changed jars to the right places.
> >
> >It's a bit of a pain that when you do make changes to solr code, you have
> >to do another "ant example" but if your goal is to simply step through
> Solr
> >code, it's much easier to do a remote debugging session.
> >
> >Best
> >Erick
> >
> >
> >On Wed, Dec 5, 2012 at 11:55 PM, Artyom <[hidden email]> wrote:
> >
> >
> >> See the screenshots:
> >>
> >> solr_idea1: adding an IDEA tomcat artifact
> >> solr_idea2: adding an IDEA facet
> >> solr_idea3: placing modules into the artifact (drag modules from the
> >> "Available Elements" to <output root>) and the created facet
> >>
> >>
> >> Среда,  5 декабря 2012, 7:28  от "sarowe [via Lucene]" <
> >> [hidden email]>:
> >> >
> >> >
> >> >
> >>
> >>
> >> >
> >>
> >>
> >>
> >> >
> >>
> >>         Hi Artyom,
> >> >
> >> >I don't use IntelliJ artifacts - I just edit/compile/test.
> >> >
> >> >I can include this stuff in the IntelliJ configuration if you'll help
> me.
> >>  Can you share screenshots of what you're talking about, and/or IntelliJ
> >> config files?
> >> >
> >> >Steve
> >> >
> >> >On Dec 5, 2012, at 8:24 AM, Artyom <[hidden email]> wrote:
> >> >
> >> >
> >> >> InelliJ IDEA is not so intelligent with Solr: to fix this problem
> I've
> >> >> dragged these modules into the IDEA's artifact (parent module is
> wrong):
> >> >>
> >> >> analysis-common
> >> >> analysis-extras
> >> >> analysis-uima
> >> >> clustering
> >> >> codecs
> >> >> codecs-resources
> >> >> dataimporthandler
> >> >> dataimporthandler-extras
> >> >> lucene-core
> >> >> lucene-core-resources
> >> >> solr-core
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> View this message in context:
> >>
> http://lucene.472066.n3.nabble.com/Cannot-run-Solr4-from-Intellij-Idea-tp4024233p4024452.html
> >> >> Sent from the Solr - User mailing list archive at Nabble.com.
> >> >
> >>
> >>
> >>
> >>
> >>
> >> >
> >>
> >> >
> >>
> >> >>----------------------------------------------------------------------
> >> >
> >> >
> >>
> >> >If you reply to this email, your message will be added to the
> discussion
> >> below:
> >>
> >>
> http://lucene.472066.n3.nabble.com/Cannot-run-Solr4-from-Intellij-Idea-tp4024233p4024484.html
> >>
> >>
> >> >
> >>
> >>                 To unsubscribe from Cannot run Solr4 from Intellij Idea,
> >> click here.
> >> >
> >>                 NAML
> >>
> >> >
> >>
> >>
> >>
> >>
> >>
> >> >
> >>
> >>
> >>
> >> =?UTF-8?B?c29scl9pZGVhMS5wbmc=?= (102K) <
> >>
> http://lucene.472066.n3.nabble.com/attachment/4024723/0/%3D%3FUTF-8%3FB%3Fc29scl9pZGVhMS5wbmc%3D%3F%3D
> >> >
> >> =?UTF-8?B?c29scl9pZGVhMi5wbmc=?= (117K) <
> >>
> http://lucene.472066.n3.nabble.com/attachment/4024723/1/%3D%3FUTF-8%3FB%3Fc29scl9pZGVhMi5wbmc%3D%3F%3D
> >> >
> >> =?UTF-8?B?c29scl9pZGVhMy5wbmc=?= (148K) <
> >>
> http://lucene.472066.n3.nabble.com/attachment/4024723/2/%3D%3FUTF-8%3FB%3Fc29scl9pZGVhMy5wbmc%3D%3F%3D
> >> >
> >>
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://lucene.472066.n3.nabble.com/Cannot-run-Solr4-from-Intellij-Idea-tp4024233p4024723.html
> >> Sent from the Solr - User mailing list archive at Nabble.com.
> >>
> >
>
>
>
>
>
> >
>
> >
>
> >>----------------------------------------------------------------------
> >
> >
>
> >If you reply to this email, your message will be added to the discussion
> below:
>
> http://lucene.472066.n3.nabble.com/Cannot-run-Solr4-from-Intellij-Idea-tp4024233p4024970.html
>
>
> >
>
>                 To unsubscribe from Cannot run Solr4 from Intellij Idea,
> click here.
> >
>                 NAML
>
> >
>
>
>
>
>
> >
>
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Cannot-run-Solr4-from-Intellij-Idea-tp4024233p4025020.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>