Fix #62: MimeType NoClassDefFoundError
See https://stackoverflow.com/questions/16570523/getresourceasstream-returns-null; the two fixes are
- call the class'
getResourceAsStream()instead of the ClassLoader's - use an absolute path to get the resource.
Passes mvn test here.
Thank you so much for taking the time to fix this. Yeah, this kind of file retrieval is a pain in the black hole, because I'm sure this version will fail too in some other context, perhaps when deployed as part of a... Tomcat war or whatever.
So I don't think I'm going to be happy about this, until we attempt both ways, sort of like a graceful degradation. Basically if result null, try the other way. If you add that, I'll merge and release right away.
Any update on your side? It would be a helpful change, but I'll close the PR otherwise.
Closed as a result of prolonged inactivity.