You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mahout.apache.org by "Frank Scholten (JIRA)" <ji...@apache.org> on 2011/01/13 23:10:47 UTC

[jira] Created: (MAHOUT-584) MahoutDriver throws NPE if driver.classes.props is not on the classpath

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
            Priority: Minor
             Fix For: 0.5


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.


[jira] Resolved: (MAHOUT-584) MahoutDriver throws NPE if driver.classes.props is not on the classpath

Posted by "Sean Owen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAHOUT-584?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sean Owen resolved MAHOUT-584.
------------------------------

    Resolution: Fixed

Oops right. Committed. The test works fine for me without pom changes though?

> 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.


[jira] Commented: (MAHOUT-584) MahoutDriver throws NPE if driver.classes.props is not on the classpath

Posted by "Frank Scholten (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Updated: (MAHOUT-584) MahoutDriver throws NPE if driver.classes.props is not on the classpath

Posted by "Frank Scholten (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAHOUT-584?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Frank Scholten updated MAHOUT-584:
----------------------------------

    Attachment: MAHOUT-584-v2.patch

> 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.


[jira] Commented: (MAHOUT-584) MahoutDriver throws NPE if driver.classes.props is not on the classpath

Posted by "Sean Owen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAHOUT-584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12982577#action_12982577 ] 

Sean Owen commented on MAHOUT-584:
----------------------------------

Looks OK, or rather, I made a different version of the patch that checks for null rather than catches an NPE
However I can't get the test to pass; in the test environment it seems like these are not on the classpath. Can you run the test? 

> 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
>            Priority: Minor
>             Fix For: 0.5
>
>         Attachments: 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.


[jira] Commented: (MAHOUT-584) MahoutDriver throws NPE if driver.classes.props is not on the classpath

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAHOUT-584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12982643#action_12982643 ] 

Hudson commented on MAHOUT-584:
-------------------------------

Integrated in Mahout-Quality #565 (See [https://hudson.apache.org/hudson/job/Mahout-Quality/565/])
    MAHOUT-584 Avoid NPE when main props file can't be found


> 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.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.


[jira] Reopened: (MAHOUT-584) MahoutDriver throws NPE if driver.classes.props is not on the classpath

Posted by "Frank Scholten (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAHOUT-584?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Frank Scholten reopened MAHOUT-584:
-----------------------------------


> 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.


[jira] Updated: (MAHOUT-584) MahoutDriver throws NPE if driver.classes.props is not on the classpath

Posted by "Frank Scholten (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAHOUT-584?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Frank Scholten updated MAHOUT-584:
----------------------------------

    Status: Patch Available  (was: Open)

> 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
>            Priority: Minor
>             Fix For: 0.5
>
>         Attachments: 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.


[jira] Updated: (MAHOUT-584) MahoutDriver throws NPE if driver.classes.props is not on the classpath

Posted by "Frank Scholten (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAHOUT-584?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Frank Scholten updated MAHOUT-584:
----------------------------------

    Attachment: MAHOUT-584.patch

> 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
>            Priority: Minor
>             Fix For: 0.5
>
>         Attachments: 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.


[jira] Commented: (MAHOUT-584) MahoutDriver throws NPE if driver.classes.props is not on the classpath

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAHOUT-584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12983017#action_12983017 ] 

Hudson commented on MAHOUT-584:
-------------------------------

Integrated in Mahout-Quality #568 (See [https://hudson.apache.org/hudson/job/Mahout-Quality/568/])
    MAHOUT-584 part 2, fix from Frank


> 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.


[jira] Updated: (MAHOUT-584) MahoutDriver throws NPE if driver.classes.props is not on the classpath

Posted by "Sean Owen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAHOUT-584?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sean Owen updated MAHOUT-584:
-----------------------------

    Resolution: Fixed
      Assignee: Sean Owen
        Status: Resolved  (was: Patch Available)

Committed without test for now which doesn't seem to be able to trigger the desired normal behavior

> 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.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.