You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Stan Burnitt (JIRA)" <ji...@apache.org> on 2011/01/12 16:42:45 UTC

[jira] Created: (SOLR-2312) CloudSolrServer -- calling add(Collection docs) throws NPE.

CloudSolrServer -- calling add(Collection<SolrInputDocument> docs) throws NPE.
------------------------------------------------------------------------------

                 Key: SOLR-2312
                 URL: https://issues.apache.org/jira/browse/SOLR-2312
             Project: Solr
          Issue Type: Bug
          Components: SolrCloud
    Affects Versions: 4.0
         Environment: Mac OSX  v10.5.8
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-9M3263)
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed mode)
            Reporter: Stan Burnitt
            Priority: Critical
             Fix For: 4.0


Cannot index documents.
Below is a code snippet that reproduces the error.

Cannot index documents.
Below is a snippet for reproducing the error.

{code:borderStyle=solid}
	@Test
	public void jiraTestCase() {
		CloudSolrServer solrj = null;
		 
			try {
				solrj = new CloudSolrServer("your.zookeeper.localdomain:2181");

				// Also tried creating CloudSolrServer using alternative contstuctor below...
				// public CloudSolrServer(String zkHost, LBHttpSolrServer lbServer)
				//
				// LBHttpSolrServer lbHttpSolrServer = new LBHttpSolrServer("http://solr.localdomain:8983/solr");
				// solrj = new CloudSolrServer("your.zookeeper.localdomain:2181", lbHttpSolrServer);
				//
				// (Same result -- NPE @ line 105 in CloudSolrServer.java)

				solrj.setDefaultCollection("your-collection");
				solrj.setZkClientTimeout(5000);
				solrj.setZkConnectTimeout(5000);

				final Collection<SolrInputDocument> batch = new ArrayList<SolrInputDocument>();
				SolrInputDocument doc = new SolrInputDocument();
				doc.addField("id", 1L, 1.0f);
				doc.addField("title", "Document A");
				doc.addField("description", "Test document");
				batch.add(doc);

				doc = new SolrInputDocument();
				doc.addField("id", 2L, 1.0f);
				doc.addField("title", "Document B");
				doc.addField("description", "Another test document");
				batch.add(doc);

				solrj.add(batch);

			} catch (Exception e) {
				log.error(e.getMessage(), e);
				Assert.fail("java.lang.NullPointerException: null \n"
					+ "	at org.apache.solr.client.solrj.impl.CloudSolrServer.request(CloudSolrServer.java:105) \n"
					+ " Line 105:  NULL request object here --> String collection = request.getParams().get(\"collection\", defaultCollection);");
			} finally {
				solrj.close();
			}	 
	}
{code} 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] [Commented] (SOLR-2312) CloudSolrServer -- calling add(Collection docs) throws NPE.

Posted by "Vimlesh Kumar Mishra (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-2312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13268158#comment-13268158 ] 

Vimlesh Kumar Mishra commented on SOLR-2312:
--------------------------------------------

I also can't reproduce this issue.Solr cloud idexing is working fine with below code.
    SolrServer solr = new CloudSolrServer("your.zookeeper.localdomain:2181");
			       ((CloudSolrServer)solr).setDefaultCollection("your-collection");
				solr.add(<List of solr documents>);
				solr.commit();

                
> CloudSolrServer -- calling add(Collection<SolrInputDocument> docs) throws NPE.
> ------------------------------------------------------------------------------
>
>                 Key: SOLR-2312
>                 URL: https://issues.apache.org/jira/browse/SOLR-2312
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud
>    Affects Versions: 4.0
>         Environment: Mac OSX  v10.5.8
> java version "1.6.0_22"
> Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-9M3263)
> Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed mode)
>            Reporter: Stan Burnitt
>            Assignee: Mark Miller
>            Priority: Critical
>             Fix For: 4.0
>
>
> Cannot index documents using the CloudSolrServer.
> Below is a code snippet that reproduces the error.
> {code:borderStyle=solid}
> @Test
> public void jiraTestCase() {
> 		CloudSolrServer solrj = null;
> 		 
> 			try {
> 				solrj = new CloudSolrServer("your.zookeeper.localdomain:2181");
> 				// Also tried creating CloudSolrServer using alternative contstuctor below...
> 				// public CloudSolrServer(String zkHost, LBHttpSolrServer lbServer)
> 				//
> 				// LBHttpSolrServer lbHttpSolrServer = new LBHttpSolrServer("http://solr.localdomain:8983/solr");
> 				// solrj = new CloudSolrServer("your.zookeeper.localdomain:2181", lbHttpSolrServer);
> 				//
> 				// (Same result -- NPE @ line 105 in CloudSolrServer.java)
> 				solrj.setDefaultCollection("your-collection");
> 				solrj.setZkClientTimeout(5000);
> 				solrj.setZkConnectTimeout(5000);
> 				final Collection<SolrInputDocument> batch = new ArrayList<SolrInputDocument>();
> 				SolrInputDocument doc = new SolrInputDocument();
> 				doc.addField("id", 1L, 1.0f);
> 				doc.addField("title", "Document A");
> 				doc.addField("description", "Test document");
> 				batch.add(doc);
> 				doc = new SolrInputDocument();
> 				doc.addField("id", 2L, 1.0f);
> 				doc.addField("title", "Document B");
> 				doc.addField("description", "Another test document");
> 				batch.add(doc);
> 				solrj.add(batch);
> 			} catch (Exception e) {
> 				log.error(e.getMessage(), e);
> 				Assert.fail("java.lang.NullPointerException: null \n"
> 					+ "	at org.apache.solr.client.solrj.impl.CloudSolrServer.request(CloudSolrServer.java:105) \n"
> 					+ " Line 105:  NULL request object here --> String collection = request.getParams().get(\"collection\", defaultCollection);");
> 			} finally {
> 				solrj.close();
> 			}	 
> }
> {code} 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] Commented: (SOLR-2312) CloudSolrServer -- calling add(Collection docs) throws NPE.

Posted by "Stan Burnitt (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-2312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980764#action_12980764 ] 

Stan Burnitt commented on SOLR-2312:
------------------------------------

Attempting to add a single document also results in the same NPE at line 105.

> CloudSolrServer -- calling add(Collection<SolrInputDocument> docs) throws NPE.
> ------------------------------------------------------------------------------
>
>                 Key: SOLR-2312
>                 URL: https://issues.apache.org/jira/browse/SOLR-2312
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud
>    Affects Versions: 4.0
>         Environment: Mac OSX  v10.5.8
> java version "1.6.0_22"
> Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-9M3263)
> Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed mode)
>            Reporter: Stan Burnitt
>            Priority: Critical
>             Fix For: 4.0
>
>
> Cannot index documents.
> Below is a code snippet that reproduces the error.
> {code:borderStyle=solid}
> @Test
> public void jiraTestCase() {
> 		CloudSolrServer solrj = null;
> 		 
> 			try {
> 				solrj = new CloudSolrServer("your.zookeeper.localdomain:2181");
> 				// Also tried creating CloudSolrServer using alternative contstuctor below...
> 				// public CloudSolrServer(String zkHost, LBHttpSolrServer lbServer)
> 				//
> 				// LBHttpSolrServer lbHttpSolrServer = new LBHttpSolrServer("http://solr.localdomain:8983/solr");
> 				// solrj = new CloudSolrServer("your.zookeeper.localdomain:2181", lbHttpSolrServer);
> 				//
> 				// (Same result -- NPE @ line 105 in CloudSolrServer.java)
> 				solrj.setDefaultCollection("your-collection");
> 				solrj.setZkClientTimeout(5000);
> 				solrj.setZkConnectTimeout(5000);
> 				final Collection<SolrInputDocument> batch = new ArrayList<SolrInputDocument>();
> 				SolrInputDocument doc = new SolrInputDocument();
> 				doc.addField("id", 1L, 1.0f);
> 				doc.addField("title", "Document A");
> 				doc.addField("description", "Test document");
> 				batch.add(doc);
> 				doc = new SolrInputDocument();
> 				doc.addField("id", 2L, 1.0f);
> 				doc.addField("title", "Document B");
> 				doc.addField("description", "Another test document");
> 				batch.add(doc);
> 				solrj.add(batch);
> 			} catch (Exception e) {
> 				log.error(e.getMessage(), e);
> 				Assert.fail("java.lang.NullPointerException: null \n"
> 					+ "	at org.apache.solr.client.solrj.impl.CloudSolrServer.request(CloudSolrServer.java:105) \n"
> 					+ " Line 105:  NULL request object here --> String collection = request.getParams().get(\"collection\", defaultCollection);");
> 			} finally {
> 				solrj.close();
> 			}	 
> }
> {code} 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Assigned: (SOLR-2312) CloudSolrServer -- calling add(Collection docs) throws NPE.

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-2312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Miller reassigned SOLR-2312:
---------------------------------

    Assignee: Mark Miller

> CloudSolrServer -- calling add(Collection<SolrInputDocument> docs) throws NPE.
> ------------------------------------------------------------------------------
>
>                 Key: SOLR-2312
>                 URL: https://issues.apache.org/jira/browse/SOLR-2312
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud
>    Affects Versions: 4.0
>         Environment: Mac OSX  v10.5.8
> java version "1.6.0_22"
> Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-9M3263)
> Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed mode)
>            Reporter: Stan Burnitt
>            Assignee: Mark Miller
>            Priority: Critical
>             Fix For: 4.0
>
>
> Cannot index documents using the CloudSolrServer.
> Below is a code snippet that reproduces the error.
> {code:borderStyle=solid}
> @Test
> public void jiraTestCase() {
> 		CloudSolrServer solrj = null;
> 		 
> 			try {
> 				solrj = new CloudSolrServer("your.zookeeper.localdomain:2181");
> 				// Also tried creating CloudSolrServer using alternative contstuctor below...
> 				// public CloudSolrServer(String zkHost, LBHttpSolrServer lbServer)
> 				//
> 				// LBHttpSolrServer lbHttpSolrServer = new LBHttpSolrServer("http://solr.localdomain:8983/solr");
> 				// solrj = new CloudSolrServer("your.zookeeper.localdomain:2181", lbHttpSolrServer);
> 				//
> 				// (Same result -- NPE @ line 105 in CloudSolrServer.java)
> 				solrj.setDefaultCollection("your-collection");
> 				solrj.setZkClientTimeout(5000);
> 				solrj.setZkConnectTimeout(5000);
> 				final Collection<SolrInputDocument> batch = new ArrayList<SolrInputDocument>();
> 				SolrInputDocument doc = new SolrInputDocument();
> 				doc.addField("id", 1L, 1.0f);
> 				doc.addField("title", "Document A");
> 				doc.addField("description", "Test document");
> 				batch.add(doc);
> 				doc = new SolrInputDocument();
> 				doc.addField("id", 2L, 1.0f);
> 				doc.addField("title", "Document B");
> 				doc.addField("description", "Another test document");
> 				batch.add(doc);
> 				solrj.add(batch);
> 			} catch (Exception e) {
> 				log.error(e.getMessage(), e);
> 				Assert.fail("java.lang.NullPointerException: null \n"
> 					+ "	at org.apache.solr.client.solrj.impl.CloudSolrServer.request(CloudSolrServer.java:105) \n"
> 					+ " Line 105:  NULL request object here --> String collection = request.getParams().get(\"collection\", defaultCollection);");
> 			} finally {
> 				solrj.close();
> 			}	 
> }
> {code} 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (SOLR-2312) CloudSolrServer -- calling add(Collection docs) throws NPE.

