[JCBC-181] Misleading exception when replica server not found Created: 13/Dec/12  Updated: 31/Jan/13  Resolved: 31/Jan/13

Status: Resolved
Project: Couchbase Java Client
Component/s: Core
Affects Version/s: 1.1.0
Fix Version/s: 1.1.2
Security Level: Public

Type: Improvement Priority: Minor
Reporter: schp Assignee: Michael Nitschinger
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
duplicates JCBC-223 Cannot use Persist.ONE/MASTER on a si... Resolved

If the number of Couchbase servers is not enough to provide the required number of replicas (e.g. when installing a stand-alone server and forgetting to uncheck the 'Enable replicas' option), observe throws an ArrayIndexOutOfBoundsException. An exception with a more descriptive name would indicate the error cause more clearly.

An example stack trace:

ArrayIndexOutOfBoundsException: -1
Generated at Tue Oct 21 09:11:22 CDT 2014 using JIRA 5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9.