• 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

Getting java.lang.IllegalArgumentException: unable to List availability

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

My code is as below and getting the java.lang.illegalArgumentException...any help would be great



[HENRY: Added code tags]
 
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

What is the exception that you caught and replaced with the illegal argument exception? You printed the stack -- can you tell us what it was?

Henry
 
brams mun
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using JUnit testing and unfortunately there is a configuration problem so I could not catch the stack trace.

Got the below error with other related references in the console.

java.lang.IllegalArgumentException: unable to List availability

Could anyone suggest how can I proceed from here?
 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Run the application from an IDE or the command line so as to get the stack trace?
 
Master Rancher
Posts: 4806
72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Or replace

with

This should include the original exception information as part of the exception caught by JUnit. In general, try to always the Exception and Error constructors that take a Throwable argument, if you have another Throwable that caused the original problem. Unless you want to lose the information in the original exception.

Also, it's quite possible that the original e.printStackTrace() output was not lost, but you're overlooking it. JUnit's graphical test runner will display the final thrown exception (in this case, the IllegalArgumentException) fairly prominently. Other output before that final exception is generally still available, but you have to look for it. How exactly are you running JUnit? From the command line? (With what command?) Or are you running from within an IDE, such as Eclipse, IDEA, or Netbeans? Tell us and we may be able to tell you how ot find the printStackTrace() output.
 
This tiny ad will self destruct in five seconds.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic