java.lang.RuntimeException

java.lang.NoClassDefFoundError: com/google/common/base/MoreObjects

Samebug tips8

A few things cause this exception: 1) Check if you have all jars and if they're in the correct path when running. 2) Your classpath might be broken, you can define it in the command line with "java -cp yourClassPath" or at your IDE if you're using one.

If you're using Hibernate, this indicates you're missing FasterXML Classmate dependency, which you can add to your dependencies. To add it, the groupId is com.fasterxml and artifactId is Classmate.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web1372

  • via Apache's JIRA Issue Tracker by Kevin Risden, 1 year ago
    java.lang.NoClassDefFoundError: com/google/common/base/MoreObjects
  • via Apache's JIRA Issue Tracker by Kevin Risden, 10 months ago
    java.lang.NoClassDefFoundError: com/google/common/base/MoreObjects
  • java.lang.NoClassDefFoundError: com/google/common/collect/Multimap
  • Stack trace

    • java.lang.RuntimeException: java.lang.NoClassDefFoundError: com/google/common/base/MoreObjects at org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:602) at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:472) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:229) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:184) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1158) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1090) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:109) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:119) at org.eclipse.jetty.server.Server.handle(Server.java:517) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:308) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:242) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:261) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95) at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:75) at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:213) at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:147) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NoClassDefFoundError: com/google/common/base/MoreObjects at com.facebook.presto.sql.tree.TableSubquery.toString(TableSubquery.java:42) at java.lang.String.valueOf(String.java:2994) at java.lang.StringBuilder.append(StringBuilder.java:131) at org.apache.solr.handler.SQLHandler$SQLVisitor.visitNode(SQLHandler.java:949) at org.apache.solr.handler.SQLHandler$SQLVisitor.visitNode(SQLHandler.java:929) at com.facebook.presto.sql.tree.AstVisitor.visitRelation(AstVisitor.java:177) at com.facebook.presto.sql.tree.AstVisitor.visitQueryBody(AstVisitor.java:182) at com.facebook.presto.sql.tree.AstVisitor.visitTableSubquery(AstVisitor.java:372) at com.facebook.presto.sql.tree.TableSubquery.accept(TableSubquery.java:36) at com.facebook.presto.sql.tree.AstVisitor.process(AstVisitor.java:22) at org.apache.solr.handler.SQLHandler$SQLVisitor.visitAliasedRelation(SQLHandler.java:1131) at org.apache.solr.handler.SQLHandler$SQLVisitor.visitAliasedRelation(SQLHandler.java:929) at com.facebook.presto.sql.tree.AliasedRelation.accept(AliasedRelation.java:56) at com.facebook.presto.sql.tree.AstVisitor.process(AstVisitor.java:22) at org.apache.solr.handler.SQLHandler$SQLVisitor.visitQuerySpecification(SQLHandler.java:1013) at org.apache.solr.handler.SQLHandler$SQLVisitor.visitQuerySpecification(SQLHandler.java:929) at com.facebook.presto.sql.tree.QuerySpecification.accept(QuerySpecification.java:98) at com.facebook.presto.sql.tree.AstVisitor.process(AstVisitor.java:22) at org.apache.solr.handler.SQLHandler$SQLVisitor.processRelation(SQLHandler.java:1149) at org.apache.solr.handler.SQLHandler$SQLVisitor.visitQuery(SQLHandler.java:995) at org.apache.solr.handler.SQLHandler$SQLVisitor.visitQuery(SQLHandler.java:929) at com.facebook.presto.sql.tree.Query.accept(Query.java:80) at com.facebook.presto.sql.tree.AstVisitor.process(AstVisitor.java:22) at org.apache.solr.handler.SQLHandler$SQLTupleStreamParser.parse(SQLHandler.java:163) at org.apache.solr.handler.SQLHandler.handleRequestBody(SQLHandler.java:118) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:155) at org.apache.solr.core.SolrCore.execute(SolrCore.java:2036) at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:649) at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:457) ... 26 more Caused by: java.lang.ClassNotFoundException: com.google.common.base.MoreObjects at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:487) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:428) ... 55 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    Once, 11 months ago
    Unknown user
    Once, 10 months ago
    Unknown user
    Once, 10 months ago
    Unknown user
    Once, 11 months ago
    Unknown user
    Once, 1 year ago
    2420 more bugmates