[
https://issues.apache.org/jira/browse/MAHOUT-584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12982901#action_12982901
]
Frank Scholten commented on MAHOUT-584:
---------------------------------------
Added new patch. The resource parameter in the newly added loadProperties
method was not used. It always used driver.classes.props
Also, when the new patch is applied the test will only succeed after running
the antrun plugin. The antrun plugin will generate the
driver.classes.default.props
<!-- Snip -->
<phase>compile</phase>
<configuration>
<tasks>
<copy file="../conf/driver.classes.props"
tofile="${project.build.directory}/classes/driver.classes.default.props"/>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
<!-- Snip -->
I also noticed that when running MahoutDriver's main method directly it works
without exceptions, while running it through the MahoutDriverTest from the
patch it won't throw NPEs but it will still throw ClassNotFoundExceptions when
it tries to add program driver classes. After taking a quick glance at it I
don't yet see why that is. Any ideas? Would be nice to run MahoutDriver from a
separate module.
> MahoutDriver throws NPE if driver.classes.props is not on the classpath
> -----------------------------------------------------------------------
>
> Key: MAHOUT-584
> URL: https://issues.apache.org/jira/browse/MAHOUT-584
> Project: Mahout
> Issue Type: Bug
> Affects Versions: 0.4
> Reporter: Frank Scholten
> Assignee: Sean Owen
> Priority: Minor
> Fix For: 0.5
>
> Attachments: MAHOUT-584-v2.patch, MAHOUT-584.patch
>
> Original Estimate: 0.08h
> Remaining Estimate: 0.08h
>
> Running MahoutDriver from an IDE run configuration with a program name such
> as kmeans and help as arguments, will result in an NPE because it won't be
> able to find the driver.classes.props file.
> By changing the catch block so it catches Exception instead of IOException,
> MahoutDriver will use the driver.classes.default.props file so it can still
> be run with or without the driver.classes.props. This is useful if one wants
> to call the MahoutDriver from custom code outside mahout instead of using the
> mahout script. However, if one wishes to run MahoutDriver from outside
> mahout, the mahout-core, -math, -utils and example jars still need to be on
> the classpath or else ClassNotFoundExceptions will be thrown when it tries to
> add the classes for all the programs.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.