aspose file tools*
The moose likes I/O and Streams and the fly likes Unable to read file using google guava resource library in jbehave project Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "Unable to read file using google guava resource library in jbehave project" Watch "Unable to read file using google guava resource library in jbehave project" New topic
Author

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

Lexi Jo
Greenhorn

Joined: Jun 24, 2014
Posts: 2
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:
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10102
    
165

Please post the entire exception stacktrace.

[My Blog] [JavaRanch Journal]
Lexi Jo
Greenhorn

Joined: Jun 24, 2014
Posts: 2
It doesn't show me much in the exception...

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

Tony Docherty
Bartender

Joined: Aug 07, 2007
Posts: 2289
    
  49
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.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10376
    
    8


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

Excellent reason why one should copy paste the exact stack trace

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Tony Docherty
Bartender

Joined: Aug 07, 2007
Posts: 2289
    
  49
Well spotted Maneesh
 
 
subject: Unable to read file using google guava resource library in jbehave project