I am trying to integrate solr in my TYPO3 v12 ddev setup, but getting this error:
core_en: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Error loading class 'org.apache.solr.response.XSLTResponseWriter'
In the projects root directory I executed the following commands:
And this is my docker-compose.solr.yaml
file:
services:
solr:
container_name: ddev-${DDEV_SITENAME}-solr
image: typo3solr/ext-solr:12.0.5
restart: "no"
expose:
- 8983
labels:
com.ddev.site-name: ${DDEV_SITENAME}
com.ddev.approot: $DDEV_APPROOT
environment:
- VIRTUAL_HOST=$DDEV_HOSTNAME
- HTTP_EXPOSE=8983
volumes:
- "./solr:/opt/solr/server/solr"
# If you want your solr to persist over `ddev stop` and `ddev start` then uncomment the following line
# If you uncomment it and want to flush your data you have to `ddev stop` and then
# `docker volume rm ddev-<projectname>_solrdata` to destroy it.
- solr:/var/solr
web:
links:
- solr
volumes:
# solr is a persistent Docker volume for this project's solr data
# the volume will be named ddev-<project>_solr
solr:
Now calling http://myproject.ddev.site:8983/solr/#/
in the browser throws the error described above.
What needs to be changed, that the solr cores can be initialized?
You don't want the volume - "./solr:/opt/solr/server/solr", most probably there is the trouble. By-side of that Apache Solr service wants proper UNIX UID+GID file permissions inside of image. So stop your project and remove the files from volumes, then remove the mentioned line from docker-compose.solr.yaml and start again.
If you run on ARM and not on x86, then you want to build the image manually. See: