You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mahout.apache.org by Eleftherios Spyromitros Xioufis <es...@csd.auth.gr> on 2010/05/26 22:51:45 UTC

Change Recommender servlet

Hi all,

I want to build a custom recommender and for that  reason I need to  
change the RecommenderServlet class.
I import a package, say  
org.apache.mahout.cf.taste.example.grouplens.GroupLensRecommender;
and when I try to start jetty server I get the following complilation  
failure message:

C:\Users\lef\Desktop\mahout-0.3-src\mahout-0.3\taste-web\src\main\java\org\apach
e\mahout\cf\taste\web\RecommenderServlet.java:[36,51] package  
org.apache.mahout.
cf.taste.example.grouplens does not exist

How can i solve this problem? Is it possible to import other than the  
default packages in RecommenderServlet class?

Thanks in advance,
-Lef



Re: RE: RE: Change Recommender servlet

Posted by Sean Owen <sr...@gmail.com>.
I'm saying that package is wrong. All packages start with org.apache.mahout
not cf.taste

On May 28, 2010 4:46 AM, "Eleftherios Spyromitros Xioufis" <
espyromi@csd.auth.gr> wrote:

Yes I' m sure.. I created a new package in the examples package where I
placed my classes
following the paradigm of package cf.taste.example.grouplens.

But even when I try to import the package cf.taste.example.grouplens, I get
the same compilation error.
Something is going on with the servlet dependencies..


-----Original Message-----
From: Sean Owen [mailto:srowen@gmail.com]

Sent: Friday, May 28, 2010 8:49 AM
To: user@mahout.apache.org

Subject: Re: RE: Change Recommender servlet

Are you sure your package and import statements are cor...

RE: RE: Change Recommender servlet

Posted by Eleftherios Spyromitros Xioufis <es...@csd.auth.gr>.
Yes I' m sure.. I created a new package in the examples package where I placed my classes
following the paradigm of package cf.taste.example.grouplens.

But even when I try to import the package cf.taste.example.grouplens, I get the same compilation error.
Something is going on with the servlet dependencies..

-----Original Message-----
From: Sean Owen [mailto:srowen@gmail.com] 
Sent: Friday, May 28, 2010 8:49 AM
To: user@mahout.apache.org
Subject: Re: RE: Change Recommender servlet

Are you sure your package and import statements are correct? This refers to a package cf.taste.example.movielens but that is not valid.

I don't think this is related to the project per se.

Sean

On May 27, 2010 8:49 PM, "Eleftherios Spyromitros Xioufis" < espyromi@csd.auth.gr> wrote:

Hi again,


>So, am I right that you depend on examples because you have explicitly
modified >RecommenderServle...
Yes you are right. I have actually created a new package named movielens in the examples package and have modified RecommenderServlet to refer to it.
By the way,
when I import the package in RecommenderServlet class in Eclipse I see no errors. The package is imported ok...


>I think you are doing it right, except that the artifactId / module 
>name is
'mahout-examples' inst...
I changed the artifactId name to 'mahout-examples' and Org was a misspelling but not I get the same compilation errors as I described in the first mail.  It still cannot see the package...

Do you have any ideas how to  add the dependency?
Perhaps another arfifactID/groupID?

I give you the output from the console (sorry for the length..):

C:\Users\lef\Desktop\mahout-0.3-src\mahout-0.3\taste-web>mvn -e jetty:run-war
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
------------------------------------------------------------------------
[INFO] Building Mahout Taste Webapp
[INFO]    task-segment: [jetty:run-war]
[INFO]
------------------------------------------------------------------------
[INFO] Preparing jetty:run-war
[INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus .velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] [remote-resources:process {execution: default}] [INFO] [resources:resources {execution: default-resources}] [INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 9 resources
[INFO] Copying 2 resources to
C:\Users\lef\Desktop\mahout-0.3-src\mahout-0.3\tas
te-web\target/mahout-taste-webapp-0.3/WEB-INF/lib
[INFO] Copying 3 resources
[INFO] [compiler:compile {execution: default-compile}] [INFO] Compiling 1 source file to
C:\Users\lef\Desktop\mahout-0.3-src\mahout-0.3
\taste-web\target\classes
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Compilation failure


C:\Users\lef\Desktop\mahout-0.3-src\mahout-0.3\taste-web\src\main\java\org\apach
e\mahout\cf\taste\...
cf.taste.example.movielens does not exist


C:\Users\lef\Desktop\mahout-0.3-src\mahout-0.3\taste-web\src\main\java\org\apach
e\mahout\cf\taste\web\RecommenderServlet.java:[164,14] cannot find symbol symbol  : class GroupLensRecommender
location: class org.apache.mahout.cf.taste.web.RecommenderServlet


C:\Users\lef\Desktop\mahout-0.3-src\mahout-0.3\taste-web\src\main\java\org\apach
e\mahout\cf\taste\web\RecommenderServlet.java:[168,14] cannot find symbol symbol  : class GroupLensRecommender
location: class org.apache.mahout.cf.taste.web.RecommenderServlet


[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.BuildFailureException: Compilation failure
       at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:715)
       at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:556)
       at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecy
cle(DefaultLifecycleExecutor.java:1205)
       at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(Def
aultLifecycleExecutor.java:1038)
       at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:643)
       at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
Goal(DefaultLifecycleExecutor.java:569)
       at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:539)
       at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:387)
       at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:348)
       at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:180)
       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
       at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
       at
org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:6
0)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
       at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
       at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

       at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation fail ure
       at
org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompiler
Mojo.java:516)
       at
org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114)
       at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:490)
       at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:694)
       ... 21 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Thu May 27 22:33:11 EEST 2010 [INFO] Final Memory: 22M/53M [INFO]
------------------------------------------------------------------------

C:\Users\lef\Desktop\mahout-0.3-src\mahout-0.3\taste-web>

-----Original Message-----
From: Sean Owen [mailto:srowen@gmail.com]

Sent: Thursday, May 27, 2010 8:24 PM
To: user@mahout.apache.org
Subject: Re: Change Recommender serv...

I was mistaken earlier when I said taste-web depends on examples. It doesn't, which is good.

So, am...


Re: RE: Change Recommender servlet

Posted by Sean Owen <sr...@gmail.com>.
Are you sure your package and import statements are correct? This refers to
a package cf.taste.example.movielens but that is not valid.

I don't think this is related to the project per se.

Sean

On May 27, 2010 8:49 PM, "Eleftherios Spyromitros Xioufis" <
espyromi@csd.auth.gr> wrote:

Hi again,


>So, am I right that you depend on examples because you have explicitly
modified >RecommenderServle...
Yes you are right. I have actually created a new package named movielens in
the examples package
and have modified RecommenderServlet to refer to it.
By the way,
when I import the package in RecommenderServlet class in Eclipse I see no
errors. The package is imported ok...


>I think you are doing it right, except that the artifactId / module name is
'mahout-examples' inst...
I changed the artifactId name to 'mahout-examples' and Org was a misspelling
but not I get the same
compilation errors as I described in the first mail.  It still cannot see
the package...

Do you have any ideas how to  add the dependency?
Perhaps another arfifactID/groupID?

I give you the output from the console (sorry for the length..):

C:\Users\lef\Desktop\mahout-0.3-src\mahout-0.3\taste-web>mvn -e
jetty:run-war
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
------------------------------------------------------------------------
[INFO] Building Mahout Taste Webapp
[INFO]    task-segment: [jetty:run-war]
[INFO]
------------------------------------------------------------------------
[INFO] Preparing jetty:run-war
[INFO] Setting property: classpath.resource.loader.class =>
'org.codehaus.plexus
.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] [remote-resources:process {execution: default}]
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 9 resources
[INFO] Copying 2 resources to
C:\Users\lef\Desktop\mahout-0.3-src\mahout-0.3\tas
te-web\target/mahout-taste-webapp-0.3/WEB-INF/lib
[INFO] Copying 3 resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 1 source file to
C:\Users\lef\Desktop\mahout-0.3-src\mahout-0.3
\taste-web\target\classes
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Compilation failure


