Solr 4 spatial class not found com/vividsolutions/jts/geom/Geometry - solr

I'm running Solr 4.2.1 but I have the exception in my log file NoClassDefFoundError: com/vividsolutions/jts/geom/Geometry. I've checked similar questions, like How to install JTS in Solr 4? but that didn't solve the problem.
Listing the content of the solr.war I have the jts library in the correct path
WEB-INF/lib/jts-1.8.jar
Yet that doesn't solve my problem. Am I missing something?

You need to add also:
lib\jtsio-1.x.jar
lib\jdom.jar
lib\acme.jar

Related

Error instantiating class: 'org.apache.lucene.analysis.en.KStemFilterFactory

My solrconfig.xml worked fine in SOLR 4.1 but when I upgraded SOLR to 4.5.1, I started getting the following error:
Error instantiating class: 'org.apache.lucene.analysis.en.KStemFilterFactory'
Any idea what went wrong? I can still see the same class exists in 4.5.1 so I have no clue.
you need lucene-analyzers-common-4.5.1.jar in the relevant folder (as given by sharedLib="lib" in solr.xml if you are using that) or otherwise explicitly include it in solrconfig.xml

CakePHP searching for DebugKit at wrong path

I am trying to import DebugKit and CakePHP is producing the following error: DebugKit.ToolbarComponent could not be found.
Right below it, it says:
Create the class ToolbarComponent below in file:
/Users/SomeUser/Sites/SomeProject/app/Plugin/DebugKit//Controller/Component/ToolbarComponent.php
If you notice though, there are two slashes between DebugKit and Controller for some reason, and that's obviously not a real directory. The server running PHP 5.4.17. I have followed the exact installation instructions listed here. Any suggestions?
I had the same problem and solved it by changing the permissions to 755 to folders within DebugKit.
When I encountered this problem, I realized I had a Plugin/DebugKit folder structure in my project's root, and under the app directory. The one under app was empty, save for a blank file called empty. Strange. I have no idea how this happened. (Perhaps from accidentally running composer as non-root?) I deleted app/Plugin/DebugKit, and moved the one from the project root into app. No more error.
DebugKit does not currently seem to be compatible with cakephp 3.0 even though it is the example in the documentation.
The latest version still seems to use the 2.x methods.
I will also submit a ticket regarding this to update their documentation to prevent confusion.
If there is something I missed regarding this issue and it is actually possible to install this, let me know.

GAE: java.lang.NoSuchMethodError: com.google.api.client.json.GenericJson.set

Starting from June, 12 my app that is used DriveAPI faced the following error (it's shown in GAE server log):
java.lang.NoSuchMethodError: com.google.api.client.json.GenericJson.set(Ljava/lang/String;Ljava/lang/Object;)Lcom/google/api/client/json/GenericJson;
at com.google.api.client.googleapis.auth.oauth2.GoogleClientSecrets$Details.set(GoogleClientSecrets.java:166)
at com.google.api.client.googleapis.auth.oauth2.GoogleClientSecrets$Details.set(GoogleClientSecrets.java:87)
at com.google.api.client.json.JsonParser.parse(JsonParser.java:357)
at com.google.api.client.json.JsonParser.parseValue(JsonParser.java:586)
at com.google.api.client.json.JsonParser.parse(JsonParser.java:350)
at com.google.api.client.json.JsonParser.parseValue(JsonParser.java:586)
at com.google.api.client.json.JsonParser.parse(JsonParser.java:289)
at com.google.api.client.json.JsonParser.parse(JsonParser.java:266)
at com.google.api.client.json.JsonParser.parseAndClose(JsonParser.java:141)
at com.google.api.client.json.JsonFactory.fromInputStream(JsonFactory.java:223)
at com.google.api.client.googleapis.auth.oauth2.GoogleClientSecrets.load(GoogleClientSecrets.java:195)
at finbudget.server.handlers.lists.cronimport.AutoImportBackend.doImport(AutoImportBackend.java:112)
at finbudget.server.handlers.lists.cronimport.AutoImportBackend.doPost(AutoImportBackend.java:76)
......
It seems like this problem comes with 1.8.1 version of AppEngine release. Before it worked well... Did someone have the same problem? And what could be the solution for this?
It's a classpath collision.
If war/WEB-INF/lib contains multiple versions of the DriveAPI jars, strange issues may result from the wrong version loading during runtime. Removing outdated jars solves the problem.
(Note: I copied and formatted the answer that the original asker added to the question via an edit. I did this as a cleanup task.)

SolrJ HttpSolrServer throwing NoHttpResponseException during instantiation

SolrJ is throwing NoHttpResponseException when trying to instantiate HttpSolrServer. Anyone knows why?
In the code I do:
SolrServer server = new HttpSolrServer ("http://localhost:8983/solr/"); // or some other url.
and it throws:
javax.servlet.ServletException: java.lang.NoClassDefFoundError: org/apache/http/NoHttpResponseException
I'm using Solr and SolrJ 4.1.0
I dont know if your problem was the same as mine but i thought that i'm getting the same exception until i noticed that i'm having the exception noClassFound :NoHttpResponseException and just by adding this package httpclient-4.1.3 the issue was solved.
hope this helps.
I had the same problem, but I used solrj-4.3.1. You need org.apache.httpcomponents:httpcore jar on your classpath to resolve this problem.
I used httpcore-4.2.5.jar
My problem wasn't even solved after adding httpclient-4.x.x. I added all the libraries being distrubuted by solr-4.4.0 , dist folder. After that my problem got resolved.
you problem was the same as mine. i solved the problem by adding the package httpclient-.jar and the package httpcore-.jar. i hope this help for you
I to had same problem but after adding the following 3 jars I was able to fix it.
1. httpclient
2. httpcore
3. httpmime
And these suitable jars provided in your respective solr framework.
Example I am using solr4.7.2 and these jars are present in folder as solr-4.7.2\dist\solrj-lib\

Extracting .docx files with Tika in Apache Solr gives NoSuchMethod error

I have a Solr 4.0 module in my project (basically, a maven web project with all the solr dependencies). It worked pretty well, including content extraction and everything.
But, when I tested it with a .docx document, It gives me the following error:
13:50:34,468 ERROR [org.apache.solr.servlet.SolrDispatchFilter] (http--0.0.0.0-8080-9)
null:java.lang.RuntimeException: java.lang.NoSuchMethodError:
org.apache.poi.openxml4j.opc.PackagePart.getRelatedPart(Lorg/apache/poi/openxml4j/opc/PackageRelationship;)
Lorg/apache/poi/openxml4j/opc/PackagePart;
I tried to manually add the openxml4j dependency to the project. I've downloaded the sources and looked at it, the PackagePart#getRelatedPart really doesn't exist.
What is this error? How can I fix this?
Thanks in advance.
EDIT
I noticed that poi-ooxml already had those classes inside it. Cool, but I also inspected those sources, and still doesn't have the needed method in the PackagePart class.
BTW: I tried to add openxml4j version 1.0-beta.
It was a jarhell related issue.
Thanks, "jarhell related" was the clue I needed!
My project had POI jars prior to import of the Tika app jar, which includes its own POI jars. I deleted the standalone POI jars, and then Tika was able to handle DOCX Word 2013 file without error.
Now hopefully I won't run into a situation where I need both! :|

Resources