Posted by "Stan Burnitt (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-2312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980756#action_12980756 ] 

Stan Burnitt commented on SOLR-2312:
------------------------------------

The CloudSolrServer is always instantiated with a LBHttpSolrServer, created in the single argument construct, or passed by the user in the alternative constructor.

However, the LBHttpSolrServer's javadoc states:  "LBHttpSolrServer  is a load balancing wrapper to CommonsHttpSolrServer. This is useful when you have multiple SolrServers and the requests need to be Load Balanced among them. This should <b>NOT</b> be used for indexing. Also see the wiki page."  (Not sure if this is relevant.)

One more note: this problem also occurs when I try to delete an index containing 0 documents.

> CloudSolrServer -- calling add(Collection<SolrInputDocument> docs) throws NPE.
> ------------------------------------------------------------------------------
>
>                 Key: SOLR-2312
>                 URL: https://issues.apache.org/jira/browse/SOLR-2312
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud
>    Affects Versions: 4.0
>         Environment: Mac OSX  v10.5.8
> java version "1.6.0_22"
> Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-9M3263)
> Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed mode)
>            Reporter: Stan Burnitt
>            Priority: Critical
>             Fix For: 4.0
>
>
> Cannot index documents.
> Below is a code snippet that reproduces the error.
> Cannot index documents.
> Below is a snippet for reproducing the error.
> {code:borderStyle=solid}
> 	@Test
> 	public void jiraTestCase() {
> 		CloudSolrServer solrj = null;
> 		 
> 			try {
> 				solrj = new CloudSolrServer("your.zookeeper.localdomain:2181");
> 				// Also tried creating CloudSolrServer using alternative contstuctor below...
> 				// public CloudSolrServer(String zkHost, LBHttpSolrServer lbServer)
> 				//
> 				// LBHttpSolrServer lbHttpSolrServer = new LBHttpSolrServer("http://solr.localdomain:8983/solr");
> 				// solrj = new CloudSolrServer("your.zookeeper.localdomain:2181", lbHttpSolrServer);
> 				//
> 				// (Same result -- NPE @ line 105 in CloudSolrServer.java)
> 				solrj.setDefaultCollection("your-collection");
> 				solrj.setZkClientTimeout(5000);
> 				solrj.setZkConnectTimeout(5000);
> 				final Collection<SolrInputDocument> batch = new ArrayList<SolrInputDocument>();
> 				SolrInputDocument doc = new SolrInputDocument();
> 				doc.addField("id", 1L, 1.0f);
> 				doc.addField("title", "Document A");
> 				doc.addField("description", "Test document");
> 				batch.add(doc);
> 				doc = new SolrInputDocument();
> 				doc.addField("id", 2L, 1.0f);
> 				doc.addField("title", "Document B");
> 				doc.addField("description", "Another test document");
> 				batch.add(doc);
> 				solrj.add(batch);
> 			} catch (Exception e) {
> 				log.error(e.getMessage(), e);
> 				Assert.fail("java.lang.NullPointerException: null \n"
> 					+ "	at org.apache.solr.client.solrj.impl.CloudSolrServer.request(CloudSolrServer.java:105) \n"
> 					+ " Line 105:  NULL request object here --> String collection = request.getParams().get(\"collection\", defaultCollection);");
> 			} finally {
> 				solrj.close();
> 			}	 
> 	}
> {code} 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Issue Comment Edited: (SOLR-2312) CloudSolrServer -- calling add(Collection docs) throws NPE.

Posted by "Stan Burnitt (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-2312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980756#action_12980756 ] 

Stan Burnitt edited comment on SOLR-2312 at 1/12/11 10:45 AM:
--------------------------------------------------------------

The CloudSolrServer is always instantiated with a LBHttpSolrServer, created in the single argument construct, or passed by the user in the alternative constructor.

However, the LBHttpSolrServer's javadoc states:  "LBHttpSolrServer  is a load balancing wrapper to CommonsHttpSolrServer. This is useful when you have multiple SolrServers and the requests need to be Load Balanced among them. This should *NOT* be used for indexing. Also see the wiki page."  (Not sure if this is relevant.)