C:\Users\lef\Desktop\mahout-0.3-src\mahout-0.3\taste-web\src\main\java\org\apach
e\mahout\cf\taste\...
cf.taste.example.movielens does not exist


C:\Users\lef\Desktop\mahout-0.3-src\mahout-0.3\taste-web\src\main\java\org\apach
e\mahout\cf\taste\web\RecommenderServlet.java:[164,14] cannot find symbol
symbol  : class GroupLensRecommender
location: class org.apache.mahout.cf.taste.web.RecommenderServlet


C:\Users\lef\Desktop\mahout-0.3-src\mahout-0.3\taste-web\src\main\java\org\apach
e\mahout\cf\taste\web\RecommenderServlet.java:[168,14] cannot find symbol
symbol  : class GroupLensRecommender
location: class org.apache.mahout.cf.taste.web.RecommenderServlet


[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.BuildFailureException: Compilation failure
       at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:715)
       at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:556)
       at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecy
cle(DefaultLifecycleExecutor.java:1205)
       at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(Def
aultLifecycleExecutor.java:1038)
       at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:643)
       at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
Goal(DefaultLifecycleExecutor.java:569)
       at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:539)
       at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:387)
       at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:348)
       at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:180)
       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
       at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
       at
org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:6
0)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
       at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
       at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

       at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation
fail
ure
       at
org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompiler
Mojo.java:516)
       at
org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114)
       at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:490)
       at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:694)
       ... 21 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Thu May 27 22:33:11 EEST 2010
[INFO] Final Memory: 22M/53M
[INFO]
------------------------------------------------------------------------

C:\Users\lef\Desktop\mahout-0.3-src\mahout-0.3\taste-web>

-----Original Message-----
From: Sean Owen [mailto:srowen@gmail.com]

Sent: Thursday, May 27, 2010 8:24 PM
To: user@mahout.apache.org
Subject: Re: Change Recommender serv...

I was mistaken earlier when I said taste-web depends on examples. It
doesn't, which is good.

So, am...

RE: Change Recommender servlet

Posted by Eleftherios Spyromitros Xioufis <es...@csd.auth.gr>.
Hi again,

>So, am I right that you depend on examples because you have explicitly modified >RecommenderServlet to refer to, say, the GroupLens-based code in mahout-examples? That's fine, >but yes it means you have to express the dependency in order to build.

Yes you are right. I have actually created a new package named movielens in the examples package
and have modified RecommenderServlet to refer to it. 
By the way,
when I import the package in RecommenderServlet class in Eclipse I see no errors. The package is imported ok...

