You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mahout.apache.org by Alex Luya <al...@gmail.com> on 2010/09/03 07:37:48 UTC

Error:.pros file can't be loaded

Hello:
       When I run mahout command,get this errors:
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
running on hadoop, using HADOOP_HOME=/usr/local/hadoop/hadoop-0.21.0 and HADOOP_CONF_DIR=/usr/local/hadoop/hadoop-0.21.0/conf
Exception in thread "main" java.lang.NullPointerException
        at java.util.Properties$LineReader.readLine(Properties.java:418)
        at java.util.Properties.load0(Properties.java:337)
        at java.util.Properties.load(Properties.java:325)
        at org.apache.mahout.driver.MahoutDriver.main(MahoutDriver.java:100)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:192)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I tracked to source code and try to figure out what problem causes this issue:
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    ProgramDriver programDriver = new ProgramDriver();
    Properties mainClasses = new Properties();
    InputStream propsStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("driver.classes.props");

    mainClasses.load(propsStream);
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Here,the last line " mainClasses.load(propsStream);"  thrown out a NULL exception.and may this "propsStream" is NULL.
 
     I doubt this is a hadoop issue.Any suggestion to solve this problem?Thank you.
   

Re: Error:.pros file can't be loaded

Posted by Alex Luya <al...@gmail.com>.
Hi
    I have figured it out.After commented the line HADOOP_CLASSPATH in $HADOOP_HOME/conf/hadoop-env.sh,problem has gone.I think the mahout command 
should detect this out and prompt to user.

On Friday, September 03, 2010 09:55:24 pm Ted Dunning wrote:
> What version of Mahout?  (I will assume the trunk)
> 
> What platform?
> 
> I see that you are using hadoop 0.21.  So far, we only officially support
> 0.20.2, although that is clearly not your problem. It may become a problem
> in your next step.
> 
> This looks like a problem in the Mahout compilation.  The file in question
> should have been built into the Mahout executable.  How did you build
> Mahout?
> 
> On Thu, Sep 2, 2010 at 10:37 PM, Alex Luya <al...@gmail.com> wrote:
> > Hello:
> >       When I run mahout command,get this errors:
> > -------------------------------------------------------------------------
> > -------------------------------------------------------------------------
> > ------------------------------------------------------ running on hadoop,
> > using HADOOP_HOME=/usr/local/hadoop/hadoop-0.21.0 and
> > HADOOP_CONF_DIR=/usr/local/hadoop/hadoop-0.21.0/conf
> > Exception in thread "main" java.lang.NullPointerException
> > 
> >        at java.util.Properties$LineReader.readLine(Properties.java:418)
> >        at java.util.Properties.load0(Properties.java:337)
> >        at java.util.Properties.load(Properties.java:325)
> >        at
> >        org.apache.mahout.driver.MahoutDriver.main(MahoutDriver.java:100)
> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
> > 
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java
> > :39)
> > 
> >        at
> > 
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI
> > mpl.java:25)
> > 
> >        at java.lang.reflect.Method.invoke(Method.java:597)
> >        at org.apache.hadoop.util.RunJar.main(RunJar.java:192)
> > 
> > -------------------------------------------------------------------------
> > -------------------------------------------------------------------------
> > ------------------------------------------------------ I tracked to
> > source code and try to figure out what problem causes this issue:
> > 
> > -------------------------------------------------------------------------
> > -------------------------------------------------------------------------
> > ------------------------------------------------------
> > 
> >    ProgramDriver programDriver = new ProgramDriver();
> >    Properties mainClasses = new Properties();
> >    InputStream propsStream =
> > 
> > Thread.currentThread().getContextClassLoader().getResourceAsStream("drive
> > r.classes.props");
> > 
> >    mainClasses.load(propsStream);
> > 
> > -------------------------------------------------------------------------
> > -------------------------------------------------------------------------
> > ------------------------------------------------------ Here,the last line
> > " mainClasses.load(propsStream);"  thrown out a NULL exception.and may
> > this "propsStream" is NULL.
> > 
> >     I doubt this is a hadoop issue.Any suggestion to solve this
> > 
> > problem?Thank you.

Re: Error:.pros file can't be loaded

Posted by Alex Luya <al...@gmail.com>.
 What version of Mahout?  (I will assume the trunk)
   Yes,it is trunk
 
What platform?

Apache Maven 2.2.1 (r801777; 2009-08-07 03:16:01+0800)
Java version: 1.6.0_21
Java home: /usr/local/hadoop/jdk1.6.0_21/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux" version: "2.6.32-24-generic" arch: "amd64" Family: "unix"
 
The file in question  should have been built into the Mahout executable.  
  I knew that.I just try to check source code to figure out the reason of issue that I am facing. 


How did you build Mahout?
1, cd to trunk directory
2,mvn install 


On Friday, September 03, 2010 09:55:24 pm Ted Dunning wrote:
> What version of Mahout?  (I will assume the trunk)
> 
> What platform?
> 
> I see that you are using hadoop 0.21.  So far, we only officially support
> 0.20.2, although that is clearly not your problem. It may become a problem
> in your next step.
> 
> This looks like a problem in the Mahout compilation.  The file in question
> should have been built into the Mahout executable.  How did you build
> Mahout?
> 
> On Thu, Sep 2, 2010 at 10:37 PM, Alex Luya <al...@gmail.com> wrote:
> > Hello:
> >       When I run mahout command,get this errors:
> > -------------------------------------------------------------------------
> > -------------------------------------------------------------------------
> > ------------------------------------------------------ running on hadoop,
> > using HADOOP_HOME=/usr/local/hadoop/hadoop-0.21.0 and
> > HADOOP_CONF_DIR=/usr/local/hadoop/hadoop-0.21.0/conf
> > Exception in thread "main" java.lang.NullPointerException
> > 
> >        at java.util.Properties$LineReader.readLine(Properties.java:418)
> >        at java.util.Properties.load0(Properties.java:337)
> >        at java.util.Properties.load(Properties.java:325)
> >        at
> >        org.apache.mahout.driver.MahoutDriver.main(MahoutDriver.java:100)
> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
> > 
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java
> > :39)
> > 
> >        at
> > 
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI
> > mpl.java:25)
> > 
> >        at java.lang.reflect.Method.invoke(Method.java:597)
> >        at org.apache.hadoop.util.RunJar.main(RunJar.java:192)
> > 
> > -------------------------------------------------------------------------
> > -------------------------------------------------------------------------
> > ------------------------------------------------------ I tracked to
> > source code and try to figure out what problem causes this issue:
> > 
> > -------------------------------------------------------------------------
> > -------------------------------------------------------------------------
> > ------------------------------------------------------
> > 
> >    ProgramDriver programDriver = new ProgramDriver();
> >    Properties mainClasses = new Properties();
> >    InputStream propsStream =
> > 
> > Thread.currentThread().getContextClassLoader().getResourceAsStream("drive
> > r.classes.props");
> > 
> >    mainClasses.load(propsStream);
> > 
> > -------------------------------------------------------------------------
> > -------------------------------------------------------------------------
> > ------------------------------------------------------ Here,the last line
> > " mainClasses.load(propsStream);"  thrown out a NULL exception.and may
> > this "propsStream" is NULL.
> > 
> >     I doubt this is a hadoop issue.Any suggestion to solve this
> > 
> > problem?Thank you.

Re: Error:.pros file can't be loaded

Posted by Ted Dunning <te...@gmail.com>.
What version of Mahout?  (I will assume the trunk)

What platform?

I see that you are using hadoop 0.21.  So far, we only officially support
0.20.2, although that is clearly not your problem. It may become a problem
in your next step.

This looks like a problem in the Mahout compilation.  The file in question
should have been built into the Mahout executable.  How did you build
Mahout?

On Thu, Sep 2, 2010 at 10:37 PM, Alex Luya <al...@gmail.com> wrote:

> Hello:
>       When I run mahout command,get this errors:
>
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> running on hadoop, using HADOOP_HOME=/usr/local/hadoop/hadoop-0.21.0 and
> HADOOP_CONF_DIR=/usr/local/hadoop/hadoop-0.21.0/conf
> Exception in thread "main" java.lang.NullPointerException
>        at java.util.Properties$LineReader.readLine(Properties.java:418)
>        at java.util.Properties.load0(Properties.java:337)
>        at java.util.Properties.load(Properties.java:325)
>        at org.apache.mahout.driver.MahoutDriver.main(MahoutDriver.java:100)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:597)
>        at org.apache.hadoop.util.RunJar.main(RunJar.java:192)
>
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> I tracked to source code and try to figure out what problem causes this
> issue:
>
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>    ProgramDriver programDriver = new ProgramDriver();
>    Properties mainClasses = new Properties();
>    InputStream propsStream =
> Thread.currentThread().getContextClassLoader().getResourceAsStream("driver.classes.props");
>
>    mainClasses.load(propsStream);
>
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> Here,the last line " mainClasses.load(propsStream);"  thrown out a NULL
> exception.and may this "propsStream" is NULL.
>
>     I doubt this is a hadoop issue.Any suggestion to solve this
> problem?Thank you.
>
>