One more note: this problem also occurs when I try to delete an index containing 0 documents.

      was (Author: stan-b):
    The CloudSolrServer is always instantiated with a LBHttpSolrServer, created in the single argument construct, or passed by the user in the alternative constructor.

However, the LBHttpSolrServer's javadoc states:  "LBHttpSolrServer  is a load balancing wrapper to CommonsHttpSolrServer. This is useful when you have multiple SolrServers and the requests need to be Load Balanced among them. This should <b>NOT</b> be used for indexing. Also see the wiki page."  (Not sure if this is relevant.)

One more note: this problem also occurs when I try to delete an index containing 0 documents.
  
> CloudSolrServer -- calling add(Collection<SolrInputDocument> docs) throws NPE.
> ------------------------------------------------------------------------------
>
>                 Key: SOLR-2312
>                 URL: https://issues.apache.org/jira/browse/SOLR-2312
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud
>    Affects Versions: 4.0
>         Environment: Mac OSX  v10.5.8
> java version "1.6.0_22"
> Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-9M3263)
> Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed mode)
>            Reporter: Stan Burnitt
>            Priority: Critical
>             Fix For: 4.0
>
>
> Cannot index documents.
> Below is a code snippet that reproduces the error.
> Cannot index documents.
> Below is a snippet for reproducing the error.
> {code:borderStyle=solid}
> 	@Test
> 	public void jiraTestCase() {
> 		CloudSolrServer solrj = null;
> 		 
> 			try {
> 				solrj = new CloudSolrServer("your.zookeeper.localdomain:2181");
> 				// Also tried creating CloudSolrServer using alternative contstuctor below...
> 				// public CloudSolrServer(String zkHost, LBHttpSolrServer lbServer)
> 				//
> 				// LBHttpSolrServer lbHttpSolrServer = new LBHttpSolrServer("http://solr.localdomain:8983/solr");
> 				// solrj = new CloudSolrServer("your.zookeeper.localdomain:2181", lbHttpSolrServer);
> 				//
> 				// (Same result -- NPE @ line 105 in CloudSolrServer.java)
> 				solrj.setDefaultCollection("your-collection");
> 				solrj.setZkClientTimeout(5000);
> 				solrj.setZkConnectTimeout(5000);
> 				final Collection<SolrInputDocument> batch = new ArrayList<SolrInputDocument>();
> 				SolrInputDocument doc = new SolrInputDocument();
> 				doc.addField("id", 1L, 1.0f);
> 				doc.addField("title", "Document A");
> 				doc.addField("description", "Test document");
> 				batch.add(doc);
> 				doc = new SolrInputDocument();
> 				doc.addField("id", 2L, 1.0f);
> 				doc.addField("title", "Document B");
> 				doc.addField("description", "Another test document");
> 				batch.add(doc);
> 				solrj.add(batch);
> 			} catch (Exception e) {
> 				log.error(e.getMessage(), e);
> 				Assert.fail("java.lang.NullPointerException: null \n"
> 					+ "	at org.apache.solr.client.solrj.impl.CloudSolrServer.request(CloudSolrServer.java:105) \n"
> 					+ " Line 105:  NULL request object here --> String collection = request.getParams().get(\"collection\", defaultCollection);");
> 			} finally {
> 				solrj.close();
> 			}	 
> 	}
> {code} 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] [Issue Comment Edited] (SOLR-2312) CloudSolrServer -- calling add(Collection docs) throws NPE.

Posted by "Vimlesh Kumar Mishra (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-2312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13268158#comment-13268158 ] 

Vimlesh Kumar Mishra edited comment on SOLR-2312 at 5/4/12 6:09 AM:
--------------------------------------------------------------------

I also can't reproduce this issue.Solrcloud indexing is working fine with below code.
    SolrServer solr = new CloudSolrServer("your.zookeeper.localdomain:2181");
			       ((CloudSolrServer)solr).setDefaultCollection("your-collection");
				solr.add(<List of solr documents>);
				solr.commit();

                
      was (Author: vimleshcse):
    I also can't reproduce this issue.Solr cloud idexing is working fine with below code.
    SolrServer solr = new CloudSolrServer("your.zookeeper.localdomain:2181");
			       ((CloudSolrServer)solr).setDefaultCollection("your-collection");
				solr.add(<List of solr documents>);
				solr.commit();

                  
> CloudSolrServer -- calling add(Collection<SolrInputDocument> docs) throws NPE.
> ------------------------------------------------------------------------------
>
>                 Key: SOLR-2312
>                 URL: https://issues.apache.org/jira/browse/SOLR-2312
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud
>    Affects Versions: 4.0
>         Environment: Mac OSX  v10.5.8
> java version "1.6.0_22"
> Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-9M3263)
> Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed mode)
>            Reporter: Stan Burnitt
>            Assignee: Mark Miller
>            Priority: Critical
>             Fix For: 4.0
>
>
> Cannot index documents using the CloudSolrServer.
> Below is a code snippet that reproduces the error.
> {code:borderStyle=solid}
> @Test
> public void jiraTestCase() {
> 		CloudSolrServer solrj = null;
> 		 
> 			try {
> 				solrj = new CloudSolrServer("your.zookeeper.localdomain:2181");
> 				// Also tried creating CloudSolrServer using alternative contstuctor below...
> 				// public CloudSolrServer(String zkHost, LBHttpSolrServer lbServer)
> 				//
> 				// LBHttpSolrServer lbHttpSolrServer = new LBHttpSolrServer("http://solr.localdomain:8983/solr");
> 				// solrj = new CloudSolrServer("your.zookeeper.localdomain:2181", lbHttpSolrServer);
> 				//
> 				// (Same result -- NPE @ line 105 in CloudSolrServer.java)
> 				solrj.setDefaultCollection("your-collection");
> 				solrj.setZkClientTimeout(5000);
> 				solrj.setZkConnectTimeout(5000);
> 				final Collection<SolrInputDocument> batch = new ArrayList<SolrInputDocument>();
> 				SolrInputDocument doc = new SolrInputDocument();
> 				doc.addField("id", 1L, 1.0f);
> 				doc.addField("title", "Document A");
> 				doc.addField("description", "Test document");
> 				batch.add(doc);
> 				doc = new SolrInputDocument();
> 				doc.addField("id", 2L, 1.0f);
> 				doc.addField("title", "Document B");
> 				doc.addField("description", "Another test document");
> 				batch.add(doc);
> 				solrj.add(batch);
> 			} catch (Exception e) {
> 				log.error(e.getMessage(), e);
> 				Assert.fail("java.lang.NullPointerException: null \n"
> 					+ "	at org.apache.solr.client.solrj.impl.CloudSolrServer.request(CloudSolrServer.java:105) \n"
> 					+ " Line 105:  NULL request object here --> String collection = request.getParams().get(\"collection\", defaultCollection);");
> 			} finally {
> 				solrj.close();
> 			}	 
> }
> {code} 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Commented] (SOLR-2312) CloudSolrServer -- calling add(Collection docs) throws NPE.

Posted by "Mark Miller (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-2312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13149785#comment-13149785 ] 

Mark Miller commented on SOLR-2312:
-----------------------------------

I'm not sure this happens anymore? In any case, you wouldn't want to use the same instance for both searching and indexing until SOLR-2358 (Distributed Indexing) is done. When that happens, it shouldn't matter what server you index to, so the load balancing could make sense for both search and indexing. For updates, we probably want to change CloudSolrServer to favor a shard leader, rather than round-robin (at least optionally). That would seem to mean that the solrj client would need to be able to do the hashing as well, so that it knows what shard leader to send to. The simple case is easy though, and comes naturally from the fact that updates will be forwarded to where they belong from any node.
                
> CloudSolrServer -- calling add(Collection<SolrInputDocument> docs) throws NPE.
> ------------------------------------------------------------------------------
>
>                 Key: SOLR-2312
>                 URL: https://issues.apache.org/jira/browse/SOLR-2312
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud
>    Affects Versions: 4.0
>         Environment: Mac OSX  v10.5.8
> java version "1.6.0_22"
> Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-9M3263)
> Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed mode)
>            Reporter: Stan Burnitt
>            Assignee: Mark Miller
>            Priority: Critical
>             Fix For: 4.0
>
>
> Cannot index documents using the CloudSolrServer.
> Below is a code snippet that reproduces the error.
> {code:borderStyle=solid}
> @Test
> public void jiraTestCase() {
> 		CloudSolrServer solrj = null;
> 		 
> 			try {
> 				solrj = new CloudSolrServer("your.zookeeper.localdomain:2181");
> 				// Also tried creating CloudSolrServer using alternative contstuctor below...
> 				// public CloudSolrServer(String zkHost, LBHttpSolrServer lbServer)
> 				//
> 				// LBHttpSolrServer lbHttpSolrServer = new LBHttpSolrServer("http://solr.localdomain:8983/solr");
> 				// solrj = new CloudSolrServer("your.zookeeper.localdomain:2181", lbHttpSolrServer);
> 				//
> 				// (Same result -- NPE @ line 105 in CloudSolrServer.java)
> 				solrj.setDefaultCollection("your-collection");
> 				solrj.setZkClientTimeout(5000);
> 				solrj.setZkConnectTimeout(5000);
> 				final Collection<SolrInputDocument> batch = new ArrayList<SolrInputDocument>();
> 				SolrInputDocument doc = new SolrInputDocument();
> 				doc.addField("id", 1L, 1.0f);
> 				doc.addField("title", "Document A");
> 				doc.addField("description", "Test document");
> 				batch.add(doc);
> 				doc = new SolrInputDocument();
> 				doc.addField("id", 2L, 1.0f);
> 				doc.addField("title", "Document B");
> 				doc.addField("description", "Another test document");
> 				batch.add(doc);
> 				solrj.add(batch);
> 			} catch (Exception e) {
> 				log.error(e.getMessage(), e);
> 				Assert.fail("java.lang.NullPointerException: null \n"
> 					+ "	at org.apache.solr.client.solrj.impl.CloudSolrServer.request(CloudSolrServer.java:105) \n"
> 					+ " Line 105:  NULL request object here --> String collection = request.getParams().get(\"collection\", defaultCollection);");
> 			} finally {
> 				solrj.close();
> 			}	 
> }
> {code} 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Resolved] (SOLR-2312) CloudSolrServer -- calling add(Collection docs) throws NPE.

Posted by "Mark Miller (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-2312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Miller resolved SOLR-2312.
-------------------------------

    Resolution: Cannot Reproduce

