| Trying to create an Apache Solr data store in GeoServer UI will probably result in this exception: Caused by: java.lang.NoClassDefFoundError: org/apache/solr/client/solrj/SolrClient at org.geotools.data.solr.SolrDataStoreFactory.createDataStore(SolrDataStoreFactory.java:85) at org.geotools.data.solr.SolrDataStoreFactory.createDataStore(SolrDataStoreFactory.java:37) at org.vfny.geoserver.util.DataStoreUtils.getDataAccess(DataStoreUtils.java:90) This happens because two different versions of solr-solrj coexist in GeoSever: ~+- org.geoserver.community:gs-web-solr:jar:2.13-SNAPSHOT:compile [INFO] | +- (org.geoserver:gs-main:jar:2.13-SNAPSHOT:compile - omitted for duplicate) [INFO] | +- (org.geoserver.web:gs-web-core:jar:2.13-SNAPSHOT:compile - omitted for duplicate) [INFO] | +- (org.geotools:gt-api:jar:19-SNAPSHOT:compile - omitted for duplicate) [INFO] | +- org.geotools:gt-solr:jar:19-SNAPSHOT:compile [INFO] | | +- (commons-beanutils:commons-beanutils:jar:noclassprop:1.9.2:compile - omitted for duplicate) [INFO] | | +- (org.geotools:gt-data:jar:19-SNAPSHOT:compile - omitted for duplicate) [INFO] | | +- (org.apache.solr:solr-solrj:jar:5.2.1:compile - omitted for conflict with 4.9.0) [INFO] | | +- (commons-lang:commons-lang:jar:2.6:compile - version managed from 2.4; omitted for duplicate) [INFO] | | - (javax.media:jai_core:jar:1.1.3:compile - omitted for duplicate) [INFO] | +- org.apache.solr:solr-solrj:jar:4.9.0:compile~ Depending on which one selected by GeoServer we may get the exception above. As part of this fix SolarJ client may also be update to the last stable Solr release which is 7.x. Note that SolarJ is backward compatible with older versions so there should be any issue in upgrading the client. |