web stats
getResourceAsStream() not able to read properties file from resource directory - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 03-28-2017, 05:20 AM
jbartels jbartels is offline
Mirth Guru
 
Join Date: Oct 2006
Posts: 722
jbartels is on a distinguished road
Default getResourceAsStream() not able to read properties file from resource directory

I'm working on an interface where the vendor has wrapped their API in a JAR. This JAR is making a call to read a properties file like this:

Code:
getClass().getClassLoader().getResourceAsStream("someFile.properties");
There is a resource directory set up which includes the JAR and its dependencies and several properties files. MC shows someFile.properties in the listing for the resource directory.

This JAR errors when run, it logs an error that it cannot read the properties file. The JAR is fairly well written and appears to error differently when it cannot read the file versus when the file is malformed or missing a required property.

I cannot easily change this other vendors JAR. Are there any settings or other locations where I can put the properties file it is looking for so it can read it?
__________________
Jon Bartels

Zen is hiring!!!!
http://consultzen.com/careers/
Talented healthcare IT professionals wanted. Engineers to sales to management.
Good benefits, great working environment, genuinely interesting work.

Last edited by jbartels; 03-28-2017 at 05:48 AM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 01:26 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation