Mimetype exception while running standalone solr

Hello,

I have an exception when I try to run xwiki with remote solr. What I did is running solr 8.8.1 with xwiki 12.10.4

./solr start -p 8984 -force

root@xwiki:/opt/solr-8.8.1/bin# ./solr status

Found 1 Solr nodes:

Solr process 681 running on port 8984
{
  "solr_home":"/var/solr/data",
  "version":"8.8.1 64f3b496bfee762a9d2dbff40700f457f4464dfe - tjp - 2021-02-16 15:52:02",
  "startTime":"2021-03-09T23:15:38.877Z",
  "uptime":"0 days, 0 hours, 17 minutes, 2 seconds",
  "memory":"61.5 MB (%12) of 512 MB"}

In my xwiki.properties I put

solr.type=remote
solr.remote.baseURL=http://localhost:8984/solr

And on xwiki tomcat start I got this error. Do you have any idea og what I’m doing wrong ? thanks

Also in my solr/server/lib I have

root@xwiki:/opt/solr/server/lib# ls -lat
-rw-r--r--  1 root root  17019 Mar  9 18:35 xwiki-platform-search-solr-server-plugin-12.2.jar
-rw-r--r--  1 root root 145814 Mar  9 18:35 xwiki-platform-search-solr-server-data-12.2.jar

2021-03-10 00:29:00,507 [main] ERROR o.x.s.s.i.RemoteSolr - Failed to create the Solr client for core with name [events]
org.xwiki.search.solr.SolrException: Failed to get the list of field types
at org.xwiki.search.solr.AbstractSolrCoreInitializer.getFieldTypes(AbstractSolrCoreInitializer.java:166)
at org.xwiki.search.solr.AbstractSolrCoreInitializer.getFieldType(AbstractSolrCoreInitializer.java:403)
at org.xwiki.search.solr.AbstractSolrCoreInitializer.getVersion(AbstractSolrCoreInitializer.java:390)
at org.xwiki.search.solr.AbstractSolrCoreInitializer.getCurrentXWikiVersion(AbstractSolrCoreInitializer.java:366)
at org.xwiki.search.solr.AbstractSolrCoreInitializer.initializeBaseSchema(AbstractSolrCoreInitializer.java:201)
at org.xwiki.search.solr.AbstractSolrCoreInitializer.initialize(AbstractSolrCoreInitializer.java:150)
at org.xwiki.search.solr.internal.AbstractSolr.getSynchronizedClient(AbstractSolr.java:95)
at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
at org.xwiki.search.solr.internal.AbstractSolr.getClient(AbstractSolr.java:71)
at org.xwiki.search.solr.internal.DefaultSolr.getClient(DefaultSolr.java:67)
at org.xwiki.eventstream.store.solr.internal.SolrEventStore.initialize(SolrEventStore.java:154)
at org.xwiki.component.embed.InitializableLifecycleHandler.handle(InitializableLifecycleHandler.java:39)
at org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:365)
at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
at org.xwiki.eventstream.internal.DefaultEventStore.initialize(DefaultEventStore.java:99)
at org.xwiki.component.embed.InitializableLifecycleHandler.handle(InitializableLifecycleHandler.java:39)
at org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:365)
at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
at org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
at org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
at org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
at org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
at org.xwiki.component.embed.EmbeddableComponentManager.getInstanceMap(EmbeddableComponentManager.java:242)
at org.xwiki.component.embed.EmbeddableComponentManager.getInstanceList(EmbeddableComponentManager.java:225)
at org.xwiki.observation.internal.DefaultObservationManager.initializeListeners(DefaultObservationManager.java:166)
at org.xwiki.observation.internal.DefaultObservationManager.getListenersByEvent(DefaultObservationManager.java:132)
at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:283)
at org.xwiki.component.internal.StackingComponentEventManager.sendEvent(StackingComponentEventManager.java:151)
at org.xwiki.component.internal.StackingComponentEventManager.flushEvents(StackingComponentEventManager.java:92)
at org.xwiki.container.servlet.XWikiServletContextListener.contextInitialized(XWikiServletContextListener.java:124)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4643)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5109)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:703)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1141)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1876)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1053)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:428)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1585)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:308)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:424)
at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:367)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:969)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1429)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:944)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:261)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.startup.Catalina.start(Catalina.java:682)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)
Caused by: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://localhost:8984/solr/xwiki_events: Expected mime type application/octet-stream but got text/html.

Could you paste a more complete error ? It’s not clear here what leaded to use the URL http://localhost:8984/solr/xwiki_events. This is the root URL of the Solr REST API for the xwiki_events core, but it does not itself return anything, so I’m wondering how Solr ended up calling that.

Thanks for answering.

Sure, this is attached the full trace from the very beginning of the tomcat start but I’m not sure it will be helpfull, there is an additional info in the html part

Caused by: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://localhost:8984/solr/xwiki_extension_index: Expected mime type application/octet-stream but got text/html.

maybe missconfigured something in the xwiki.properties ?

I have been creating a solr core named xwiki, I don’t know if it’s suppose to be done automatically by XWiki on start

so my config on xwiki 12.10.4 is correct right ? I use the default core configuration I guess it’s concatanating it to the base URL

solr.type=remote
solr.remote.baseURL=http://localhost:8984/solr/
# solr.remote.corePrefix=xwiki

Also I commented this line since I’m not using embedded anymore
#solr.embedded.home=/data/xwiki/solr

And finally there is not suitable 12.10.X version for

root@xwiki:/opt/solr/server/lib# ls -lat
-rw-r--r--  1 root root  17019 Mar  9 18:35 xwiki-platform-search-solr-server-plugin-12.2.jar
-rw-r--r--  1 root root 145814 Mar  9 18:35 xwiki-platform-search-solr-server-data-12.2.jar

So i’m using 12.2 but I don’t think it’s an issue ? And by the way did I put theses jar in the right place and it is usefull ?

Because in your guide you said

You can download a pre-configured xwiki core on Index of /releases/org/xwiki/platform/xwiki-platform-search-solr-server-data (it’s usually better to synchronize it with your version of XWiki), unzip it along with other Solr cores. There is also a xwiki-solr-data Debian package available (see http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationViaAPT for more details about the Debian repository).

But I’m not sure I made a good usage of it

This is how look my solr interface, so it s running and the core xwiki is present, I created this core manually with ./solr create_core -c xwiki. but I tried first time without creating it hoping xwiki was doing it but I got the same error on start

xwiki_start_error.txt (27.4 KB)

As I said this URL is right as base URL of the REST API to access this core. The problem is the fact that this URL is used directly instead of a base URL for some reason.

If that’s the only core you created then that’s probably the reason: XWiki uses more than one core now (and unfortunately the Solr REST API is too limited to properly create them…). If you are on a Debian based system you should take a look at https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Installation/InstallationViaAPT/#HStandaloneSolrsetup. I’m currently improving a bit the manual installation instruction which is outdated right now.

Our VM is on ubunto 16.04

Indeed I probably missed this part, I don’t have any XWiki schema configuration.

Then you will need to add the XWiki schema configuration:

    since 12.6 you should install the package xwiki-solr-all to automatically register the Solr cores needed by XWiki Standard in the Solr server (provided the standard setup was used)

I tried to add this xwiki-platform-distribution-debian-solr-all-12.10.4-sources.jar to my /opt/solr/server/lib folder but it doesn’t change things. Not even sure it’s here that I have to put it, but I’m not using debian anyway so probably few chances that it works.

Is there somehwere some documentation on how to create the right XWiki solr schema in my remote solr server ?

Thanks for improving the manual installation it will help.

Btw fyi when I try to access XWiki despite the fail at server start I got this error which is probably the same error of missing xwiki schema/core in my solr instance

Caused by: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://localhost:8984/solr/xwiki: can not sort on multivalued field: wiki of type: text_general
at org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:665)
at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:265)
at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:248)
at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:211)
at org.apache.solr.client.solrj.SolrClient.query(SolrClient.java:1003)
at org.apache.solr.client.solrj.SolrClient.query(SolrClient.java:1018)
at org.xwiki.search.solr.internal.AbstractSolrInstance.query(AbstractSolrInstance.java:124)
at org.xwiki.search.solr.internal.job.SolrDocumentIterator.getResults(SolrDocumentIterator.java:121)
… 9 common frames omitted

xwiki-solr-all is a Debian package to install. Remember this whole page is related to how to do things through Debian packages.

That one seems different actually. The error suggests that the type of the field wiki is wrong in the schema (text_general when it’s supposed to be string) but it looks right in https://maven.xwiki.org/releases/org/xwiki/platform/xwiki-platform-search-solr-server-core/12.10.4/xwiki-platform-search-solr-server-core-12.10.4.jar (managed-schema file).

Yes I saw it’s for debian but honestly I don’t have a clue how to setup a proper standalone solr instance for XWiki on ubuntu so I tried :smiley:

So far I just follow what said the documentation wich seems limited to run a solr instance and configure the xwiki.properties.

Could you when you will have some time update the documentation to explain how to properly setup an empty instance of solr for XWiki ? I don’t know if there is a way to export the scema of solr for an empty wiki ? It could help. Maybe there is a way to see how works the embedded one so I can try to reproduce the schema ?

Thanks :+1:

Not sure I understand. The manual document at https://extensions.xwiki.org/xwiki/bin/view/Extension/Solr%20Search%20API#HManualinstall that I updated does indicate you the names of the cores to create and which data to put in it. But again on a Debian based system like yours all it takes (once you installed Solr itself) is to install the “xwiki-solr-all” package, and it will register all the cores in the right place and with the right data.

Thanks I didn’t see this update.

So I have a new error because I think I’m using https://maven.xwiki.org/releases/org/xwiki/platform/xwiki-platform-search-solr-server-core/12.10.4/ in a wrong way. There is only a .jar file in this one not a zip like the minimal config. Should I put it somewhere in the tomcat which run XWiki ? Or in the solr lib folder ? Or should I unzip it to the core folder of my solr core directory ?

What I did so is to unzip it and move the configuration to /var/solr/data/xwiki also I edited core.properties to put name name=xwiki

For the other core with the minimal zip I also unzip them in their respective folder in /var/solr/data/{name} and also puttin the name in core.properties

This is how look the tree of my solr lib server

root@xwiki:/opt/solr/server/lib# tree
.
|-- ext
|   |-- disruptor-3.4.2.jar
|   |-- jcl-over-slf4j-1.7.24.jar
|   |-- jul-to-slf4j-1.7.24.jar
|   |--etc.
|-- http2-common-9.4.34.v20201102.jar
|-- http2-hpack-9.4.34.v20201102.jar
|-- http2-server-9.4.34.v20201102.jar
|-- javax.servlet-api-3.1.0.jar
|--etc.
|-- xwiki-platform-search-solr-server-core-12.10.4.jar
`-- xwiki-platform-search-solr-server-plugin-12.10.4.jar

Is it correct to put these jar here ?

And this is the tree of my /var/solr/data folder, reminder I extract the config from the jar directly here in xwiki folder, maybe I should not have do that

root@xwiki:/var/solr/data# tree
.
|-- filestore
|-- solr.xml
|-- userfiles
|-- xwiki
|   |-- conf
|   |   |-- currency.xml
|   |   |-- elevate.xml
|   |   |-- lang
|   |   |   |-- contractions_ca.txt
|   |   |   |-- contractions_fr.txt
|   |   |   |-- contractions_ga.txt
|   |   |   |-- contractions_it.txt
|   |   |   |-- hyphenations_ga.txt
|   |   |   |-- stemdict_nl.txt
|   |   |   |-- stoptags_ja.txt
|   |   |   |-- stopwords_ar.txt
|   |   |   |-- stopwords_bg.txt
|   |   |   |-- stopwords_ca.txt
|   |   |   |-- stopwords_ckb.txt
|   |   |   |-- stopwords_cz.txt
|   |   |   |-- stopwords_da.txt
|   |   |   |-- stopwords_de.txt
|   |   |   |-- stopwords_el.txt
|   |   |   |-- stopwords_en.txt
|   |   |   |-- stopwords_es.txt
|   |   |   |-- stopwords_eu.txt
|   |   |   |-- stopwords_fa.txt
|   |   |   |-- stopwords_fi.txt
|   |   |   |-- stopwords_fr.txt
|   |   |   |-- stopwords_ga.txt
|   |   |   |-- stopwords_gl.txt
|   |   |   |-- stopwords_hi.txt
|   |   |   |-- stopwords_hu.txt
|   |   |   |-- stopwords_hy.txt
|   |   |   |-- stopwords_id.txt
|   |   |   |-- stopwords_it.txt
|   |   |   |-- stopwords_ja.txt
|   |   |   |-- stopwords_lv.txt
|   |   |   |-- stopwords_nl.txt
|   |   |   |-- stopwords_no.txt
|   |   |   |-- stopwords_pt_BR.txt
|   |   |   |-- stopwords_pt.txt
|   |   |   |-- stopwords_ro.txt
|   |   |   |-- stopwords_ru.txt
|   |   |   |-- stopwords_sk.txt
|   |   |   |-- stopwords_sv.txt
|   |   |   |-- stopwords_th.txt
|   |   |   |-- stopwords_tr.txt
|   |   |   `-- userdict_ja.txt
|   |   |-- managed-schema
|   |   |-- mapping-FoldToASCII.txt
|   |   |-- mapping-ISOLatin1Accent.txt
|   |   |-- protwords.txt
|   |   |-- solrconfig.xml
|   |   |-- spellings.txt
|   |   |-- stopwords.txt
|   |   |-- synonyms.txt
|   |   `-- update-script.js
|   |-- core.properties
|   `-- data
|       |-- index
|       |   |-- segments_1
|       |   `-- write.lock
|       `-- snapshot_metadata
|-- xwiki_events
|   |-- conf
|   |   |-- managed-schema
|   |   `-- solrconfig.xml
|   |-- core.properties
|   `-- data
|       |-- index
|       |   |-- segments_1
|       |   `-- write.lock
|       |-- snapshot_metadata
|       `-- tlog
|-- xwiki_extension_index
|   |-- conf
|   |   |-- managed-schema
|   |   `-- solrconfig.xml
|   |-- core.properties
|   `-- data
|       |-- index
|       |   |-- segments_1
|       |   `-- write.lock
|       |-- snapshot_metadata
|       `-- tlog
|-- xwiki_ratings
|   |-- conf
|   |   |-- managed-schema
|   |   `-- solrconfig.xml
|   |-- core.properties
|   `-- data
|       |-- index
|       |   |-- segments_1
|       |   `-- write.lock
|       |-- snapshot_metadata
|       `-- tlog

And now I have a new error when I run solr root@xwiki:/opt/solr/bin# ./solr stop -p 8984

I think it’s a bit better at least it s trying to create the real xwiki solr core

2021-03-10 14:44:43.723 INFO  (coreLoadExecutor-13-thread-1) [   x:xwiki_events] o.a.s.u.UpdateLog Could not find max version in index or recent updates, using new clock 1693856546132328448
2021-03-10 14:44:43.724 INFO  (coreLoadExecutor-13-thread-2) [   x:xwiki_extension_index] o.a.s.s.IndexSchema Loaded schema default/1.6 with uniqueid field id
2021-03-10 14:44:43.724 INFO  (coreLoadExecutor-13-thread-2) [   x:xwiki_extension_index] o.a.s.c.CoreContainer Creating SolrCore 'xwiki_extension_index' using configuration from instancedir /var/solr/data/xwiki_extension_index, trusted=true
2021-03-10 14:44:43.725 INFO  (coreLoadExecutor-13-thread-2) [   x:xwiki_extension_index] o.a.s.m.r.SolrJmxReporter JMX monitoring for 'solr.core.xwiki_extension_index' (registry 'solr.core.xwiki_extension_index') enabled at server: com.sun.jmx.mbeanserver.JmxMBeanServer@6ac13091
2021-03-10 14:44:43.725 INFO  (coreLoadExecutor-13-thread-2) [   x:xwiki_extension_index] o.a.s.c.SolrCore [[xwiki_extension_index] ] Opening new SolrCore at [/var/solr/data/xwiki_extension_index], dataDir=[/var/solr/data/xwiki_extension_index/data/]
2021-03-10 14:44:43.739 ERROR (coreContainerWorkExecutor-2-thread-1) [   ] o.a.s.c.CoreContainer Error waiting for SolrCore to be loaded on startup => java.util.concurrent.ExecutionException: org.apache.solr.common.SolrException: Unable to create core [xwiki]
	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
java.util.concurrent.ExecutionException: org.apache.solr.common.SolrException: Unable to create core [xwiki]
	at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_282]
	at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_282]
	at org.apache.solr.core.CoreContainer.lambda$load$12(CoreContainer.java:882) ~[?:?]
	at com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(InstrumentedExecutorService.java:180) ~[metrics-core-4.1.5.jar:4.1.5]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_282]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_282]
	at org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:218) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_282]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_282]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_282]
Caused by: org.apache.solr.common.SolrException: Unable to create core [xwiki]
	at org.apache.solr.core.CoreContainer.createFromDescriptor(CoreContainer.java:1459) ~[?:?]
	at org.apache.solr.core.CoreContainer.lambda$load$11(CoreContainer.java:853) ~[?:?]
	at com.codahale.metrics.InstrumentedExecutorService$InstrumentedCallable.call(InstrumentedExecutorService.java:202) ~[metrics-core-4.1.5.jar:4.1.5]
	... 5 more
Caused by: org.apache.solr.common.SolrException: org/apache/solr/search/ExtendedDismaxQParserPlugin
	at org.apache.solr.core.SolrCore.<init>(SolrCore.java:1087) ~[?:?]
	at org.apache.solr.core.SolrCore.<init>(SolrCore.java:922) ~[?:?]
	at org.apache.solr.core.CoreContainer.createFromDescriptor(CoreContainer.java:1438) ~[?:?]
	at org.apache.solr.core.CoreContainer.lambda$load$11(CoreContainer.java:853) ~[?:?]
	at com.codahale.metrics.InstrumentedExecutorService$InstrumentedCallable.call(InstrumentedExecutorService.java:202) ~[metrics-core-4.1.5.jar:4.1.5]
	... 5 more
Caused by: java.lang.NoClassDefFoundError: org/apache/solr/search/ExtendedDismaxQParserPlugin
	at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_282]
	at java.lang.ClassLoader.defineClass(ClassLoader.java:756) ~[?:1.8.0_282]
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.8.0_282]
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:468) ~[?:1.8.0_282]
	at java.net.URLClassLoader.access$100(URLClassLoader.java:74) ~[?:1.8.0_282]
	at java.net.URLClassLoader$1.run(URLClassLoader.java:369) ~[?:1.8.0_282]
	at java.net.URLClassLoader$1.run(URLClassLoader.java:363) ~[?:1.8.0_282]
	at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_282]
	at java.net.URLClassLoader.findClass(URLClassLoader.java:362) ~[?:1.8.0_282]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:418) ~[?:1.8.0_282]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[?:1.8.0_282]
	at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:544) ~[jetty-webapp-9.4.34.v20201102.jar:9.4.34.v20201102]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:405) ~[?:1.8.0_282]
	at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:817) ~[?:1.8.0_282]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:405) ~[?:1.8.0_282]
	at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:817) ~[?:1.8.0_282]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[?:1.8.0_282]
	at java.lang.Class.forName0(Native Method) ~[?:1.8.0_282]
	at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_282]
	at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:538) ~[?:?]
	at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:483) ~[?:?]
	at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:841) ~[?:?]
	at org.apache.solr.core.PluginBag.createPlugin(PluginBag.java:154) ~[?:?]
	at org.apache.solr.core.PluginBag.init(PluginBag.java:300) ~[?:?]
	at org.apache.solr.core.PluginBag.init(PluginBag.java:289) ~[?:?]
	at org.apache.solr.core.SolrCore.<init>(SolrCore.java:1007) ~[?:?]
	at org.apache.solr.core.SolrCore.<init>(SolrCore.java:922) ~[?:?]
	at org.apache.solr.core.CoreContainer.createFromDescriptor(CoreContainer.java:1438) ~[?:?]
	at org.apache.solr.core.CoreContainer.lambda$load$11(CoreContainer.java:853) ~[?:?]
	at com.codahale.metrics.InstrumentedExecutorService$InstrumentedCallable.call(InstrumentedExecutorService.java:202) ~[metrics-core-4.1.5.jar:4.1.5]
	... 5 more
