I was talking about mahout-0.5, 0.6 src and trunk. I don't think pom.xml in the mahout-integration project specifies dependency on mahout-examples, which caused no class found when it tried to start jetty. Hopefully it makes sense to you. Did anyone have the same issue? Thanks,
On Tue, Apr 10, 2012 at 5:09 PM, Way Cool <[email protected]> wrote: > The error is still shown up when I run mvn jetty:run on the > mahout-integration project using src distribution: > > > [INFO] Starting jetty 6.1.10 ... > 2012-01-24 13:31:03.709::INFO: jetty-6.1.10 > 2012-01-24 13:31:04.842::INFO: No Transaction manager found - if your > webapp requires one, please configure one. > 2012-01-24 13:31:05.233::WARN: failed taste-recommender > javax.servlet. > ServletException: java.lang.IllegalStateException: > java.lang.ClassNotFoundException: > org.apache.mahout.cf.taste.example.grouplens.GroupLensRecommender > at > org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:437) > at > org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:256) > at > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) > at > org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:612) > at org.mortbay.jetty.servlet.Context.startContext(Context.java:139) > at > org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220) > at > org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:510) > at > org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448) > at > org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:110) > at > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) > at > org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152) > at > org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156) > at > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) > at > org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152) > at > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) > at > org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) > at org.mortbay.jetty.Server.doStart(Server.java:222) > > > > On Tue, Apr 10, 2012 at 11:10 AM, Sean Owen <[email protected]> wrote: > >> I am still not sure what the problem is. It is entirely fine to load >> classes which depend upon one another. >> >> What's the specific error? These instructions remain correct. >> On Apr 10, 2012 11:19 AM, "Way Cool" <[email protected]> wrote: >> >> > It's not a circular dependency at compile time, however it happens at >> run >> > time. mahout-examples has dependency on mahout-integration, and when we >> run >> > mahout-integration project using "mvn jetty:run", it complains about a >> > missing class which is defined in mahout-examples. >> > Here is the instructions how to run the demo ( >> > https://cwiki.apache.org/MAHOUT/recommender-documentation.html): >> > Demo >> > >> > To build and run the demo, follow the instructions below, which are >> written >> > for Unix-like operating systems: >> > >> > - Obtain a copy of the Mahout distribution, either from SVN or as a >> > downloaded archive. >> > - Download the "1 Million MovieLens Dataset" from >> > Grouplens.org<http://www.grouplens.org/> >> > - Unpack the archive and copy movies.dat and ratings.dat to >> > >> > >> trunk/integration/src/main/resources/org/apache/mahout/cf/taste/example/grouplens >> > under the Mahout distribution directory. >> > - Navigate to the directory where you unpacked the Mahout >> distribution, >> > and navigate to trunk. >> > - Run mvn -DskipTests install, which builds and installs Mahout core >> to >> > your local repository >> > - cd integration >> > - You may need to give Maven more memory: in a bash shell, export >> > MAVEN_OPTS=-Xmx1024M >> > - mvn jetty:run. >> > - Get recommendations by accessing the web application in your >> browser: >> > >> http://localhost:8080/mahout-integration/RecommenderServlet?userID=1This >> > will produce a simple preference-item ID list which could be consumed >> > by a client application. Get more useful human-readable output with >> the >> > debug parameter: >> > >> > >> http://localhost:8080/mahout-integration/RecommenderServlet?userID=1&debug=true >> > >> > >> > Sean, do you have any link which specifies correct steps to run >> > recommendation demo? >> > >> > Thanks, >> > >> > Yugang >> > >> > On Tue, Jan 24, 2012 at 2:31 PM, Sean Owen <[email protected]> wrote: >> > >> > > Backing up a sec -- I looked, and there is not a circular dependency >> here >> > > to begin with. integration does not depend on examples. >> > > >> > > This is not a Maven build issue, or else the error would be from the >> > Maven >> > > build. You are building the example .war file and need to put your >> > > implementation .jar in a particular place such that it's built into >> the >> > > .war. In your case that's the examples .jar. I am guessing it was not >> > > actually included. This part is not something Maven does for you. >> > > >> > > On Tue, Jan 24, 2012 at 8:51 PM, Way Cool <[email protected]> >> > wrote: >> > > >> > > > Sure, because we want maven to handle dependency for us. What's your >> > fix? >> > > > Just add a dependency to pom,xml in integration project? If you do >> > that, >> > > > which project do you want to build first? Thanks for your reply >> Sean. >> > > > >> > > > On Tue, Jan 24, 2012 at 1:43 PM, Sean Owen <[email protected]> >> wrote: >> > > > >> > > > > Why is that a problem? you just need both. It works fine, just as >> any >> > > > other >> > > > > such dependency in Java works. >> > > > > >> > > > > On Tue, Jan 24, 2012 at 8:39 PM, Way Cool <[email protected] >> > >> > > > wrote: >> > > > > > >> > > > > > That's mainly because the class GroupLensRecommender is defined >> in >> > > > > examples >> > > > > > project, which depends on integration project, and integration >> > > project >> > > > is >> > > > > > trying to load the class... >> > > > > > >> > > > > > Have you guys seen the issue as well? >> > > > > > >> > > > > > Thanks, >> > > > > > >> > > > > > YG >> > > > > > >> > > > > >> > > > >> > > >> > >> > >
