opennlp-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörn Kottmann <>
Subject Re: model version issues outside eclipse
Date Thu, 19 Apr 2012 07:33:59 GMT
On 04/18/2012 08:06 PM, Stephan Greene wrote:
> On Apr 18, 2012, at 1:21 PM, Jörn Kottmann wrote:
>> Its strange that it cannot load it. Based on your other post you could assume that
>> has to do with your classpath. Do you use a different opennlp-tools.jar file?
>> Or is something wrong with the line which tries to retrieve the version file?
> I have the same jar files across both methods of invocation so it's not the classpath.
But your question about the getResourceAsStream() line got me thinking. I researched it a
bit, and found that the behavior of this method will vary depending on what ClassLoader is
active in the current context. Which ClassLoader you get is in turn affected by any number
of things, including third party libraries and eclipse plugins.
> If I restrict my command line classpath specification explicitly to the minimal set of
UIMA and OpenNLP jars that I need, it runs fine. I had been using wildcard syntax. I'm not
sure how unreferenced libs could affect the ClassLoader, however. So, not the most satisfying
resolution, but a resolution nonetheless. Given the nature of the issue, I would have expected
the eclipse context to exhibit the problem, not the command line, though perhaps eclipse takes
extra care in ClassLoader management.

I still don't get it. We do:

This call uses the classloader which loaded the Version class to look 
for the opennlp.version
file in the same package. How can that fail if the file is there?


View raw message