You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Adel Mohamed Khalifa <a....@saudisoft.com> on 2016/03/13 11:12:23 UTC

SolrJ ubuntu Problem

Hello,

 

I am facing a problem when I try to connect to the Solr Server
(HttpSolrServer server = new HttpSolrServer("http://localhost:8983/solr");)

Note that my platform is Ubuntu and I install solr server on it and it work
correctly when I try to log on through browser but when I try in netbeans I
face the problem.

 

I hope you help me, Thanks

 

Regards,
Adel Khalifa | Developer | Saudisoft-Egypt |  Tel: +2 023 303 2037 - ext 112
| M +2 01149247744 | Fax +2 023 303 2036 | Follow us on
<https://www.facebook.com/pages/Saudisoft-Co-Ltd/289968997768973?ref_type=bo
okmark> Description: cid:image001.gif@01D11A1D.D81CE0C0 |
<https://twitter.com/Saudisoft> Description:
cid:image002.gif@01D11A1D.D81CE0C0 |
<https://www.linkedin.com/company/77017?trk=vsrp_companies_res_name&trkInfo=
VSRPsearchId%3A1489659901402995947155%2CVSRPtargetId%3A77017%2CVSRPcmpt%3Apr
imary> Description: cid:image003.gif@01D11A1D.D81CE0C0
Description: cid:image004.jpg@01D11A1D.D81CE0C0

 

 


RE: SolrJ ubuntu Problem

Posted by Adel Mohamed Khalifa <a....@saudisoft.com>.
Dear Iker,

Thank you for your interest of my problem.

 