>I think you are doing it right, except that the artifactId / module name is 'mahout-examples' instead >of 'examples'. How about that? (and it's "org" not "Org").

I changed the artifactId name to 'mahout-examples' and Org was a misspelling but not I get the same 
compilation errors as I described in the first mail.  It still cannot see the package...

Do you have any ideas how to  add the dependency? 
Perhaps another arfifactID/groupID?

I give you the output from the console (sorry for the length..):

C:\Users\lef\Desktop\mahout-0.3-src\mahout-0.3\taste-web>mvn -e jetty:run-war
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Mahout Taste Webapp
[INFO]    task-segment: [jetty:run-war]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing jetty:run-war
[INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus
.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] [remote-resources:process {execution: default}]
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 9 resources
[INFO] Copying 2 resources to C:\Users\lef\Desktop\mahout-0.3-src\mahout-0.3\tas
te-web\target/mahout-taste-webapp-0.3/WEB-INF/lib
[INFO] Copying 3 resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 1 source file to C:\Users\lef\Desktop\mahout-0.3-src\mahout-0.3
\taste-web\target\classes
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure

C:\Users\lef\Desktop\mahout-0.3-src\mahout-0.3\taste-web\src\main\java\org\apach
e\mahout\cf\taste\web\RecommenderServlet.java:[36,51] package org.apache.mahout.
cf.taste.example.movielens does not exist

C:\Users\lef\Desktop\mahout-0.3-src\mahout-0.3\taste-web\src\main\java\org\apach
e\mahout\cf\taste\web\RecommenderServlet.java:[164,14] cannot find symbol
symbol  : class GroupLensRecommender
location: class org.apache.mahout.cf.taste.web.RecommenderServlet

C:\Users\lef\Desktop\mahout-0.3-src\mahout-0.3\taste-web\src\main\java\org\apach
e\mahout\cf\taste\web\RecommenderServlet.java:[168,14] cannot find symbol
symbol  : class GroupLensRecommender
location: class org.apache.mahout.cf.taste.web.RecommenderServlet


[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.BuildFailureException: Compilation failure
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:715)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:556)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecy
cle(DefaultLifecycleExecutor.java:1205)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(Def
aultLifecycleExecutor.java:1038)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:643)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
Goal(DefaultLifecycleExecutor.java:569)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:539)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:387)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:348)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:180)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
        at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:6
0)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation fail
ure
        at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompiler
Mojo.java:516)
        at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:490)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:694)
        ... 21 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Thu May 27 22:33:11 EEST 2010
[INFO] Final Memory: 22M/53M
[INFO] ------------------------------------------------------------------------
C:\Users\lef\Desktop\mahout-0.3-src\mahout-0.3\taste-web>

-----Original Message-----
From: Sean Owen [mailto:srowen@gmail.com] 
Sent: Thursday, May 27, 2010 8:24 PM
To: user@mahout.apache.org
Subject: Re: Change Recommender servlet

I was mistaken earlier when I said taste-web depends on examples. It doesn't, which is good.

So, am I right that you depend on examples because you have explicitly modified RecommenderServlet to refer to, say, the GroupLens-based code in mahout-examples? That's fine, but yes it means you have to express the dependency in order to build.