I can't reproduce this and a lot has changed in this area.
                
> CloudSolrServer -- calling add(Collection<SolrInputDocument> docs) throws NPE.
> ------------------------------------------------------------------------------
>
>                 Key: SOLR-2312
>                 URL: https://issues.apache.org/jira/browse/SOLR-2312
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud
>    Affects Versions: 4.0
>         Environment: Mac OSX  v10.5.8
> java version "1.6.0_22"
> Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-9M3263)
> Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed mode)
>            Reporter: Stan Burnitt
>            Assignee: Mark Miller
>            Priority: Critical
>             Fix For: 4.0
>
>
> Cannot index documents using the CloudSolrServer.
> Below is a code snippet that reproduces the error.
> {code:borderStyle=solid}
> @Test
> public void jiraTestCase() {
> 		CloudSolrServer solrj = null;
> 		 
> 			try {
> 				solrj = new CloudSolrServer("your.zookeeper.localdomain:2181");
> 				// Also tried creating CloudSolrServer using alternative contstuctor below...
> 				// public CloudSolrServer(String zkHost, LBHttpSolrServer lbServer)
> 				//
> 				// LBHttpSolrServer lbHttpSolrServer = new LBHttpSolrServer("http://solr.localdomain:8983/solr");
> 				// solrj = new CloudSolrServer("your.zookeeper.localdomain:2181", lbHttpSolrServer);
> 				//
> 				// (Same result -- NPE @ line 105 in CloudSolrServer.java)
> 				solrj.setDefaultCollection("your-collection");
> 				solrj.setZkClientTimeout(5000);
> 				solrj.setZkConnectTimeout(5000);
> 				final Collection<SolrInputDocument> batch = new ArrayList<SolrInputDocument>();
> 				SolrInputDocument doc = new SolrInputDocument();
> 				doc.addField("id", 1L, 1.0f);
> 				doc.addField("title", "Document A");
> 				doc.addField("description", "Test document");
> 				batch.add(doc);
> 				doc = new SolrInputDocument();
> 				doc.addField("id", 2L, 1.0f);
> 				doc.addField("title", "Document B");
> 				doc.addField("description", "Another test document");
> 				batch.add(doc);
> 				solrj.add(batch);
> 			} catch (Exception e) {
> 				log.error(e.getMessage(), e);
> 				Assert.fail("java.lang.NullPointerException: null \n"
> 					+ "	at org.apache.solr.client.solrj.impl.CloudSolrServer.request(CloudSolrServer.java:105) \n"
> 					+ " Line 105:  NULL request object here --> String collection = request.getParams().get(\"collection\", defaultCollection);");
> 			} finally {
> 				solrj.close();
> 			}	 
> }
> {code} 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] Updated: (SOLR-2312) CloudSolrServer -- calling add(Collection docs) throws NPE.

Posted by "Stan Burnitt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-2312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stan Burnitt updated SOLR-2312:
-------------------------------

    Description: 
Cannot index documents using the CloudSolrServer.

Below is a code snippet that reproduces the error.

{code:borderStyle=solid}
@Test
public void jiraTestCase() {
		CloudSolrServer solrj = null;
		 
			try {
				solrj = new CloudSolrServer("your.zookeeper.localdomain:2181");

				// Also tried creating CloudSolrServer using alternative contstuctor below...
				// public CloudSolrServer(String zkHost, LBHttpSolrServer lbServer)
				//
				// LBHttpSolrServer lbHttpSolrServer = new LBHttpSolrServer("http://solr.localdomain:8983/solr");
				// solrj = new CloudSolrServer("your.zookeeper.localdomain:2181", lbHttpSolrServer);
				//
				// (Same result -- NPE @ line 105 in CloudSolrServer.java)

				solrj.setDefaultCollection("your-collection");
				solrj.setZkClientTimeout(5000);
				solrj.setZkConnectTimeout(5000);

				final Collection<SolrInputDocument> batch = new ArrayList<SolrInputDocument>();
				SolrInputDocument doc = new SolrInputDocument();
				doc.addField("id", 1L, 1.0f);
				doc.addField("title", "Document A");
				doc.addField("description", "Test document");
				batch.add(doc);

				doc = new SolrInputDocument();
				doc.addField("id", 2L, 1.0f);
				doc.addField("title", "Document B");
				doc.addField("description", "Another test document");
				batch.add(doc);

				solrj.add(batch);

			} catch (Exception e) {
				log.error(e.getMessage(), e);
				Assert.fail("java.lang.NullPointerException: null \n"
					+ "	at org.apache.solr.client.solrj.impl.CloudSolrServer.request(CloudSolrServer.java:105) \n"
					+ " Line 105:  NULL request object here --> String collection = request.getParams().get(\"collection\", defaultCollection);");
			} finally {
				solrj.close();
			}	 
}
{code} 

  was:
Cannot index documents.
Below is a code snippet that reproduces the error.

