Skip to content

Commit b24d553

Browse files
authored
Merge pull request #189 from ngageoint/solr-jts-optional
Issue 133: Mark JTS as optional dependency in janusgraph-solr
2 parents 9f1d992 + 45403d0 commit b24d553

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

docs/solr.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,10 +223,10 @@ org.apache.solr.common.SolrException: com/vividsolutions/jts/geom/Geometry
223223
...
224224
----
225225

226-
This is resolved by adding the JTS jar to the classpath of the Solr server. In many cases, if using a version of Solr that matches the version of Solr supported by JanusGraph, the JTS jar file, for example: jts-1.13.jar, may be copied from the JanusGraph ./lib directory to the Solr classpath. If using Solr's built in web server, the JTS jar may be copied to the example/solr-webapp/webapp/WEB-INF/lib directory to include it in the classpath. Solr can be restarted, and the exception should be gone. Solr must be started once with the correct schema.xml file in place first, for the example/solr-webapp/webapp/WEB-INF/lib directory to exist.
226+
This is resolved by adding the JTS jar to the classpath of JanusGraph and/or the Solr server. JTS is not included in JanusGraph distributions by default due to its LGPL license. Users must download the http://search.maven.org/remotecontent?filepath=com/vividsolutions/jts/1.13/jts-1.13.jar[JTS jar file] separately and copy it into the JanusGraph and/or Solr server lib directory. If using Solr's built in web server, the JTS jar may be copied to the example/solr-webapp/webapp/WEB-INF/lib directory to include it in the classpath. Solr can be restarted, and the exception should be gone. Solr must be started once with the correct schema.xml file in place first, for the example/solr-webapp/webapp/WEB-INF/lib directory to exist.
227227

228-
To determine the ideal JTS version, first check the version of Spatial4j in use by the Solr cluster, then determine the version of JTS against which that Spatial4j version was compiled. Spatial4j declares its target JTS version in the http://search.maven.org/#search|gav|1|g%3A%22com.spatial4j%22%20AND%20a%3A%22spatial4j%22[pom for the `com.spatial4j:spatial4j` artifact].
229-
Copy the jts jar to the server/solr-webapp/webapp/WEB-INF/lib directory in your solr installation.
228+
To determine the ideal JTS version for Solr server, first check the version of Spatial4j in use by the Solr cluster, then determine the version of JTS against which that Spatial4j version was compiled. Spatial4j declares its target JTS version in the http://search.maven.org/#search|gav|1|g%3A%22com.spatial4j%22%20AND%20a%3A%22spatial4j%22[pom for the `com.spatial4j:spatial4j` artifact].
229+
Copy the JTS jar to the server/solr-webapp/webapp/WEB-INF/lib directory in your solr installation.
230230

231231
=== Advanced Solr Configuration
232232

janusgraph-solr/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@
9191
<groupId>com.vividsolutions</groupId>
9292
<artifactId>jts</artifactId>
9393
<version>1.13</version>
94+
<optional>true</optional>
9495
</dependency>
9596
<!-- Logging backends.
9697
Enforce a classpath ordering constraint to ensure slf4j-log4j12

0 commit comments

Comments
 (0)