I think you are doing it right, except that the artifactId / module name is 'mahout-examples' instead of 'examples'. How about that? (and it's "org" not "Org").

On Thu, May 27, 2010 at 6:12 PM, Eleftherios Spyromitros Xioufis <es...@csd.auth.gr> wrote:
> Thanks again for the answer. I am not familiar with maven and I find it difficult to understand how mahout is built. But I am trying hard..
> I found the pom.xml file in taste-web folder and tried to modify it, in order to add the missing dependency but I am most probably doing it the wrong way.
>
> I tried to add this dependency:
>
> <dependency>
>  <groupId>org.apache.mahout</groupId>
>  <artifactId>examples</artifactId>
>  <version>${project.version}</version>
>  </dependency>
>
> But the command mvn jetty:run-war still fails with the following message:
>
> Missing:
> Org.apache.mahout:examples:jar:0.3
>
> I suppose that I have placed wrong values in groupID and artifactId tags..
> Can you please tell me what values should I use in order to add the examples package as a dependency in the recommenderservlet class?
>
> I appreciate your valuable help,
> Lef
>
>



Re: Change Recommender servlet

Posted by Sean Owen <sr...@gmail.com>.
I was mistaken earlier when I said taste-web depends on examples. It
doesn't, which is good.

So, am I right that you depend on examples because you have explicitly
modified RecommenderServlet to refer to, say, the GroupLens-based code
in mahout-examples? That's fine, but yes it means you have to express
the dependency in order to build.

I think you are doing it right, except that the artifactId / module
name is 'mahout-examples' instead of 'examples'. How about that? (and
it's "org" not "Org").

On Thu, May 27, 2010 at 6:12 PM, Eleftherios Spyromitros Xioufis
<es...@csd.auth.gr> wrote:
> Thanks again for the answer. I am not familiar with maven and I find it difficult to understand how mahout is built. But I am trying hard..
> I found the pom.xml file in taste-web folder and tried to modify it, in order to add the missing dependency but I am most probably doing it the wrong way.
>
> I tried to add this dependency:
>
> <dependency>
>  <groupId>org.apache.mahout</groupId>
>  <artifactId>examples</artifactId>
>  <version>${project.version}</version>
>  </dependency>
>
> But the command mvn jetty:run-war still fails with the following message:
>
> Missing:
> Org.apache.mahout:examples:jar:0.3
>
> I suppose that I have placed wrong values in groupID and artifactId tags..
> Can you please tell me what values should I use in order to add the examples package as a dependency in the recommenderservlet class?
>
> I appreciate your valuable help,
> Lef
>
>

RE: Change Recommender servlet

Posted by Eleftherios Spyromitros Xioufis <es...@csd.auth.gr>.
Thanks again for the answer. I am not familiar with maven and I find it difficult to understand how mahout is built. But I am trying hard..
I found the pom.xml file in taste-web folder and tried to modify it, in order to add the missing dependency but I am most probably doing it the wrong way.

I tried to add this dependency:

<dependency>
  <groupId>org.apache.mahout</groupId> 
  <artifactId>examples</artifactId> 
  <version>${project.version}</version> 
 </dependency>

But the command mvn jetty:run-war still fails with the following message:

Missing:
Org.apache.mahout:examples:jar:0.3

I suppose that I have placed wrong values in groupID and artifactId tags..
Can you please tell me what values should I use in order to add the examples package as a dependency in the recommenderservlet class?

I appreciate your valuable help,
Lef


-----Original Message-----
From: Sean Owen [mailto:srowen@gmail.com] 
Sent: Thursday, May 27, 2010 11:01 AM
To: user@mahout.apache.org
Subject: Re: Change Recommender servlet

Yes, please see my last reply. Your new code depends on source code from several modules of Mahout. You will have to define these dependencies in your build environment in order for it to access all the necessary code. In particular you are missing a dependency on the examples module now.

The Maven build pom.xml for taste-web expresses this dependency and so it works. This is the sort of thing you need to do.

On Thu, May 27, 2010 at 7:01 AM, Eleftherios Spyromitros <es...@csd.auth.gr> wrote:
> Hi again,
>
> and thanks for your answer. What I am actually trying to do is this:
>
> I want to combine two recommenders, a user-based and an item-based one.
> So I created a new Class which implements the Recommender interface 
> and which internally declares two recommender objects. I need to call 
> a method of this class from recommenderServlet so I have to import the 
> package which contains the new class in the recommenderServlet class.
>
> I'm doing exactly what is described in Taste documentation (I use 
> maven) and get the compilation warning that I told you about in the previous message.
>
> I think that the problem is that for some reason the 
> recommenderServlet class can't "see" the package that I import. Which 
> packages are viewable from the servlet and how can I add the examples package?
>
> Thanks,
> Lef
>
>> -----Original Message-----
>> From: Sean Owen [mailto:srowen@gmail.com]
>> Sent: Thursday, May 27, 2010 12:39 AM
>> To: user@mahout.apache.org
>> Subject: Re: Change Recommender servlet
>>
>> This bit of code actually depends on other code in the examples 
>> module. (Which is arguably strange and which I'm happy to think about 
>> changing, but there are decent reasons for it.)
>>
>> I think it is just depending on the RecommenderWrapper class.
>>
>> It should build from the Maven build script since it will express 
>> this dependency. If you compile it in another system, you may have to 
>> tell it about the code in examples too.
>>
>> No code is in the default package.
>>
>> On Wed, May 26, 2010 at 9:51 PM, Eleftherios Spyromitros Xioufis 
>> <es...@csd.auth.gr> wrote:
>> > Hi all,
>> >
>> > I want to build a custom recommender and for that  reason I need to
>> change
>> > the RecommenderServlet class.
>> > I import a package, say
>> > org.apache.mahout.cf.taste.example.grouplens.GroupLensRecommender;
>> > and when I try to start jetty server I get the following 
>> > complilation failure message:
>> >
>> > C:\Users\lef\Desktop\mahout-0.3-src\mahout-0.3\taste-
>> web\src\main\java\org\apach
>> > e\mahout\cf\taste\web\RecommenderServlet.java:[36,51] package 
>> > org.apache.mahout.
>> > cf.taste.example.grouplens does not exist
>> >
>> > How can i solve this problem? Is it possible to import other than 
>> > the default packages in RecommenderServlet class?
>> >
>> > Thanks in advance,
>> > -Lef
>> >
>> >
>> >
>>
>>
>> No virus found in this incoming message.
>> Checked by AVG - www.avg.com
>> Version: 9.0.819 / Virus Database: 271.1.1/2898 - Release Date:
>> 05/26/10 21:26:00
>
>



Re: Change Recommender servlet

Posted by Sean Owen <sr...@gmail.com>.
Yes, please see my last reply. Your new code depends on source code
from several modules of Mahout. You will have to define these
dependencies in your build environment in order for it to access all
the necessary code. In particular you are missing a dependency on the
examples module now.

The Maven build pom.xml for taste-web expresses this dependency and so
it works. This is the sort of thing you need to do.

On Thu, May 27, 2010 at 7:01 AM, Eleftherios Spyromitros
<es...@csd.auth.gr> wrote:
> Hi again,
>
> and thanks for your answer. What I am actually trying to do is this:
>
> I want to combine two recommenders, a user-based and an item-based one.
> So I created a new Class which implements the Recommender interface and
> which internally declares two recommender objects. I need to call a method
> of this class from recommenderServlet so I have to import the package which contains
> the new class in the recommenderServlet class.
>
> I'm doing exactly what is described in Taste documentation (I use maven)
> and get the compilation warning that I told you about in the previous message.
>
> I think that the problem is that for some reason the recommenderServlet class
> can't "see" the package that I import. Which packages are viewable from the servlet
> and how can I add the examples package?
>
> Thanks,
> Lef
>
>> -----Original Message-----
>> From: Sean Owen [mailto:srowen@gmail.com]
>> Sent: Thursday, May 27, 2010 12:39 AM
>> To: user@mahout.apache.org
>> Subject: Re: Change Recommender servlet
>>
>> This bit of code actually depends on other code in the examples
>> module. (Which is arguably strange and which I'm happy to think about
>> changing, but there are decent reasons for it.)
>>
>> I think it is just depending on the RecommenderWrapper class.
>>
>> It should build from the Maven build script since it will express this
>> dependency. If you compile it in another system, you may have to tell
>> it about the code in examples too.
>>
>> No code is in the default package.
>>
>> On Wed, May 26, 2010 at 9:51 PM, Eleftherios Spyromitros Xioufis
>> <es...@csd.auth.gr> wrote:
>> > Hi all,
>> >
>> > I want to build a custom recommender and for that  reason I need to
>> change
>> > the RecommenderServlet class.
>> > I import a package, say
>> > org.apache.mahout.cf.taste.example.grouplens.GroupLensRecommender;
>> > and when I try to start jetty server I get the following complilation
>> > failure message:
>> >
>> > C:\Users\lef\Desktop\mahout-0.3-src\mahout-0.3\taste-
>> web\src\main\java\org\apach
>> > e\mahout\cf\taste\web\RecommenderServlet.java:[36,51] package
>> > org.apache.mahout.
>> > cf.taste.example.grouplens does not exist
>> >
>> > How can i solve this problem? Is it possible to import other than the
>> > default packages in RecommenderServlet class?
>> >
>> > Thanks in advance,
>> > -Lef
>> >
>> >
>> >
>>
>>
>> No virus found in this incoming message.
>> Checked by AVG - www.avg.com
>> Version: 9.0.819 / Virus Database: 271.1.1/2898 - Release Date:
>> 05/26/10 21:26:00
>
>

RE: Change Recommender servlet

Posted by Eleftherios Spyromitros <es...@csd.auth.gr>.
Hi again,

and thanks for your answer. What I am actually trying to do is this:

I want to combine two recommenders, a user-based and an item-based one.
So I created a new Class which implements the Recommender interface and
which internally declares two recommender objects. I need to call a method
of this class from recommenderServlet so I have to import the package which contains
the new class in the recommenderServlet class.

I'm doing exactly what is described in Taste documentation (I use maven)
and get the compilation warning that I told you about in the previous message.

I think that the problem is that for some reason the recommenderServlet class 
can't "see" the package that I import. Which packages are viewable from the servlet
and how can I add the examples package?

Thanks,
Lef

> -----Original Message-----
> From: Sean Owen [mailto:srowen@gmail.com]
> Sent: Thursday, May 27, 2010 12:39 AM
> To: user@mahout.apache.org
> Subject: Re: Change Recommender servlet
> 
> This bit of code actually depends on other code in the examples
> module. (Which is arguably strange and which I'm happy to think about
> changing, but there are decent reasons for it.)
> 
> I think it is just depending on the RecommenderWrapper class.
> 
> It should build from the Maven build script since it will express this
> dependency. If you compile it in another system, you may have to tell
> it about the code in examples too.
> 
> No code is in the default package.
> 
> On Wed, May 26, 2010 at 9:51 PM, Eleftherios Spyromitros Xioufis
> <es...@csd.auth.gr> wrote:
> > Hi all,
> >
> > I want to build a custom recommender and for that  reason I need to
> change
> > the RecommenderServlet class.
> > I import a package, say
> > org.apache.mahout.cf.taste.example.grouplens.GroupLensRecommender;
> > and when I try to start jetty server I get the following complilation
> > failure message:
> >
> > C:\Users\lef\Desktop\mahout-0.3-src\mahout-0.3\taste-
> web\src\main\java\org\apach
> > e\mahout\cf\taste\web\RecommenderServlet.java:[36,51] package
> > org.apache.mahout.
> > cf.taste.example.grouplens does not exist
> >
> > How can i solve this problem? Is it possible to import other than the
> > default packages in RecommenderServlet class?
> >
> > Thanks in advance,
> > -Lef
> >
> >
> >
> 
> 
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 9.0.819 / Virus Database: 271.1.1/2898 - Release Date:
> 05/26/10 21:26:00


Re: Change Recommender servlet

Posted by Sean Owen <sr...@gmail.com>.
This bit of code actually depends on other code in the examples
module. (Which is arguably strange and which I'm happy to think about
changing, but there are decent reasons for it.)

I think it is just depending on the RecommenderWrapper class.

It should build from the Maven build script since it will express this
dependency. If you compile it in another system, you may have to tell
it about the code in examples too.

No code is in the default package.

On Wed, May 26, 2010 at 9:51 PM, Eleftherios Spyromitros Xioufis
<es...@csd.auth.gr> wrote:
> Hi all,
>
> I want to build a custom recommender and for that  reason I need to change
> the RecommenderServlet class.
> I import a package, say
> org.apache.mahout.cf.taste.example.grouplens.GroupLensRecommender;
> and when I try to start jetty server I get the following complilation
> failure message:
>
> C:\Users\lef\Desktop\mahout-0.3-src\mahout-0.3\taste-web\src\main\java\org\apach
> e\mahout\cf\taste\web\RecommenderServlet.java:[36,51] package
> org.apache.mahout.
> cf.taste.example.grouplens does not exist
>
> How can i solve this problem? Is it possible to import other than the
> default packages in RecommenderServlet class?
>
> Thanks in advance,
> -Lef
>
>
>