• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

java.lang.IllegalArgumentException: candidates is empty

 
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 17644
300
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 115
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic