How to Debug Solr With Eclipse

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to Debug Solr With Eclipse

Rainer Gnan
Hello community,

my aim is to develop solr custom code (e.g. UpdateRequestProcessor)
within Eclipse AND to test the code within a debuggable solr/lucene
local instance - also within Eclipse.
Searching the web led me to multiple instructions but for me no one
works.

The only relevant question I actually have to solve this problem is:
Where can I download the source code for the version I want that
includes the ANT build.xml for building an Eclipse-Project?

The solr project page (http://archive.apache.org/dist/lucene/solr/)
seems not to provide that.

I appreciate any hint!

Best regards
Rainer

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to Debug Solr With Eclipse

govind nitk
Hi,

Solr has releases, kindly checkout to the needed one.


cheers

On Thu, Jul 13, 2017 at 11:20 PM, Rainer Gnan <[hidden email]>
wrote:

> Hello community,
>
> my aim is to develop solr custom code (e.g. UpdateRequestProcessor)
> within Eclipse AND to test the code within a debuggable solr/lucene
> local instance - also within Eclipse.
> Searching the web led me to multiple instructions but for me no one
> works.
>
> The only relevant question I actually have to solve this problem is:
> Where can I download the source code for the version I want that
> includes the ANT build.xml for building an Eclipse-Project?
>
> The solr project page (http://archive.apache.org/dist/lucene/solr/)
> seems not to provide that.
>
> I appreciate any hint!
>
> Best regards
> Rainer
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to Debug Solr With Eclipse

Giovanni De Stefano-2
Hello Rainer,

you have the right link: select the version you want and download the -src version.

Once un untar the .tgz you can run `ant eclipse` from the command line and then import the generated project in eclipse.

Please note that you will need both and and ivy installed (just start with ant eclipse and take it from there: the script will tell you what to do next).

I hope it helps!

Cheers,
Giovanni


> On 13 Jul 2017, at 19:54, govind nitk <[hidden email]> wrote:
>
> Hi,
>
> Solr has releases, kindly checkout to the needed one.
>
>
> cheers
>
> On Thu, Jul 13, 2017 at 11:20 PM, Rainer Gnan <[hidden email]>
> wrote:
>
>> Hello community,
>>
>> my aim is to develop solr custom code (e.g. UpdateRequestProcessor)
>> within Eclipse AND to test the code within a debuggable solr/lucene
>> local instance - also within Eclipse.
>> Searching the web led me to multiple instructions but for me no one
>> works.
>>
>> The only relevant question I actually have to solve this problem is:
>> Where can I download the source code for the version I want that
>> includes the ANT build.xml for building an Eclipse-Project?
>>
>> The solr project page (http://archive.apache.org/dist/lucene/solr/)
>> seems not to provide that.
>>
>> I appreciate any hint!
>>
>> Best regards
>> Rainer
>>
>>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to Debug Solr With Eclipse

Lars Karlsson
In reply to this post by Rainer Gnan
Another option that I normally find easier is attaching to existing Solr
instance and do remote debugging.
It require changing the JVM options and restarting Solr, then from eclipse
choose Remote Java Application.

On Thu, 13 Jul 2017 at 19:50, Rainer Gnan <[hidden email]>
wrote:

> Hello community,
>
> my aim is to develop solr custom code (e.g. UpdateRequestProcessor)
> within Eclipse AND to test the code within a debuggable solr/lucene
> local instance - also within Eclipse.
> Searching the web led me to multiple instructions but for me no one
> works.
>
> The only relevant question I actually have to solve this problem is:
> Where can I download the source code for the version I want that
> includes the ANT build.xml for building an Eclipse-Project?
>
> The solr project page (http://archive.apache.org/dist/lucene/solr/)
> seems not to provide that.
>
> I appreciate any hint!
>
> Best regards
> Rainer
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Antw: Re: How to Debug Solr With Eclipse

Rainer Gnan
In reply to this post by Giovanni De Stefano-2
Hi Giovanni,

thank you for this hint!

The whole process (tar -xvf ..., ant compile, ant eclipse) untill importing the eclipse-project seems to be fine .
After importing it as an existing eclipse project the project explorer shows an error sign on the project folder.
Refreshing does not help.

-> The sub-folder lucene/src is empty ...

I am using eclipse neon, java 1.8.0_112, solr-6.6.0-src.tgz.

Any suggestions?

Cheers,
Rainer

--------------------------------------------
Rainer Gnan
Bayerische Staatsbibliothek
Verbundzentrale des BVB
Referat Verbundnahe Dienste
80807 München
Tel.: +49(0)89/28638-4445
Fax: +49(0)89/28638-2605
E-Mail: [hidden email]
--------------------------------------------



>>> Giovanni De Stefano <[hidden email]> 13.07.2017 19:59 >>>
Hello Rainer,

you have the right link: select the version you want and download the -src version.

Once un untar the .tgz you can run `ant eclipse` from the command line and then import the generated project in eclipse.

Please note that you will need both and and ivy installed (just start with ant eclipse and take it from there: the script will tell you what to do next).

I hope it helps!

Cheers,
Giovanni


> On 13 Jul 2017, at 19:54, govind nitk <[hidden email]> wrote:
>
> Hi,
>
> Solr has releases, kindly checkout to the needed one.
>
>
> cheers
>
> On Thu, Jul 13, 2017 at 11:20 PM, Rainer Gnan <[hidden email]>
> wrote:
>
>> Hello community,
>>
>> my aim is to develop solr custom code (e.g. UpdateRequestProcessor)
>> within Eclipse AND to test the code within a debuggable solr/lucene
>> local instance - also within Eclipse.
>> Searching the web led me to multiple instructions but for me no one
>> works.
>>
>> The only relevant question I actually have to solve this problem is:
>> Where can I download the source code for the version I want that
>> includes the ANT build.xml for building an Eclipse-Project?
>>
>> The solr project page (http://archive.apache.org/dist/lucene/solr/)
>> seems not to provide that.
>>
>> I appreciate any hint!
>>
>> Best regards
>> Rainer
>>
>>


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Re: How to Debug Solr With Eclipse

Erick Erickson
Rainer:

Have you seen: https://wiki.apache.org/solr/HowToContribute? There's a
section about using Eclipse and a couple of other IDEs. I use IntelliJ
so can't help there. A number of devs use Eclipse so it should work.
Please feel free to add to the docs if you find a gotcha.

You can also pull down the source code from the Git repository and
switch to whatever branch suits your fancy. What you're doing should
work so I'm not sure what's up there.

You say: The sub-folder lucene/src is empty

I'm assuming this is in Eclipse, you do have the source when you
unpack the tgz file, right?

Best,
Erick

On Fri, Jul 14, 2017 at 7:01 AM, Rainer Gnan
<[hidden email]> wrote:

> Hi Giovanni,
>
> thank you for this hint!
>
> The whole process (tar -xvf ..., ant compile, ant eclipse) untill importing the eclipse-project seems to be fine .
> After importing it as an existing eclipse project the project explorer shows an error sign on the project folder.
> Refreshing does not help.
>
> -> The sub-folder lucene/src is empty ...
>
> I am using eclipse neon, java 1.8.0_112, solr-6.6.0-src.tgz.
>
> Any suggestions?
>
> Cheers,
> Rainer
>
> --------------------------------------------
> Rainer Gnan
> Bayerische Staatsbibliothek
> Verbundzentrale des BVB
> Referat Verbundnahe Dienste
> 80807 München
> Tel.: +49(0)89/28638-4445
> Fax: +49(0)89/28638-2605
> E-Mail: [hidden email]
> --------------------------------------------
>
>
>
>>>> Giovanni De Stefano <[hidden email]> 13.07.2017 19:59 >>>
> Hello Rainer,
>
> you have the right link: select the version you want and download the -src version.
>
> Once un untar the .tgz you can run `ant eclipse` from the command line and then import the generated project in eclipse.
>
> Please note that you will need both and and ivy installed (just start with ant eclipse and take it from there: the script will tell you what to do next).
>
> I hope it helps!
>
> Cheers,
> Giovanni
>
>
>> On 13 Jul 2017, at 19:54, govind nitk <[hidden email]> wrote:
>>
>> Hi,
>>
>> Solr has releases, kindly checkout to the needed one.
>>
>>
>> cheers
>>
>> On Thu, Jul 13, 2017 at 11:20 PM, Rainer Gnan <[hidden email]>
>> wrote:
>>
>>> Hello community,
>>>
>>> my aim is to develop solr custom code (e.g. UpdateRequestProcessor)
>>> within Eclipse AND to test the code within a debuggable solr/lucene
>>> local instance - also within Eclipse.
>>> Searching the web led me to multiple instructions but for me no one
>>> works.
>>>
>>> The only relevant question I actually have to solve this problem is:
>>> Where can I download the source code for the version I want that
>>> includes the ANT build.xml for building an Eclipse-Project?
>>>
>>> The solr project page (http://archive.apache.org/dist/lucene/solr/)
>>> seems not to provide that.
>>>
>>> I appreciate any hint!
>>>
>>> Best regards
>>> Rainer
>>>
>>>
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Antw: Re: How to Debug Solr With Eclipse

Giovanni De Stefano-2
In reply to this post by Rainer Gnan
Hello Rainer,

Have you found the issue?

If not, just to be on the safe side:
1) once you extracted the .tgz you get the folder `solr-6.0.0`, cd in it and then just
2) execute `ant eclipse` and then
3) in Eclipse do Import -> Existing Projects in the workspace -> select the `solr-6.0.0` folder (leave all options the way they are)
4) wait a few minutes…it takes a while to build the whole thing, in the meantime it’s normal to see “errors” or “warning”…

I hope it helps,
Giovanni



> On 14 Jul 2017, at 16:01, Rainer Gnan <[hidden email]> wrote:
>
> Hi Giovanni,
>
> thank you for this hint!
>
> The whole process (tar -xvf ..., ant compile, ant eclipse) untill importing the eclipse-project seems to be fine .
> After importing it as an existing eclipse project the project explorer shows an error sign on the project folder.
> Refreshing does not help.
>
> -> The sub-folder lucene/src is empty ...
>
> I am using eclipse neon, java 1.8.0_112, solr-6.6.0-src.tgz.
>
> Any suggestions?
>
> Cheers,
> Rainer
>
> --------------------------------------------
> Rainer Gnan
> Bayerische Staatsbibliothek
> Verbundzentrale des BVB
> Referat Verbundnahe Dienste
> 80807 München
> Tel.: +49(0)89/28638-4445
> Fax: +49(0)89/28638-2605
> E-Mail: [hidden email]
> --------------------------------------------
>
>
>
>>>> Giovanni De Stefano <[hidden email]> 13.07.2017 19:59 >>>
> Hello Rainer,
>
> you have the right link: select the version you want and download the -src version.
>
> Once un untar the .tgz you can run `ant eclipse` from the command line and then import the generated project in eclipse.
>
> Please note that you will need both and and ivy installed (just start with ant eclipse and take it from there: the script will tell you what to do next).
>
> I hope it helps!
>
> Cheers,
> Giovanni
>
>
>> On 13 Jul 2017, at 19:54, govind nitk <[hidden email]> wrote:
>>
>> Hi,
>>
>> Solr has releases, kindly checkout to the needed one.
>>
>>
>> cheers
>>
>> On Thu, Jul 13, 2017 at 11:20 PM, Rainer Gnan <[hidden email]>
>> wrote:
>>
>>> Hello community,
>>>
>>> my aim is to develop solr custom code (e.g. UpdateRequestProcessor)
>>> within Eclipse AND to test the code within a debuggable solr/lucene
>>> local instance - also within Eclipse.
>>> Searching the web led me to multiple instructions but for me no one
>>> works.
>>>
>>> The only relevant question I actually have to solve this problem is:
>>> Where can I download the source code for the version I want that
>>> includes the ANT build.xml for building an Eclipse-Project?
>>>
>>> The solr project page (http://archive.apache.org/dist/lucene/solr/)
>>> seems not to provide that.
>>>
>>> I appreciate any hint!
>>>
>>> Best regards
>>> Rainer
>>>
>>>
>
>

Loading...