Caused by: java.lang.ClassNotFoundException: org.apache.solr.search.ExtendedDismaxQParserPlugin
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[?:1.8.0_282]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:418) ~[?:1.8.0_282]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[?:1.8.0_282]
	at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_282]
	at java.lang.ClassLoader.defineClass(ClassLoader.java:756) ~[?:1.8.0_282]
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.8.0_282]
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:468) ~[?:1.8.0_282]
	at java.net.URLClassLoader.access$100(URLClassLoader.java:74) ~[?:1.8.0_282]
	at java.net.URLClassLoader$1.run(URLClassLoader.java:369) ~[?:1.8.0_282]
	at java.net.URLClassLoader$1.run(URLClassLoader.java:363) ~[?:1.8.0_282]
	at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_282]
	at java.net.URLClassLoader.findClass(URLClassLoader.java:362) ~[?:1.8.0_282]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:418) ~[?:1.8.0_282]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[?:1.8.0_282]
	at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:544) ~[jetty-webapp-9.4.34.v20201102.jar:9.4.34.v20201102]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:405) ~[?:1.8.0_282]
	at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:817) ~[?:1.8.0_282]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:405) ~[?:1.8.0_282]
	at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:817) ~[?:1.8.0_282]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[?:1.8.0_282]
	at java.lang.Class.forName0(Native Method) ~[?:1.8.0_282]
	at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_282]
	at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:538) ~[?:?]
	at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:483) ~[?:?]
	at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:841) ~[?:?]
	at org.apache.solr.core.PluginBag.createPlugin(PluginBag.java:154) ~[?:?]
	at org.apache.solr.core.PluginBag.init(PluginBag.java:300) ~[?:?]
	at org.apache.solr.core.PluginBag.init(PluginBag.java:289) ~[?:?]
	at org.apache.solr.core.SolrCore.<init>(SolrCore.java:1007) ~[?:?]
	at org.apache.solr.core.SolrCore.<init>(SolrCore.java:922) ~[?:?]
	at org.apache.solr.core.CoreContainer.createFromDescriptor(CoreContainer.java:1438) ~[?:?]
	at org.apache.solr.core.CoreContainer.lambda$load$11(CoreContainer.java:853) ~[?:?]
	at com.codahale.metrics.InstrumentedExecutorService$InstrumentedCallable.call(InstrumentedExecutorService.java:202) ~[metrics-core-4.1.5.jar:4.1.5]
	... 5 more
