mahout-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Owen <sro...@gmail.com>
Subject Re: java.lang.NullPointerException when using mysql
Date Tue, 27 Mar 2012 08:13:00 GMT
Make sure you use the latest MySQL driver. Are you sure that one of
your columns is not NULL?

On Tue, Mar 27, 2012 at 6:42 AM, 344911009 <mudaoming@vip.qq.com> wrote:
> windows XP 2G
>  runing MovieSite ,use mysql-connector-java-5.1.13-bin.jar,  userID and movieID are
INTEGER ,but still has errors :java.lang.NullPointerException
>  anyone know how to solve it ?   thanks!
>  2012-3-26 16:31:11 org.apache.catalina.core.StandardWrapperValve invoke
> 严重: Servlet.service() for servlet [movie-recommender] in context with path [/MovieSite]
threw exception
>  java.lang.NullPointerException
>  at com.mysql.jdbc.ResultSetImpl.getLong(ResultSetImpl.java:2843)
>  at com.mysql.jdbc.ResultSetImpl.getLong(ResultSetImpl.java:2830)
>  at org.apache.tomcat.dbcp.dbcp.DelegatingResultSet.getLong(DelegatingResultSet.java:228)
>  at org.apache.tomcat.dbcp.dbcp.DelegatingResultSet.getLong(DelegatingResultSet.java:228)
>  at org.apache.mahout.cf.taste.impl.model.jdbc.AbstractJDBCDataModel.getLongColumn(AbstractJDBCDataModel.java:602)
>  at org.apache.mahout.cf.taste.impl.model.jdbc.AbstractJDBCDataModel$ResultSetIDIterator.nextLong(AbstractJDBCDataModel.java:677)
>  at org.apache.mahout.cf.taste.impl.model.jdbc.AbstractJDBCDataModel$ResultSetIDIterator.next(AbstractJDBCDataModel.java:666)
>  at org.apache.mahout.cf.taste.impl.model.jdbc.AbstractJDBCDataModel$ResultSetIDIterator.next(AbstractJDBCDataModel.java:621)
>  at org.apache.mahout.cf.taste.impl.recommender.TopItems.getTopUsers(TopItems.java:82)
>  at org.apache.mahout.cf.taste.impl.neighborhood.NearestNUserNeighborhood.getUserNeighborhood(NearestNUserNeighborhood.java:100)
>  at org.apache.mahout.cf.taste.impl.recommender.GenericUserBasedRecommender.recommend(GenericUserBasedRecommender.java:80)
>  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 com.ibm.taste.example.movie.recommender.UserBasedRecommender.recommend(UserBasedRecommender.java:53)
>  at com.ibm.taste.example.movie.servlet.MovieRecommenderServlet.doGet(MovieRecommenderServlet.java:81)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
>  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
>  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
>  at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:498)
>  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
>  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
>  at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
>  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
>  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:394)
>  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243)
>  at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
>  at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:166)
>  at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
>  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
>  at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>  at java.lang.Thread.run(Unknown Source)

Mime
View raw message