You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mahout.apache.org by michal shmueli <mi...@gmail.com> on 2009/11/17 20:20:58 UTC

RecommenderServlet HTTP 500

Hi,

I'm running the RecommenderServlet on my machine and I sending requests for
different users id.
For example:
http://michal:57000/RecommenderServlet?userID=010232120.

It usually works, and I'm getting recommendations. However, for some userids
(which exists on the file), I'm getting this error:

HTTP ERROR 500

Problem accessing /RecommenderServlet. Reason:

    Server Error

Caused by:

java.lang.IllegalArgumentException
	at java.util.PriorityQueue.<init>(PriorityQueue.java:135)
	at org.apache.mahout.cf.taste.impl.recommender.TopItems.getTopItems(TopItems.java:48)
	at org.apache.mahout.cf.taste.impl.recommender.GenericUserBasedRecommender.recommend(GenericUserBasedRecommender.java:90)
	at org.apache.mahout.cf.taste.impl.recommender.AbstractRecommender.recommend(AbstractRecommender.java:52)
	at org.apache.mahout.cf.taste.impl.recommender.CachingRecommender$RecommendationRetriever.get(CachingRecommender.java:190)
	at org.apache.mahout.cf.taste.impl.recommender.CachingRecommender$RecommendationRetriever.get(CachingRecommender.java:177)
	at org.apache.mahout.cf.taste.impl.common.Cache.getAndCacheValue(Cache.java:101)
	at org.apache.mahout.cf.taste.impl.common.Cache.get(Cache.java:77)
	at org.apache.mahout.cf.taste.impl.recommender.CachingRecommender.recommend(CachingRecommender.java:114)
	at org.apache.mahout.cf.taste.impl.recommender.CachingRecommender.recommend(CachingRecommender.java:96)
	at org.apache.mahout.cf.taste.example.grouplens.GroupLensRecommender.recommend(GroupLensRecommender.java:85)
	at org.apache.mahout.cf.taste.web.RecommenderServlet.doGet(RecommenderServlet.java:99)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:530)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:426)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:118)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:495)
	at org.eclipse.jetty.server.session.SessionHandler.handle(SessionHandler.java:179)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:930)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:361)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:864)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:116)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:243)
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:112)
	at org.eclipse.jetty.server.Server.handle(Server.java:337)
	at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:552)
	at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:979)
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:533)
	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:203)
	at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:399)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:437)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:435)
	at java.lang.Thread.run(Thread.java:619)


any idea?

thanks,
Michal

Re: RecommenderServlet HTTP 500

Posted by Sean Owen <sr...@gmail.com>.
I sure sounds like a bug but I don't see how this is happening, from
inspecting the code. The 'howMany' argument is never allowed to be
less than 1, throughout the framework, as far as I can tell, and the
argument to PriorityQueue is "howMany + 1", and it's failing because
that value is <= 0?

Since you've got the data to reproduce, any chance you are in a
position to attach a debugger and try to see more? maybe put a
breakpoint at that line in PriorityQueue, and when it occurs, take a
look back up the stack and see where the bad howMany value came from.

On Wed, Nov 18, 2009 at 8:45 AM, michal shmueli
<mi...@gmail.com> wrote:
> Hi Sean,
>
> I update the code from the SVN (and I belive it's now version 0.3).
> Still the same exception for some users, and works ok for other users.
>
> any other suggestions?
>
> thanks,
> Michal
>
> On Tue, Nov 17, 2009 at 11:02 PM, Sean Owen <sr...@gmail.com> wrote:
>
>> Sounds like a bug, but reminds me of something I think I fixed a while
>> ago. Are you using the latest code, meaning post-0.1? If you're using
>> 0.1 then I am pretty sure this is fixed -- at least I can't see how
>> this happens in the current code.
>>
>> On Tue, Nov 17, 2009 at 7:20 PM, michal shmueli
>> <mi...@gmail.com> wrote:
>> > Hi,
>> >
>> > I'm running the RecommenderServlet on my machine and I sending requests
>> for
>> > different users id.
>> > For example:
>> > http://michal:57000/RecommenderServlet?userID=010232120.
>> >
>>
>

Re: RecommenderServlet HTTP 500

Posted by michal shmueli <mi...@gmail.com>.
Hi Sean,

I update the code from the SVN (and I belive it's now version 0.3).
Still the same exception for some users, and works ok for other users.

any other suggestions?

thanks,
Michal

On Tue, Nov 17, 2009 at 11:02 PM, Sean Owen <sr...@gmail.com> wrote:

> Sounds like a bug, but reminds me of something I think I fixed a while
> ago. Are you using the latest code, meaning post-0.1? If you're using
> 0.1 then I am pretty sure this is fixed -- at least I can't see how
> this happens in the current code.
>
> On Tue, Nov 17, 2009 at 7:20 PM, michal shmueli
> <mi...@gmail.com> wrote:
> > Hi,
> >
> > I'm running the RecommenderServlet on my machine and I sending requests
> for
> > different users id.
> > For example:
> > http://michal:57000/RecommenderServlet?userID=010232120.
> >
>

Re: RecommenderServlet HTTP 500

Posted by Sean Owen <sr...@gmail.com>.
Sounds like a bug, but reminds me of something I think I fixed a while
ago. Are you using the latest code, meaning post-0.1? If you're using
0.1 then I am pretty sure this is fixed -- at least I can't see how
this happens in the current code.

On Tue, Nov 17, 2009 at 7:20 PM, michal shmueli
<mi...@gmail.com> wrote:
> Hi,
>
> I'm running the RecommenderServlet on my machine and I sending requests for
> different users id.
> For example:
> http://michal:57000/RecommenderServlet?userID=010232120.
>