• 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

Unable to read file using google guava resource library in jbehave project

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, Can someone help please? I'm getting an IllegalArgumentException returned when I try to get a file using guava library.

I previously had the function working when the file was in a different location, before I switched to running JBehave, my steps run but it fails to find the resource, even after I've moved it.

The code being executed is (this worked previously before using JBehave):



The file I'm looking for is in the root folder for src/main/resources and also src/test/resources, previously I had it within a completely different location before I switched over to JBehave. I've tried it within a subdirectory in the same locations too.

I've recently updated the pom.xml to try to include the location required.

The pom is a bit of a mess at the moment and needs a clean up so apologies for the state of the extract below!

Extract from pom is below:
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please post the entire exception stacktrace.
 
Lexi Jo
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It doesn't show me much in the exception...

(java.lang.IllegalArgumentException: resource OBOE-confirmations.xml not found.)

 
Bartender
Posts: 3323
86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch.

It doesn't show me much in the exception...


But it may help someone who has used to library before to direct you to a solution.
Please do as Jaikiran has suggested and post the complete stack trace and not just the first line.
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

(java.lang.IllegalArgumentException: resource OBOE-confirmations.xml not found.)


Excellent reason why one should copy paste the exact stack trace
 
Tony Docherty
Bartender
Posts: 3323
86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well spotted Maneesh
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic