RE: Lingo3g-Solr integration - ClassNotFoundException: com.google.common.base.MoreObjects

2015-07-13 Thread Mandris, Collin
Just a quick update,

The version of Lingo3G (1.12.0) does not seem compatible with the older version 
of Guava packaged with Solr. Switching to an older version of Lingo3G has 
resolved the issue.

Thanks for the help! 
Collin

Collin Mandris
Associate Engineer, Software
Defense Solutions Division
General Dynamics Information Technology
55 Dodge Road 
Buffalo, New York 14068-1205
Phone: 1-716-243-4022
Fax: (716) 691-3642
collin.mand...@gdit.com

-Original Message-
From: Shawn Heisey [mailto:apa...@elyograg.org] 
Sent: Friday, July 10, 2015 15:50
To: solr-user@lucene.apache.org
Subject: Re: Lingo3g-Solr integration - ClassNotFoundException: 
com.google.common.base.MoreObjects

On 7/10/2015 10:09 AM, Mandris, Collin wrote:
> Hello,
>
> I am trying to integrate Lingo3g with Solr. I have arrived at the error 
> ClassNotFoundException error using Lingo3g (verison 1.12.0) with Solr 4.8.0. 
> I located the guava-18.0.jar, which contains the 
> com.google.common.base.MoreObjects class, and have tried putting it in 
> multiple locations within our Solr deployment, but have had no luck in 
> getting by the error. So far, I have tried:
>
> 1)Adding Class-Path: guava-18.0.jar to the manifest file in 
> start.jar, solr.war and lingo3g-1.12.0.jar, with guava-18.0.jar copied to the 
> same folder as each respective jar file.
> 2)Putting guava-18.0.jar in the contrib\clustering\lib folder 
> with the other lingo3g jar files.
> 3)Putting guava-18.0.jar in the java jdk bin folder.

Solr already includes guava, but it's a very old version -- 14.0.1.

This means that you can't simply add a newer guava jar... but I've just tried 
upgrading Guava in the solr source code to 18.0, and Solr won't compile.

We have an unresolved issue to upgrade guava to version 15.  Somebody mentioned 
kite-morphlines as a blocker for that, but I'm not sure what the full story is. 
 I've updated the issue with a comment about this thread.

https://issues.apache.org/jira/browse/SOLR-5584

At this time, you can't use anything that depends on Guava 18.  This is a 
textbook case of "jar hell" ... we need to get guava upgraded in Solr.

https://en.wikipedia.org/wiki/Java_Classloader#JAR_hell

Thanks,
Shawn



Re: Lingo3g-Solr integration - ClassNotFoundException: com.google.common.base.MoreObjects

2015-07-10 Thread Shawn Heisey
On 7/10/2015 10:09 AM, Mandris, Collin wrote:
> Hello,
>
> I am trying to integrate Lingo3g with Solr. I have arrived at the error 
> ClassNotFoundException error using Lingo3g (verison 1.12.0) with Solr 4.8.0. 
> I located the guava-18.0.jar, which contains the 
> com.google.common.base.MoreObjects class, and have tried putting it in 
> multiple locations within our Solr deployment, but have had no luck in 
> getting by the error. So far, I have tried:
>
> 1)Adding Class-Path: guava-18.0.jar to the manifest file in 
> start.jar, solr.war and lingo3g-1.12.0.jar, with guava-18.0.jar copied to the 
> same folder as each respective jar file.
> 2)Putting guava-18.0.jar in the contrib\clustering\lib folder 
> with the other lingo3g jar files.
> 3)Putting guava-18.0.jar in the java jdk bin folder.

Solr already includes guava, but it's a very old version -- 14.0.1.

This means that you can't simply add a newer guava jar... but I've just
tried upgrading Guava in the solr source code to 18.0, and Solr won't
compile.

We have an unresolved issue to upgrade guava to version 15.  Somebody
mentioned kite-morphlines as a blocker for that, but I'm not sure what
the full story is.  I've updated the issue with a comment about this thread.

https://issues.apache.org/jira/browse/SOLR-5584

At this time, you can't use anything that depends on Guava 18.  This is
a textbook case of "jar hell" ... we need to get guava upgraded in Solr.

