Exception starting filter SolrRequestFilter

cancel
Showing results for 
Search instead for 
Did you mean: 
almoehi
Active Member

Exception starting filter SolrRequestFilter

Jump to solution

Hi,
on starting my alfresco instance (Community - 5.2.0, re21f2be5-b22), I get the following errors in catalina.out:

SCHWERWIEGEND: Exception starting filter SolrRequestFilter
javax.xml.parsers.FactoryConfigurationError: Provider for class javax.xml.parsers.DocumentBuilderFactory cannot be created
    at javax.xml.parsers.FactoryFinder.findServiceProvider(FactoryFinder.java:311)
    at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:267)
    at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:120)
    at org.apache.solr.core.Config.<init>(Config.java:103)
    at org.apache.solr.servlet.SolrDispatchFilter.<init>(SolrDispatchFilter.java:65)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at java.lang.Class.newInstance(Class.java:442)
    at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:114)
    at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)
    at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
    at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4958)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5652)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:679)
    at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1966)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: Provider for class javax.xml.parsers.DocumentBuilderFactory cannot be created
    at javax.xml.parsers.FactoryFinder.findServiceProvider(FactoryFinder.java:308)
    ... 25 more
Caused by: java.util.ServiceConfigurationError: javax.xml.parsers.DocumentBuilderFactory: Provider org.alfresco.xmlfactory.DocumentBuilderFactoryXercesImpl could not be instantiated
    at java.util.ServiceLoader.fail(ServiceLoader.java:232)
    at java.util.ServiceLoader.access$100(ServiceLoader.java:185)
    at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384)
    at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
    at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
    at javax.xml.parsers.FactoryFinder$1.run(FactoryFinder.java:294)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.xml.parsers.FactoryFinder.findServiceProvider(FactoryFinder.java:289)
    ... 25 more
Caused by: java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;Ljava/lang/Throwable;)V
    at org.apache.commons.logging.impl.SLF4JLocationAwareLog.debug(SLF4JLocationAwareLog.java:131)
    at org.alfresco.xmlfactory.FactoryHelper.debug(FactoryHelper.java:410)
    at org.alfresco.xmlfactory.FactoryHelper.getProperties(FactoryHelper.java:372)
    at org.alfresco.xmlfactory.FactoryHelper.getProperty(FactoryHelper.java:353)
    at org.alfresco.xmlfactory.FactoryHelper.getConfiguration(FactoryHelper.java:285)
    at org.alfresco.xmlfactory.DocumentBuilderFactoryXercesImpl.<clinit>(DocumentBuilderFactoryXercesImpl.java:33)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at java.lang.Class.newInstance(Class.java:442)
    at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380)
    ... 30 more
Dez 19, 2017 7:26:37 PM org.apache.catalina.core.StandardContext startInternal
SCHWERWIEGEND: One or more Filters failed to start. Full details will be found in the appropriate container log file
Dez 19, 2017 7:26:37 PM org.apache.catalina.core.StandardContext startInternal
SCHWERWIEGEND: Context [/solr] startup failed due to previous errors


So far, I didn't notice any malfunction of solr. The search within share works, although the first run is a bit slow. Does anyone know what causes this error? Can it be ignored?

Thanks in advance for your help,

Alex

1 Solution

Accepted Solutions
andy1
Senior Member

Re: Exception starting filter SolrRequestFilter

Jump to solution

Hi

This is a known issue with SOLR 1 logging in 5.x after an upgrade of the slf4j  library.

SOLR 1 is deprecated and only supported for upgrade in 5.2. You should be using SOLR 4 or search services.

It is most likely you have SOLR 1 installed but you are not using it.

Andy

View solution in original post

6 Replies
douglascrp
Advanced II

Re: Exception starting filter SolrRequestFilter

Jump to solution

Is this a new instalation?

Have you done any kind of customization or deployed any new addon or something like that?

almoehi
Active Member

Re: Exception starting filter SolrRequestFilter

Jump to solution

Hi Douglas,

thank you for your reply.

It's a relatively fresh install of Community - 5.2.0 (re21f2be5-b22) with an Apache proxy. It's not customized except for a different favicon and a logo on the top-left. However, I installed some addons:

  • Ezuno AddOn (Desktop Client)
  • Site-Creators AddOn

It's a good hint to start there, thanks a lot. When there's time to, I'll disable them to see if one is the cause.

Alex

douglascrp
Advanced II

Re: Exception starting filter SolrRequestFilter

Jump to solution

I see.

Those addons/changes should not cause you any problems.

One thing you can try is to reindex your repository.

almoehi
Active Member

Re: Exception starting filter SolrRequestFilter

Jump to solution

Did a reindex according to Performing a full reindex with Solr | Alfresco Documentation . Exception is still there. Curiously the log did not contain such messages mentioned in the help documentation ("Creating new index"). However, the files were re-created and search works, although still the first query after every Alfresco restart is extremely slow (waited quite a while before testing, so reindexing should already have been completed). All succeeding queries run at good speed.

I had a look at the solr monitoring console, but could not spot any obvious problems. Everything looks ok.

andy1
Senior Member

Re: Exception starting filter SolrRequestFilter

Jump to solution

Hi

This is a known issue with SOLR 1 logging in 5.x after an upgrade of the slf4j  library.

SOLR 1 is deprecated and only supported for upgrade in 5.2. You should be using SOLR 4 or search services.

It is most likely you have SOLR 1 installed but you are not using it.

Andy

almoehi
Active Member

Re: Exception starting filter SolrRequestFilter

Jump to solution

Andy,

thanks for your reply. You were right, the exception was indeed caused by solr1. It was gone after removing all solr1 components:

  • <alfhome>/tomcat/webapps/solr
  • <alfhome>/tomcat/conf/Catalina/localhost/solr.xml
  • <alfhome>/alf_data/solr

Alex