2021-03-10 14:44:43.749 INFO  (searcherExecutor-15-thread-1-processing-x:xwiki_events) [   x:xwiki_events] o.a.s.c.SolrCore [xwiki_events]  Registered new searcher autowarm time: 0 ms
2021-03-10 14:44:43.749 INFO  (searcherExecutor-17-thread-1-processing-x:xwiki_ratings) [   x:xwiki_ratings] o.a.s.c.SolrCore [xwiki_ratings]  Registered new searcher autowarm time: 0 ms
2021-03-10 14:44:43.803 INFO  (coreLoadExecutor-13-thread-2) [   x:xwiki_extension_index] o.a.s.u.UpdateHandler Using UpdateLog implementation: org.apache.solr.update.UpdateLog
2021-03-10 14:44:43.803 INFO  (coreLoadExecutor-13-thread-2) [   x:xwiki_extension_index] o.a.s.u.UpdateLog Initializing UpdateLog: dataDir= defaultSyncLevel=FLUSH numRecordsToKeep=100 maxNumLogsToKeep=10 numVersionBuckets=65536
2021-03-10 14:44:43.806 INFO  (coreLoadExecutor-13-thread-2) [   x:xwiki_extension_index] o.a.s.u.CommitTracker Hard AutoCommit: disabled
2021-03-10 14:44:43.806 INFO  (coreLoadExecutor-13-thread-2) [   x:xwiki_extension_index] o.a.s.u.CommitTracker Soft AutoCommit: disabled
2021-03-10 14:44:43.811 INFO  (coreLoadExecutor-13-thread-2) [   x:xwiki_extension_index] o.a.s.r.ManagedResourceStorage File-based storage initialized to use dir: /var/solr/data/xwiki_extension_index/conf
2021-03-10 14:44:43.813 INFO  (coreLoadExecutor-13-thread-2) [   x:xwiki_extension_index] o.a.s.h.ReplicationHandler Commits will be reserved for 10000 ms
2021-03-10 14:44:43.813 INFO  (coreLoadExecutor-13-thread-2) [   x:xwiki_extension_index] o.a.s.u.UpdateLog Could not find max version in index or recent updates, using new clock 1693856546226700288
2021-03-10 14:44:43.816 INFO  (searcherExecutor-29-thread-1-processing-x:xwiki_extension_index) [   x:xwiki_extension_index] o.a.s.c.SolrCore [xwiki_extension_index]  Registered new searcher autowarm time: 0 ms

Thanks again.

By the way when I will have a working standalone solr I will write an tomated ansible script to fully configure solr for xwiki 12.10.4 and I will give it here if it could help someone.

That one. It’s packaged as a JAR (something to improve) but it’s actually a zip with the same format as the other one (but with a lot more configuration in it).

Is this why you don’t want to use the xwiki-solr-all package ? Makes things a lot simpler.

When you said xwiki-solr-all you mean

http://maven.xwiki.org/releases/org/xwiki/platform/xwiki-platform-distribution-debian-solr-all/12.10.4/

? Because I’m still not on debian and I don’t found any other xwiki-solr-all package.

EDIT :+1:
I found my error I should not have put theses xwiki package here so I removed them and the Java exception NoClassFound is gone, probably a conflict