https://en.wikipedia.org/wiki/Java_Classloader#JAR_hell

Thanks,
Shawn



RE: Lingo3g-Solr integration - ClassNotFoundException: com.google.common.base.MoreObjects

2015-07-10 Thread Mandris, Collin
Adding the Guava jar to {instanceDir}/lib seems to have fixed Solr not loading 
it, but now I am getting another error that I cannot pin down.

The trace for this one is:
java.lang.RuntimeException: java.lang.IllegalAccessError: tried to access class 
com.carrotsearch.hppc.BitUtil from class com.carrotsearch.hppc.HashContainers 
at 
org.apache.solr.servlet.SolrDispatchFilter.sendError(SolrDispatchFilter.java:790)
 at 
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:439)
 at 
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:207)
 at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
 at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
 at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
 at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
 at 
org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
 at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) 
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) 
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) 
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) 
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) at 
java.lang.Thread.run(Thread.java:745) Caused by: java.lang.IllegalAccessError: 
tried to access class com.carrotsearch.hppc.BitUtil from class 
com.carrotsearch.hppc.HashContainers at 
com.carrotsearch.hppc.HashContainers.minBufferSize(HashContainers.java:50) at 
com.carrotsearch.hppc.CharShortHashMap.ensureCapacity(CharShortHashMap.java:660)
 at com.carrotsearch.hppc.CharShortHashMap.(CharShortHashMap.java:138) at 
com.carrotsearch.hppc.CharShortHashMap.(CharShortHashMap.java:119) at 
com.carrotsearch.hppc.CharShortHashMap.(CharShortHashMap.java:105) at 
com.carrotsearch.hppc.CharShortHashMap.(CharShortHashMap.java:94) at 
lingo3g.bx.a(Unknown Source) at lingo3g.bx.a(Unknown Source) at 
lingo3g.cq.a(Unknown Source) at lingo3g.cq.apply(Unknown Source) at 
org.carrot2.util.resource.ResourceCache.get(ResourceCache.java:74) at 
lingo3g.cp.a(Unknown Source) at lingo3g.ck.(Unknown Source) at 
lingo3g.v.a(Unknown Source) at 
com.carrotsearch.lingo3g.Lingo3GClusteringAlgorithm.a(Unknown Source) at 
com.carrotsearch.lingo3g.Lingo3GClusteringAlgorithm.a(Unknown Source) at 
com.carrotsearch.lingo3g.Lingo3GClusteringAlgorithm$1.process(Unknown Source) 
at 
org.carrot2.text.clustering.MultilingualClustering.clusterByLanguage(MultilingualClustering.java:284)
 at 
org.carrot2.text.clustering.MultilingualClustering.process(MultilingualClustering.java:163)
 at com.carrotsearch.lingo3g.Lingo3GClusteringAlgorithm.process(Unknown Source) 
at org.carrot2.core.ControllerUtils.performProcessing(ControllerUtils.java:106) 
at org.carrot2.core.Controller.process(Controller.java:357) at 
org.carrot2.core.Controller.process(Controller.java:247) at 
org.apache.solr.handler.clustering.carrot2.CarrotClusteringEngine.cluster(CarrotClusteringEngine.java:245)
 at 
org.apache.solr.handler.clustering.ClusteringComponent.process(ClusteringComponent.java:164)
 at 
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:218)
 at 
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
 at 
org.apache.solr.core.RequestHandlers$LazyRequestHandlerWrapper.handleRequest(RequestHandlers.java:241)
 at org.apache.solr.core.SolrCore.execute(SolrCore.java:1952) at 
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:774) 
at 
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:418)
 ... 14 more

Thanks again,
Collin

-Original Message-
From: Erick Erickson [mailto:erickerick...@gmail.com] 
Sent: Friday, July 10, 2015 13:30
To: solr-user@lucene.apache.org
Subject: Re: Lingo3g-Solr integration - ClassNotFoundException: 
com.google.common.base.MoreObjects

Have you tried adding another  directive to solrconfig.xml?

Best,
Erick

On Fri, Jul 10, 2015 at 9:09 AM, Mandris, Collin  
wrote:
> Hello,
>
> I am trying to integrate Lingo3g with Solr. I have arrived at the error 
> ClassNotFoundException error using Lingo3g (verison 1.12.0) with Solr 4.8.0. 
> I located the guava-18.0.jar, which contains the 
> com.google.common.base.MoreObjects class, and have tried putting it in 
> multiple locations within our Solr deployment, but have had no luck in 
> getting by the error. So far, I have tried:
>
> 1)Adding Class-Path: guava-18.0.jar to the manifest file in 
> start

Re: Lingo3g-Solr integration - ClassNotFoundException: com.google.common.base.MoreObjects

2015-07-10 Thread Erick Erickson
Have you tried adding another  directive to solrconfig.xml?

Best,
Erick

On Fri, Jul 10, 2015 at 9:09 AM, Mandris, Collin
 wrote:
> Hello,
>
> I am trying to integrate Lingo3g with Solr. I have arrived at the error 
> ClassNotFoundException error using Lingo3g (verison 1.12.0) with Solr 4.8.0. 
> I located the guava-18.0.jar, which contains the 
> com.google.common.base.MoreObjects class, and have tried putting it in 
> multiple locations within our Solr deployment, but have had no luck in 
> getting by the error. So far, I have tried:
>
> 1)Adding Class-Path: guava-18.0.jar to the manifest file in 
> start.jar, solr.war and lingo3g-1.12.0.jar, with guava-18.0.jar copied to the 
> same folder as each respective jar file.
> 2)Putting guava-18.0.jar in the contrib\clustering\lib folder 
> with the other lingo3g jar files.
> 3)Putting guava-18.0.jar in the java jdk bin folder.
>
> The stack trace I  get is:
>
> java.lang.RuntimeException: java.lang.NoClassDefFoundError: 
> com/google/common/base/MoreObjects at 
> org.apache.solr.servlet.SolrDispatchFilter.sendError(SolrDispatchFilter.java:790)
>  at 
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:439)
>  at 
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:207)
>  at 
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
>  at 
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455) at 
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) 
> at 
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557) 
> at 
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
>  at 
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
>  at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384) 
> at 
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
>  at 
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
>  at 
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) 
> at 
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
>  at 
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
>  at 
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
>  at org.eclipse.jetty.server.Server.handle(Server.java:368) at 
> org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
>  at 
> org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
>  at 
> org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942)
>  at 
> org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004)
>  at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640) at 
> org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235) at 
> org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
>  at 
> org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
>  at 
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
>  at 
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
>  at java.lang.Thread.run(Unknown Source) Caused by: 
> java.lang.NoClassDefFoundError: com/google/common/base/MoreObjects at 
> com.carrotsearch.lingo3g.impl.linguistic.model.Sequence$SequenceConverter.read(Unknown
>  Source) at 
> com.carrotsearch.lingo3g.impl.linguistic.model.Sequence$SequenceConverter.read(Unknown
>  Source) at 
> org.simpleframework.xml.convert.AnnotationStrategy.read(AnnotationStrategy.java:126)
>  at 
> org.simpleframework.xml.convert.AnnotationStrategy.read(AnnotationStrategy.java:105)
>  at 
> org.carrot2.util.simplexml.SessionInitStrategy.read(SessionInitStrategy.java:52)
>  at org.simpleframework.xml.core.Source.getOverride(Source.java:360) at 
> org.simpleframework.xml.core.Factory.getConversion(Factory.java:207) at 
> org.simpleframework.xml.core.Factory.getOverride(Factory.java:139) at 
> org.simpleframework.xml.core.ObjectFactory.getInstance(ObjectFactory.java:63) 
> at org.simpleframework.xml.core.Composite.read(Composite.java:139) at 
> org.simpleframework.xml.core.Composite.readVariable(Composite.java:623) at 
> org.simpleframework.xml.core.Composite.readInstance(Composite.java:573) at 
> org.simpleframework.xml.core.Composite.readUnion(Composite.java:549) at 
> org.simpleframework.xml.core.Composite.readElement(Composite.java:532) at 
> org.simpleframework.xml.core.Composite.readElements(Composite.java:445) at 
> org.simpleframework.xml.core.Composite.access$400(Composite.java:59) at 
> org.simpleframework.xml.core.Composite$B