• Post Reply Bookmark Topic Watch Topic
  • New Topic

java.lang.IllegalArgumentException: candidates is empty  RSS feed

 
Mike Cheung
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, am unable to start application because it's throwing a stack trace with this at the cause. Searched on Google but wasn't able to find any description of what this is. Any pointers available? Thanks.
 
Junilu Lacar
Sheriff
Posts: 11494
180
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An IllegalArgumentException is usually thrown to indicate that a method is being invoked with a parameter value that is not useable. In your case, you should ensure that your candidates variable, which is probably a List, contains at least one element. If candidates is not a List, then you need to figure out what constitutes an "empty" value and do something to correct it before passing it to the method that is throwing the exception.
 
Mike Cheung
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, thanks! Now that you have explained it, it makes perfect sense. Let me dig into this a bit more because it arrives to the stack trace after a convoluted series of Spring bean instantiations.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!