.
|-- ext
|   |-- disruptor-3.4.2.jar
|   |-- jcl-over-slf4j-1.7.24.jar
|   |-- jul-to-slf4j-1.7.24.jar
|   |--etc.
|-- http2-common-9.4.34.v20201102.jar
|-- http2-hpack-9.4.34.v20201102.jar
|-- http2-server-9.4.34.v20201102.jar
|-- javax.servlet-api-3.1.0.jar
|--etc.
|-- xwiki-platform-search-solr-server-core-12.10.4.jar
`-- xwiki-platform-search-solr-server-plugin-12.10.4.jar

I’m moving to the next step back to run xwiki

That’s probably because you did not added the XWiki Debian repository, see https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Installation/InstallationViaAPT/#HAPTConfiguration.

This is my Ansible script for those who might found this thread and would be interested.

So for ansible users you just have to create a playbook, define the variable xwiki_version and solr_version maybe also tomcat_user and solr_user and run it from you local computer to the remove UNIX server that you want.

Then ./opt/solr/bin/solr start or service solr start and in xwiki the default configuration for remote solr and it will works.

It’s not perfect I hardcoded some variable that could have been constants but it works pretty well.

---
#
# install solr
#

- name: install unzip (needed by unarchive)
  apt: name=unzip state=present


- name: create solr group
  group: name="{{ solr_user }}" state=present


- name: create solr user
  user:
    name: "{{ solr_user }}"
    group: "{{ solr_user }}"


- name: download solr
  get_url:
    url: "https://archive.apache.org/dist/lucene/solr/{{solr_version}}/solr-{{solr_version}}.tgz"
    dest: "/tmp/solr-{{solr_version}}.tgz"
    mode: 0644


- name: create /opt directory
  file:
    path: /opt
    state: directory


- name: unzip the files
  unarchive:
    remote_src: yes
    src: "/tmp/solr-{{solr_version}}.tgz"
    dest: /tmp

#
# install solr, but do not start it yet (-n flag)
#
- name: run the install script
  command: "/tmp/solr-{{solr_version}}/bin/install_solr_service.sh  /tmp/solr-{{solr_version}}.tgz -n"
  args:
    creates: /opt/solr

#
# install xwiki solr cores
#

- name: Ensure /var/solr/data exists
  file:
    path: /var/solr/data
    state: directory
    owner: "{{ solr_user }}"
    group: "{{ solr_user }}"
    mode: 0755

- name: download xwiki libs XWiki core
  get_url:
    url: "http://maven.xwiki.org/releases/org/xwiki/platform/{{ item }}/{{xwiki_version}}/{{ item }}-{{xwiki_version}}.jar"
    dest: "/tmp/{{ item }}-{{xwiki_version}}.zip"
  loop:
    - xwiki-platform-search-solr-server-core

- name: download xwiki libs XWiki minimal cores
  get_url:
    url: "http://maven.xwiki.org/releases/org/xwiki/platform/{{ item }}/{{xwiki_version}}/{{ item }}-{{xwiki_version}}.zip"
    dest: "/tmp/{{ item }}-{{xwiki_version}}.zip"
  loop:
    - xwiki-platform-search-solr-server-core-minimal

- name: Ensure directory to unzip exist
  file:
    path: /tmp/{{ item }}
    state: directory
    owner: "{{ solr_user }}"
    group: "{{ solr_user }}"
    mode: 0755
  loop:
    - xwiki-platform-search-solr-server-core
    - xwiki-platform-search-solr-server-core-minimal

- name: unzip xwiki cores
  unarchive:
    remote_src: yes
    src: "/tmp/{{ item }}-{{xwiki_version}}.zip"
    dest: /tmp/{{ item }}
  loop:
    - xwiki-platform-search-solr-server-core
    - xwiki-platform-search-solr-server-core-minimal

- name: Clean solr xwiki core folders
  file:
    state: absent
    path: "/var/solr/data/{{item}}"
  loop:
    - xwiki
    - xwiki_extension_index
    - xwiki_ratings
    - xwiki_events

- name: Ensure Solr core xwiki directory
  file:
    path: "/var/solr/data/{{item}}"
    state: directory
    owner: "{{ solr_user }}"
    group: "{{ solr_user }}"
    mode: 0755
  loop:
    - xwiki
    - xwiki_extension_index
    - xwiki_ratings
    - xwiki_events

- name: copy xwiki main core to solr core folder
  synchronize:
    src: "/tmp/xwiki-platform-search-solr-server-core/"
    dest: "/var/solr/data/xwiki/"
    delete: yes
  delegate_to: "{{ inventory_hostname }}"

- name: sync xwiki xwiki_extension_index core to solr core folder
  synchronize:
    src: "/tmp/xwiki-platform-search-solr-server-core-minimal/"
    dest: "/var/solr/data/xwiki_extension_index/"
    delete: yes
  delegate_to: "{{ inventory_hostname }}"

- name: copy xwiki xwiki_ratings core to solr core folder
  synchronize:
    src: "/tmp/xwiki-platform-search-solr-server-core-minimal/"
    dest: "/var/solr/data/xwiki_ratings/"
    delete: yes
  delegate_to: "{{ inventory_hostname }}"

- name: copy xwiki xwiki_events core to solr core folder
  synchronize:
    src: "/tmp/xwiki-platform-search-solr-server-core-minimal/"
    dest: "/var/solr/data/xwiki_events/"
    delete: yes
  delegate_to: "{{ inventory_hostname }}"

- name: Set cores name
  lineinfile:
    path: /var/solr/data/{{item}}/core.properties
    state: present    
    line: "name={{item}}"
    owner: "{{ solr_user }}"
    group: "{{ solr_user }}"
    mode: 0644
  loop:
    - xwiki
    - xwiki_extension_index
    - xwiki_ratings
    - xwiki_events