I want to say that when I run my code from windows there’s no problem and I get results correctly, but when I run it from Ubuntu server it’s stopped at this line ( “  HttpSolrServer server = new HttpSolrServer("http://localhost:8983/solr  “). without any exception.

 

Regards,
Adel Khalifa 

 

From: Iker Huerga [mailto:iker.huerga@gmail.com] 
Sent: Sunday, March 13, 2016 2:07 PM
To: dev@lucene.apache.org
Subject: Re: SolrJ ubuntu Problem

 

I would try params.add instead of params.set 

 

Also, are you sure you are getting results back from the server? can you try putting a break point in

 

SolrDocumentList results = res.getResults()

 

and see if you are actually getting something back from the server....

 

As an alternative, I would tail the solr.log file and check the query that is being sent to the server. It might be that the query is not properly formed since you are constructing it based on the request parameters.....

 

HTH

 

2016-03-13 7:56 GMT-04:00 Adel Mohamed Khalifa <a....@saudisoft.com>:

It’s Solr-5.3.0.

 

Please check the attachment you will find the code of the servlet called by JavaScript and return the json file to get the results.

 

Regards,
Adel Khalifa 

 

From: Iker Huerga [mailto:iker.huerga@gmail.com] 
Sent: Sunday, March 13, 2016 1:45 PM


To: dev@lucene.apache.org
Subject: Re: SolrJ ubuntu Problem

 

What version of solrj are you using? can you share the code?

 

Also, keep in mind that solrj uses SLF4J and Apache Commons Logging, so you will need an implementation of these in your classpath to see the logs, take a look at https://wiki.apache.org/solr/SolrLogging#SolrJ_and_Logging_Jars

 

2016-03-13 7:37 GMT-04:00 Adel Mohamed Khalifa <a....@saudisoft.com>:

I edited and add the core but still nothing .. although the code in try and Catch but I did not get any exception just stop.

Other side when I run the code in windows platform I get the result correctly.

 

Regards,
Adel Khalifa | Developer | Saudisoft-Egypt |  Tel: +2 023 303 2037 - ext 112 | M +2 01149247744 <tel:%2B2%2001149247744>  | Fax +2 023 303 2036 | Follow us on  <https://www.facebook.com/pages/Saudisoft-Co-Ltd/289968997768973?ref_type=bookmark> Description: cid:image001.gif@01D11A1D.D81CE0C0 |  <https://twitter.com/Saudisoft> Description: cid:image002.gif@01D11A1D.D81CE0C0 |  <https://www.linkedin.com/company/77017?trk=vsrp_companies_res_name&trkInfo=VSRPsearchId%3A1489659901402995947155%2CVSRPtargetId%3A77017%2CVSRPcmpt%3Aprimary> Description: cid:image003.gif@01D11A1D.D81CE0C0
Description: cid:image004.jpg@01D11A1D.D81CE0C0

 

 

From: Iker Huerga [mailto:iker.huerga@gmail.com] 
Sent: Sunday, March 13, 2016 1:33 PM
To: dev@lucene.apache.org
Subject: Re: SolrJ ubuntu Problem

 

Try adding the core/collection name in the url as in

 

HttpSolrServer server = new HttpSolrServer("http://localhost:8080/solr/collection1");

 

 

 

2016-03-13 6:12 GMT-04:00 Adel Mohamed Khalifa <a....@saudisoft.com>:

Hello,

 

I am facing a problem when I try to connect to the Solr Server (HttpSolrServer server = new HttpSolrServer("http://localhost:8983/solr");)

Note that my platform is Ubuntu and I install solr server on it and it work correctly when I try to log on through browser but when I try in netbeans I face the problem.

 

I hope you help me, Thanks

 

Regards,
Adel Khalifa | Developer | Saudisoft-Egypt |  Tel: +2 023 303 2037 - ext 112 | M +2 01149247744 <tel:%2B2%2001149247744>  | Fax +2 023 303 2036 | Follow us on  <https://www.facebook.com/pages/Saudisoft-Co-Ltd/289968997768973?ref_type=bookmark> Description: cid:image001.gif@01D11A1D.D81CE0C0 |  <https://twitter.com/Saudisoft> Description: cid:image002.gif@01D11A1D.D81CE0C0 |  <https://www.linkedin.com/company/77017?trk=vsrp_companies_res_name&trkInfo=VSRPsearchId%3A1489659901402995947155%2CVSRPtargetId%3A77017%2CVSRPcmpt%3Aprimary> Description: cid:image003.gif@01D11A1D.D81CE0C0
Description: cid:image004.jpg@01D11A1D.D81CE0C0

 

 





 

-- 

Iker Huerga

http://www.ikerhuerga.com/ 





 

-- 

Iker Huerga

http://www.ikerhuerga.com/ 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org





 

-- 

Iker Huerga

http://www.ikerhuerga.com/ 


Re: SolrJ ubuntu Problem

Posted by Iker Huerga <ik...@gmail.com>.
I would try params.add instead of params.set

Also, are you sure you are getting results back from the server? can you
try putting a break point in

SolrDocumentList results = res.getResults()

and see if you are actually getting something back from the server....

As an alternative, I would tail the solr.log file and check the query that
is being sent to the server. It might be that the query is not properly
formed since you are constructing it based on the request parameters.....

HTH

2016-03-13 7:56 GMT-04:00 Adel Mohamed Khalifa <a....@saudisoft.com>:

> It’s Solr-5.3.0.
>
>
>
> Please check the attachment you will find the code of the servlet called
> by JavaScript and return the json file to get the results.
>
>
>
>
> *Regards,**Adel Khalifa *
>
>
>
> *From:* Iker Huerga [mailto:iker.huerga@gmail.com]
> *Sent:* Sunday, March 13, 2016 1:45 PM
>
> *To:* dev@lucene.apache.org
> *Subject:* Re: SolrJ ubuntu Problem
>
>
>
> What version of solrj are you using? can you share the code?
>
>
>
> Also, keep in mind that solrj uses SLF4J and Apache Commons Logging, so
> you will need an implementation of these in your classpath to see the logs,
> take a look at
> https://wiki.apache.org/solr/SolrLogging#SolrJ_and_Logging_Jars
>
>
>
> 2016-03-13 7:37 GMT-04:00 Adel Mohamed Khalifa <a....@saudisoft.com>:
>
> I edited and add the core but still nothing .. although the code in try
> and Catch but I did not get any exception just stop.
>
> Other side when I run the code in windows platform I get the result
> correctly.
>
>
>
>
> *Regards,**Adel Khalifa | *Developer *| **Saudisoft-Egypt | ** Tel: *+2
> 023 303 2037 - *ext *112 | *M *+2 01149247744 | *Fax *+2 023 303 2036 | *Follow
> us on **[image: Description: cid:image001.gif@01D11A1D.D81CE0C0]*
> <https://www.facebook.com/pages/Saudisoft-Co-Ltd/289968997768973?ref_type=bookmark>* |
> **[image: Description: cid:image002.gif@01D11A1D.D81CE0C0]*
> <https://twitter.com/Saudisoft>* | **[image: Description:
> cid:image003.gif@01D11A1D.D81CE0C0]*
> <https://www.linkedin.com/company/77017?trk=vsrp_companies_res_name&trkInfo=VSRPsearchId%3A1489659901402995947155%2CVSRPtargetId%3A77017%2CVSRPcmpt%3Aprimary>
> *[image: Description: cid:image004.jpg@01D11A1D.D81CE0C0]*
>
>
>
>
>
> *From:* Iker Huerga [mailto:iker.huerga@gmail.com]
> *Sent:* Sunday, March 13, 2016 1:33 PM
> *To:* dev@lucene.apache.org
> *Subject:* Re: SolrJ ubuntu Problem
>
>
>
> Try adding the core/collection name in the url as in
>
>
>
> HttpSolrServer server = new HttpSolrServer("
> http://localhost:8080/solr/collection1");
>
>
>
>
>
>
>
> 2016-03-13 6:12 GMT-04:00 Adel Mohamed Khalifa <a....@saudisoft.com>:
>
> Hello,
>
>
>
> I am facing a problem when I try to connect to the Solr Server
> (HttpSolrServer server = new HttpSolrServer("http://localhost:8983/solr
> ");)
>
> Note that my platform is Ubuntu and I install solr server on it and it
> work correctly when I try to log on through browser but when I try in
> netbeans I face the problem.
>
>
>
> I hope you help me, Thanks
>
>
>
>
> *Regards,**Adel Khalifa | *Developer *| **Saudisoft-Egypt | ** Tel: *+2
> 023 303 2037 - *ext *112 | *M *+2 01149247744 | *Fax *+2 023 303 2036 | *Follow
> us on **[image: Description: cid:image001.gif@01D11A1D.D81CE0C0]*
> <https://www.facebook.com/pages/Saudisoft-Co-Ltd/289968997768973?ref_type=bookmark>* |
> **[image: Description: cid:image002.gif@01D11A1D.D81CE0C0]*
> <https://twitter.com/Saudisoft>* | **[image: Description:
> cid:image003.gif@01D11A1D.D81CE0C0]*
> <https://www.linkedin.com/company/77017?trk=vsrp_companies_res_name&trkInfo=VSRPsearchId%3A1489659901402995947155%2CVSRPtargetId%3A77017%2CVSRPcmpt%3Aprimary>
> *[image: Description: cid:image004.jpg@01D11A1D.D81CE0C0]*
>
>
>
>
>
>
>
>
>
> --
>
> Iker Huerga
>
> http://www.ikerhuerga.com/
>
>
>
>
>
> --
>
> Iker Huerga
>
> http://www.ikerhuerga.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>



-- 
Iker Huerga
http://www.ikerhuerga.com/

RE: SolrJ ubuntu Problem

Posted by Adel Mohamed Khalifa <a....@saudisoft.com>.
It’s Solr-5.3.0.

 

Please check the attachment you will find the code of the servlet called by JavaScript and return the json file to get the results.

 

Regards,
Adel Khalifa 

 

From: Iker Huerga [mailto:iker.huerga@gmail.com] 
Sent: Sunday, March 13, 2016 1:45 PM
To: dev@lucene.apache.org
Subject: Re: SolrJ ubuntu Problem

 

What version of solrj are you using? can you share the code?

 

Also, keep in mind that solrj uses SLF4J and Apache Commons Logging, so you will need an implementation of these in your classpath to see the logs, take a look at https://wiki.apache.org/solr/SolrLogging#SolrJ_and_Logging_Jars

 

2016-03-13 7:37 GMT-04:00 Adel Mohamed Khalifa <a....@saudisoft.com>:

I edited and add the core but still nothing .. although the code in try and Catch but I did not get any exception just stop.

Other side when I run the code in windows platform I get the result correctly.

 

Regards,
Adel Khalifa | Developer | Saudisoft-Egypt |  Tel: +2 023 303 2037 - ext 112 | M +2 01149247744 <tel:%2B2%2001149247744>  | Fax +2 023 303 2036 | Follow us on  <https://www.facebook.com/pages/Saudisoft-Co-Ltd/289968997768973?ref_type=bookmark> Description: cid:image001.gif@01D11A1D.D81CE0C0 |  <https://twitter.com/Saudisoft> Description: cid:image002.gif@01D11A1D.D81CE0C0 |  <https://www.linkedin.com/company/77017?trk=vsrp_companies_res_name&trkInfo=VSRPsearchId%3A1489659901402995947155%2CVSRPtargetId%3A77017%2CVSRPcmpt%3Aprimary> Description: cid:image003.gif@01D11A1D.D81CE0C0
Description: cid:image004.jpg@01D11A1D.D81CE0C0

 

 

From: Iker Huerga [mailto:iker.huerga@gmail.com] 
Sent: Sunday, March 13, 2016 1:33 PM
To: dev@lucene.apache.org
Subject: Re: SolrJ ubuntu Problem

 

Try adding the core/collection name in the url as in

 

HttpSolrServer server = new HttpSolrServer("http://localhost:8080/solr/collection1");

 

 

 

2016-03-13 6:12 GMT-04:00 Adel Mohamed Khalifa <a....@saudisoft.com>:

Hello,

 

I am facing a problem when I try to connect to the Solr Server (HttpSolrServer server = new HttpSolrServer("http://localhost:8983/solr");)

Note that my platform is Ubuntu and I install solr server on it and it work correctly when I try to log on through browser but when I try in netbeans I face the problem.

 

I hope you help me, Thanks

 

Regards,
Adel Khalifa | Developer | Saudisoft-Egypt |  Tel: +2 023 303 2037 - ext 112 | M +2 01149247744 <tel:%2B2%2001149247744>  | Fax +2 023 303 2036 | Follow us on  <https://www.facebook.com/pages/Saudisoft-Co-Ltd/289968997768973?ref_type=bookmark> Description: cid:image001.gif@01D11A1D.D81CE0C0 |  <https://twitter.com/Saudisoft> Description: cid:image002.gif@01D11A1D.D81CE0C0 |  <https://www.linkedin.com/company/77017?trk=vsrp_companies_res_name&trkInfo=VSRPsearchId%3A1489659901402995947155%2CVSRPtargetId%3A77017%2CVSRPcmpt%3Aprimary> Description: cid:image003.gif@01D11A1D.D81CE0C0
Description: cid:image004.jpg@01D11A1D.D81CE0C0

 

 





 

-- 

Iker Huerga

http://www.ikerhuerga.com/ 





 

-- 

Iker Huerga

http://www.ikerhuerga.com/ 


Re: SolrJ ubuntu Problem

Posted by Iker Huerga <ik...@gmail.com>.
What version of solrj are you using? can you share the code?

Also, keep in mind that solrj uses SLF4J and Apache Commons Logging, so you
will need an implementation of these in your classpath to see the logs,
take a look at
https://wiki.apache.org/solr/SolrLogging#SolrJ_and_Logging_Jars

2016-03-13 7:37 GMT-04:00 Adel Mohamed Khalifa <a....@saudisoft.com>:

> I edited and add the core but still nothing .. although the code in try
> and Catch but I did not get any exception just stop.
>
> Other side when I run the code in windows platform I get the result
> correctly.
>
>
>
>
> *Regards,**Adel Khalifa | *Developer *| **Saudisoft-Egypt | ** Tel: *+2
> 023 303 2037 - *ext *112 | *M *+2 01149247744 | *Fax *+2 023 303 2036 | *Follow
> us on **[image: Description: cid:image001.gif@01D11A1D.D81CE0C0]*
> <https://www.facebook.com/pages/Saudisoft-Co-Ltd/289968997768973?ref_type=bookmark>* |
> **[image: Description: cid:image002.gif@01D11A1D.D81CE0C0]*
> <https://twitter.com/Saudisoft>* | **[image: Description:
> cid:image003.gif@01D11A1D.D81CE0C0]*
> <https://www.linkedin.com/company/77017?trk=vsrp_companies_res_name&trkInfo=VSRPsearchId%3A1489659901402995947155%2CVSRPtargetId%3A77017%2CVSRPcmpt%3Aprimary>
> *[image: Description: cid:image004.jpg@01D11A1D.D81CE0C0]*
>
>
>
>
>
> *From:* Iker Huerga [mailto:iker.huerga@gmail.com]
> *Sent:* Sunday, March 13, 2016 1:33 PM
> *To:* dev@lucene.apache.org
> *Subject:* Re: SolrJ ubuntu Problem
>
>
>
> Try adding the core/collection name in the url as in
>
>
>
> HttpSolrServer server = new HttpSolrServer("
> http://localhost:8080/solr/collection1");
>
>
>
>
>
>
>
> 2016-03-13 6:12 GMT-04:00 Adel Mohamed Khalifa <a....@saudisoft.com>:
>
> Hello,
>
>
>
> I am facing a problem when I try to connect to the Solr Server
> (HttpSolrServer server = new HttpSolrServer("http://localhost:8983/solr
> ");)
>
> Note that my platform is Ubuntu and I install solr server on it and it
> work correctly when I try to log on through browser but when I try in
> netbeans I face the problem.
>
>
>
> I hope you help me, Thanks
>
>
>
>
> *Regards,**Adel Khalifa | *Developer *| **Saudisoft-Egypt | ** Tel: *+2
> 023 303 2037 - *ext *112 | *M *+2 01149247744 | *Fax *+2 023 303 2036 | *Follow
> us on **[image: Description: cid:image001.gif@01D11A1D.D81CE0C0]*
> <https://www.facebook.com/pages/Saudisoft-Co-Ltd/289968997768973?ref_type=bookmark>* |
> **[image: Description: cid:image002.gif@01D11A1D.D81CE0C0]*
> <https://twitter.com/Saudisoft>* | **[image: Description:
> cid:image003.gif@01D11A1D.D81CE0C0]*
> <https://www.linkedin.com/company/77017?trk=vsrp_companies_res_name&trkInfo=VSRPsearchId%3A1489659901402995947155%2CVSRPtargetId%3A77017%2CVSRPcmpt%3Aprimary>
> *[image: Description: cid:image004.jpg@01D11A1D.D81CE0C0]*
>
>
>
>
>
>
>
>
>
> --
>
> Iker Huerga
>
> http://www.ikerhuerga.com/
>



-- 
Iker Huerga
http://www.ikerhuerga.com/

RE: SolrJ ubuntu Problem

Posted by Adel Mohamed Khalifa <a....@saudisoft.com>.
I edited and add the core but still nothing .. although the code in try and Catch but I did not get any exception just stop.

Other side when I run the code in windows platform I get the result correctly.

 

Regards,
Adel Khalifa | Developer | Saudisoft-Egypt |  Tel: +2 023 303 2037 - ext 112 | M +2 01149247744 | Fax +2 023 303 2036 | Follow us on  <https://www.facebook.com/pages/Saudisoft-Co-Ltd/289968997768973?ref_type=bookmark> Description: cid:image001.gif@01D11A1D.D81CE0C0 |  <https://twitter.com/Saudisoft> Description: cid:image002.gif@01D11A1D.D81CE0C0 |  <https://www.linkedin.com/company/77017?trk=vsrp_companies_res_name&trkInfo=VSRPsearchId%3A1489659901402995947155%2CVSRPtargetId%3A77017%2CVSRPcmpt%3Aprimary> Description: cid:image003.gif@01D11A1D.D81CE0C0
Description: cid:image004.jpg@01D11A1D.D81CE0C0

 

 

From: Iker Huerga [mailto:iker.huerga@gmail.com] 
Sent: Sunday, March 13, 2016 1:33 PM
To: dev@lucene.apache.org
Subject: Re: SolrJ ubuntu Problem

 

Try adding the core/collection name in the url as in

 

HttpSolrServer server = new HttpSolrServer("http://localhost:8080/solr/collection1");

 

 

 

2016-03-13 6:12 GMT-04:00 Adel Mohamed Khalifa <a....@saudisoft.com>:

Hello,

 

I am facing a problem when I try to connect to the Solr Server (HttpSolrServer server = new HttpSolrServer("http://localhost:8983/solr");)

Note that my platform is Ubuntu and I install solr server on it and it work correctly when I try to log on through browser but when I try in netbeans I face the problem.

 

I hope you help me, Thanks

 

Regards,
Adel Khalifa | Developer | Saudisoft-Egypt |  Tel: +2 023 303 2037 - ext 112 | M +2 01149247744 <tel:%2B2%2001149247744>  | Fax +2 023 303 2036 | Follow us on  <https://www.facebook.com/pages/Saudisoft-Co-Ltd/289968997768973?ref_type=bookmark> Description: cid:image001.gif@01D11A1D.D81CE0C0 |  <https://twitter.com/Saudisoft> Description: cid:image002.gif@01D11A1D.D81CE0C0 |  <https://www.linkedin.com/company/77017?trk=vsrp_companies_res_name&trkInfo=VSRPsearchId%3A1489659901402995947155%2CVSRPtargetId%3A77017%2CVSRPcmpt%3Aprimary> Description: cid:image003.gif@01D11A1D.D81CE0C0
Description: cid:image004.jpg@01D11A1D.D81CE0C0

 

 





 

-- 

Iker Huerga

http://www.ikerhuerga.com/ 


Re: SolrJ ubuntu Problem

Posted by Iker Huerga <ik...@gmail.com>.
Try adding the core/collection name in the url as in

HttpSolrServer server = new HttpSolrServer("
http://localhost:8080/solr/collection1");



2016-03-13 6:12 GMT-04:00 Adel Mohamed Khalifa <a....@saudisoft.com>:

> Hello,
>
>
>
> I am facing a problem when I try to connect to the Solr Server
> (HttpSolrServer server = new HttpSolrServer("http://localhost:8983/solr
> ");)
>
> Note that my platform is Ubuntu and I install solr server on it and it
> work correctly when I try to log on through browser but when I try in
> netbeans I face the problem.
>
>
>
> I hope you help me, Thanks
>
>
>
>
> *Regards,**Adel Khalifa | *Developer *| **Saudisoft-Egypt | ** Tel: *+2
> 023 303 2037 - *ext *112 | *M *+2 01149247744 | *Fax *+2 023 303 2036 | *Follow
> us on **[image: Description: cid:image001.gif@01D11A1D.D81CE0C0]*
> <https://www.facebook.com/pages/Saudisoft-Co-Ltd/289968997768973?ref_type=bookmark>* |
> **[image: Description: cid:image002.gif@01D11A1D.D81CE0C0]*
> <https://twitter.com/Saudisoft>* | **[image: Description:
> cid:image003.gif@01D11A1D.D81CE0C0]*
> <https://www.linkedin.com/company/77017?trk=vsrp_companies_res_name&trkInfo=VSRPsearchId%3A1489659901402995947155%2CVSRPtargetId%3A77017%2CVSRPcmpt%3Aprimary>
> *[image: Description: cid:image004.jpg@01D11A1D.D81CE0C0]*
>
>
>
>
>



-- 
Iker Huerga
http://www.ikerhuerga.com/