{code:borderStyle=solid}
@Test
public void jiraTestCase() {
		CloudSolrServer solrj = null;
		 
			try {
				solrj = new CloudSolrServer("your.zookeeper.localdomain:2181");

				// Also tried creating CloudSolrServer using alternative contstuctor below...
				// public CloudSolrServer(String zkHost, LBHttpSolrServer lbServer)
				//
				// LBHttpSolrServer lbHttpSolrServer = new LBHttpSolrServer("http://solr.localdomain:8983/solr");
				// solrj = new CloudSolrServer("your.zookeeper.localdomain:2181", lbHttpSolrServer);
				//
				// (Same result -- NPE @ line 105 in CloudSolrServer.java)

				solrj.setDefaultCollection("your-collection");
				solrj.setZkClientTimeout(5000);
				solrj.setZkConnectTimeout(5000);

				final Collection<SolrInputDocument> batch = new ArrayList<SolrInputDocument>();
				SolrInputDocument doc = new SolrInputDocument();
				doc.addField("id", 1L, 1.0f);
				doc.addField("title", "Document A");
				doc.addField("description", "Test document");
				batch.add(doc);

				doc = new SolrInputDocument();
				doc.addField("id", 2L, 1.0f);
				doc.addField("title", "Document B");
				doc.addField("description", "Another test document");
				batch.add(doc);

				solrj.add(batch);

			} catch (Exception e) {
				log.error(e.getMessage(), e);
				Assert.fail("java.lang.NullPointerException: null \n"
					+ "	at org.apache.solr.client.solrj.impl.CloudSolrServer.request(CloudSolrServer.java:105) \n"
					+ " Line 105:  NULL request object here --> String collection = request.getParams().get(\"collection\", defaultCollection);");
			} finally {
				solrj.close();
			}	 
}
{code} 


> CloudSolrServer -- calling add(Collection<SolrInputDocument> docs) throws NPE.
> ------------------------------------------------------------------------------
>
>                 Key: SOLR-2312
>                 URL: https://issues.apache.org/jira/browse/SOLR-2312
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud
>    Affects Versions: 4.0
>         Environment: Mac OSX  v10.5.8
> java version "1.6.0_22"
> Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-9M3263)
> Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed mode)
>            Reporter: Stan Burnitt
>            Priority: Critical
>             Fix For: 4.0
>
>
> Cannot index documents using the CloudSolrServer.
> Below is a code snippet that reproduces the error.
> {code:borderStyle=solid}
> @Test
> public void jiraTestCase() {
> 		CloudSolrServer solrj = null;
> 		 
> 			try {
> 				solrj = new CloudSolrServer("your.zookeeper.localdomain:2181");
> 				// Also tried creating CloudSolrServer using alternative contstuctor below...
> 				// public CloudSolrServer(String zkHost, LBHttpSolrServer lbServer)
> 				//
> 				// LBHttpSolrServer lbHttpSolrServer = new LBHttpSolrServer("http://solr.localdomain:8983/solr");
> 				// solrj = new CloudSolrServer("your.zookeeper.localdomain:2181", lbHttpSolrServer);
> 				//
> 				// (Same result -- NPE @ line 105 in CloudSolrServer.java)
> 				solrj.setDefaultCollection("your-collection");
> 				solrj.setZkClientTimeout(5000);
> 				solrj.setZkConnectTimeout(5000);
> 				final Collection<SolrInputDocument> batch = new ArrayList<SolrInputDocument>();
> 				SolrInputDocument doc = new SolrInputDocument();
> 				doc.addField("id", 1L, 1.0f);
> 				doc.addField("title", "Document A");
> 				doc.addField("description", "Test document");
> 				batch.add(doc);
> 				doc = new SolrInputDocument();
> 				doc.addField("id", 2L, 1.0f);
> 				doc.addField("title", "Document B");
> 				doc.addField("description", "Another test document");
> 				batch.add(doc);
> 				solrj.add(batch);
> 			} catch (Exception e) {
> 				log.error(e.getMessage(), e);
> 				Assert.fail("java.lang.NullPointerException: null \n"
> 					+ "	at org.apache.solr.client.solrj.impl.CloudSolrServer.request(CloudSolrServer.java:105) \n"
> 					+ " Line 105:  NULL request object here --> String collection = request.getParams().get(\"collection\", defaultCollection);");
> 			} finally {
> 				solrj.close();
> 			}	 
> }
> {code} 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (SOLR-2312) CloudSolrServer -- calling add(Collection docs) throws NPE.

Posted by "Stan Burnitt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-2312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stan Burnitt updated SOLR-2312:
-------------------------------

    Description: 
Cannot index documents.
Below is a code snippet that reproduces the error.

{code:borderStyle=solid}
@Test
public void jiraTestCase() {
		CloudSolrServer solrj = null;
		 
			try {
				solrj = new CloudSolrServer("your.zookeeper.localdomain:2181");

				// Also tried creating CloudSolrServer using alternative contstuctor below...
				// public CloudSolrServer(String zkHost, LBHttpSolrServer lbServer)
				//
				// LBHttpSolrServer lbHttpSolrServer = new LBHttpSolrServer("http://solr.localdomain:8983/solr");
				// solrj = new CloudSolrServer("your.zookeeper.localdomain:2181", lbHttpSolrServer);
				//
				// (Same result -- NPE @ line 105 in CloudSolrServer.java)

				solrj.setDefaultCollection("your-collection");
				solrj.setZkClientTimeout(5000);
				solrj.setZkConnectTimeout(5000);

				final Collection<SolrInputDocument> batch = new ArrayList<SolrInputDocument>();
				SolrInputDocument doc = new SolrInputDocument();
				doc.addField("id", 1L, 1.0f);
				doc.addField("title", "Document A");
				doc.addField("description", "Test document");
				batch.add(doc);

				doc = new SolrInputDocument();
				doc.addField("id", 2L, 1.0f);
				doc.addField("title", "Document B");
				doc.addField("description", "Another test document");
				batch.add(doc);

				solrj.add(batch);

			} catch (Exception e) {
				log.error(e.getMessage(), e);
				Assert.fail("java.lang.NullPointerException: null \n"
					+ "	at org.apache.solr.client.solrj.impl.CloudSolrServer.request(CloudSolrServer.java:105) \n"
					+ " Line 105:  NULL request object here --> String collection = request.getParams().get(\"collection\", defaultCollection);");
			} finally {
				solrj.close();
			}	 
}
{code} 

  was:
Cannot index documents.
Below is a code snippet that reproduces the error.

Cannot index documents.
Below is a snippet for reproducing the error.

{code:borderStyle=solid}
	@Test
	public void jiraTestCase() {
		CloudSolrServer solrj = null;
		 
			try {
				solrj = new CloudSolrServer("your.zookeeper.localdomain:2181");

				// Also tried creating CloudSolrServer using alternative contstuctor below...
				// public CloudSolrServer(String zkHost, LBHttpSolrServer lbServer)
				//
				// LBHttpSolrServer lbHttpSolrServer = new LBHttpSolrServer("http://solr.localdomain:8983/solr");
				// solrj = new CloudSolrServer("your.zookeeper.localdomain:2181", lbHttpSolrServer);
				//
				// (Same result -- NPE @ line 105 in CloudSolrServer.java)

				solrj.setDefaultCollection("your-collection");
				solrj.setZkClientTimeout(5000);
				solrj.setZkConnectTimeout(5000);

				final Collection<SolrInputDocument> batch = new ArrayList<SolrInputDocument>();
				SolrInputDocument doc = new SolrInputDocument();
				doc.addField("id", 1L, 1.0f);
				doc.addField("title", "Document A");
				doc.addField("description", "Test document");
				batch.add(doc);

				doc = new SolrInputDocument();
				doc.addField("id", 2L, 1.0f);
				doc.addField("title", "Document B");
				doc.addField("description", "Another test document");
				batch.add(doc);

				solrj.add(batch);

			} catch (Exception e) {
				log.error(e.getMessage(), e);
				Assert.fail("java.lang.NullPointerException: null \n"
					+ "	at org.apache.solr.client.solrj.impl.CloudSolrServer.request(CloudSolrServer.java:105) \n"
					+ " Line 105:  NULL request object here --> String collection = request.getParams().get(\"collection\", defaultCollection);");
			} finally {
				solrj.close();
			}	 
	}
{code} 


> CloudSolrServer -- calling add(Collection<SolrInputDocument> docs) throws NPE.
> ------------------------------------------------------------------------------
>
>                 Key: SOLR-2312
>                 URL: https://issues.apache.org/jira/browse/SOLR-2312
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud
>    Affects Versions: 4.0
>         Environment: Mac OSX  v10.5.8
> java version "1.6.0_22"
> Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-9M3263)
> Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed mode)
>            Reporter: Stan Burnitt
>            Priority: Critical
>             Fix For: 4.0
>
>
> Cannot index documents.
> Below is a code snippet that reproduces the error.
> {code:borderStyle=solid}
> @Test
> public void jiraTestCase() {
> 		CloudSolrServer solrj = null;
> 		 
> 			try {
> 				solrj = new CloudSolrServer("your.zookeeper.localdomain:2181");
> 				// Also tried creating CloudSolrServer using alternative contstuctor below...
> 				// public CloudSolrServer(String zkHost, LBHttpSolrServer lbServer)
> 				//
> 				// LBHttpSolrServer lbHttpSolrServer = new LBHttpSolrServer("http://solr.localdomain:8983/solr");
> 				// solrj = new CloudSolrServer("your.zookeeper.localdomain:2181", lbHttpSolrServer);
> 				//
> 				// (Same result -- NPE @ line 105 in CloudSolrServer.java)
> 				solrj.setDefaultCollection("your-collection");
> 				solrj.setZkClientTimeout(5000);
> 				solrj.setZkConnectTimeout(5000);
> 				final Collection<SolrInputDocument> batch = new ArrayList<SolrInputDocument>();
> 				SolrInputDocument doc = new SolrInputDocument();
> 				doc.addField("id", 1L, 1.0f);
> 				doc.addField("title", "Document A");
> 				doc.addField("description", "Test document");
> 				batch.add(doc);
> 				doc = new SolrInputDocument();
> 				doc.addField("id", 2L, 1.0f);
> 				doc.addField("title", "Document B");
> 				doc.addField("description", "Another test document");
> 				batch.add(doc);
> 				solrj.add(batch);
> 			} catch (Exception e) {
> 				log.error(e.getMessage(), e);
> 				Assert.fail("java.lang.NullPointerException: null \n"
> 					+ "	at org.apache.solr.client.solrj.impl.CloudSolrServer.request(CloudSolrServer.java:105) \n"
> 					+ " Line 105:  NULL request object here --> String collection = request.getParams().get(\"collection\", defaultCollection);");
> 			} finally {
> 				solrj.close();
> 			}	 
> }
> {code} 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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