File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Lexi Jo
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • 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:
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please post the entire exception stacktrace.
 
Lexi Jo
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It doesn't show me much in the exception...

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

 
Tony Docherty
Bartender
Pie
Posts: 2878
59
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Maneesh Godbole
Saloon Keeper
Posts: 10971
11
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • 1
  • Mark post as helpful
  • send pies
  • 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
Pie
Posts: 2878
59
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well spotted Maneesh
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic