-
Notifications
You must be signed in to change notification settings - Fork 441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error creating bean with name 'authenticationRestController' #2903
Comments
@trifonovpv: I indeed also experienced some issues with starting tomcat in the last months. There is currently a problem with the |
Dear Alexandre,
Many thanks for your reply.
I have dspace.dir = /dspace both in dspace.cfg and local.cfg. I have tried to comment out this line in both of these files, but this did not change anything. I have even tried to remove local.cfg completely, but this still has not eliminated this error.
With best regards,
P. Trifonov
From: Alexandre Vryghem ***@***.***>
Sent: Sunday, April 7, 2024 7:09 PM
To: DSpace/dspace-angular ***@***.***>
Cc: trifonovpv ***@***.***>; Mention ***@***.***>
Subject: Re: [DSpace/dspace-angular] Error creating bean with name 'authenticationRestController' (Issue #2903)
@trifonovpv <https://github.com/trifonovpv> : I indeed also experienced some issues with starting tomcat in the last months. There is currently a problem with the local.cfg in the backend, for some reason if you define the property dspace.dir in your local.cfg it will not override the value from dspace.cfg (if I remember correctly this was not the only property that was affected). I've not had the time yet to exactly invesitgate why this occured but a quick fix is to simply define the correct path (for dspace.dir) in dspace.cfg instead. I think this is the same issue because the path of those files start with /dspace which is the default in dspace.cfg. But if your dspace.dir really is /dspace this might be a different issue 😅
—
Reply to this email directly, view it on GitHub <#2903 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/BHUXUHGFH7IB3ELYTPKY6E3Y4FVTLAVCNFSM6AAAAABF3HAHO2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGUYTOMJZGE> .
You are receiving this because you were mentioned. <https://github.com/notifications/beacon/BHUXUHA35LETKQRUDAECHG3Y4FVTLA5CNFSM6AAAAABF3HAHO2WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTZV4KIO.gif> Message ID: ***@***.*** ***@***.***> >
|
@trifonovpv: If |
@trifonovpv did you ever get to the bottom of this issue? I've just encountered it myself, in a new dspace 7.6.1 docker environment, though with slightly different dependencies (tomcat 8 and java 11). It's definitely a spring startup issue - pretty sure authenticationRestController just happens to be the first rest controller alphabetically, but actually none of the bean instantiation /wiring is working. Most likely an odd config issue - just thought I'd ask if you found any local problems! Update: same issue for me when I use tomcat 9 and java 17. Solution: This error is actually, confusingly, an indication that your Solr server has not started properly. In my case, my docker environment wasn't able to autocreate the cores (I had my v8 solr conf still mounted) - not sure what your exact Solr issue will be but if you check those logs hopefully it will put you in the right direction. See also: DSpace/DSpace#9217 (i won't reopen this issue as it belongs out of frontend but we could open a new issue in backend, or a thread on mailng lists) |
I have not yet been able to solve this problem. I have |
@trifonovpv ok, in that case i would scan the logs carefully for the few lines before the spring boot / bean instantiation errors begin, in case there is another issue that causes another component to fail and then snowballs into the spring issue (which could still be a red herring) |
This appears to be the first error. Before these lines there are just regular messages, which immediately follow with the "Error starting [/server]" error: 16-Apr-2024 11:03:14.712 INFO [http-nio-8080-exec-35] org.apache.catalina.core.ApplicationContext.log HTMLManager: list: Listing contexts for virtual host 'localhost' |
The problem is still present in DSpace 8 RC1. |
@trifonovpv : Please try out the latest I suspect this bug was related to DSpace/DSpace#9217 which has been fixed now on the latest Either that, or you may have a configuration issue in your |
I have tried main branch, and it still does not work. But the error message now looks differently: 28-May-2024 20:37:45.124 INFO [http-nio-8080-exec-25] org.apache.catalina.core.ApplicationContext.log HTMLManager: start: Starting web application '/server' HTTP ERROR 404 Not Found
HTTP ERROR 404 Not Found
HTTP ERROR 404 Not Found
HTTP ERROR 404 Not Found
HTTP ERROR 404 Not Found
HTTP ERROR 404 Not Found
HTTP ERROR 404 Not Found
HTTP ERROR 404 Not Found
28-May-2024 20:38:06.484 INFO [http-nio-8080-exec-25] org.apache.catalina.core.ApplicationContext.log HTMLManager: list: Listing contexts for virtual host 'localhost' |
@trifonovpv : That seems to be clearly saying that Solr is down / unavailable. It's throwing a 404 for all your Solr endpoints. DSpace cannot function if Solr is not working. Based on what you've shared though, it sounds (to me) like either Solr is down, or your backend isn't able to connect to Solr vis the URL http://localhost:8983/solr/search (maybe that URL is incorrect for Solr, or Solr isn't running on the same machine/server as the REST API, in which case it cannot be accessed via localhost). It's also possible you haven't properly copied the DSpace Solr core configurations over to Solr. See step 12 of the Backend Installation for 8.0: https://wiki.lyrasis.org/display/DSDOC8x/Installing+DSpace#InstallingDSpace-BackendInstallation If that doesn't help, you will need to use one of the Support options listed at https://wiki.lyrasis.org/display/DSPACE/Support For example, please send an email to the support list with details about your environment (operating system, list of dependencies you've installed with their versions) and the version of DSpace you are trying to install along with which step results in these errors. You can also search the mailing list archives for other users who may have encountered a similar problem: https://groups.google.com/g/dspace-tech/ |
Describe the bug
I have a fresh installation of dspace-7.6.1 on Debian 6.1.76-1 with Tomcat 9 and openjdk 17.0.10. When I try to start DSpace backend via Tomcat manager app it fails with the following message:
FAIL - Application at context path [/server] could not be started
FAIL - Encountered exception [org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/server]]]
Tomcat log file contains the following:
07-Apr-2024 13:38:13.075 INFO [http-nio-8080-exec-38] org.apache.catalina.core.ApplicationContext.log HTMLManager: list: Listing contexts for virtual host 'localhost'
07-Apr-2024 13:38:15.583 INFO [http-nio-8080-exec-41] org.apache.catalina.core.ApplicationContext.log HTMLManager: start: Starting web application '/server'
07-Apr-2024 13:38:24.534 INFO [http-nio-8080-exec-41] org.apache.catalina.core.ApplicationContext.log 2 Spring WebApplicationInitializers detected on classpath
07-Apr-2024 13:38:31.927 INFO [http-nio-8080-exec-41] org.apache.catalina.core.ApplicationContext.log Initializing Spring embedded WebApplicationContext
07-Apr-2024 13:38:36.712 SEVERE [http-nio-8080-exec-41] org.apache.catalina.core.ApplicationContext.log HTMLManager: Error starting [/server]
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/server]]
at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1437)
at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:702)
at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:220)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:696)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:779)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:203)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.apache.catalina.filters.HttpHeaderSecurityFilter.doFilter(HttpHeaderSecurityFilter.java:126)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:177)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:660)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:891)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1784)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authenticationRestController': Unsatisfied dependency expressed through field 'converter'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'converterService': Unsatisfied dependency expressed through field 'converters'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'workflowItemConverter' defined in file [/dspace/webapps/server/WEB-INF/classes/org/dspace/app/rest/converter/WorkflowItemConverter.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.dspace.app.rest.converter.WorkflowItemConverter]: Constructor threw exception; nested exception is java.lang.NullPointerException: Cannot invoke "org.dspace.submit.factory.SubmissionServiceFactory.getSubmissionConfigService()" because the return value of "org.dspace.submit.factory.SubmissionServiceFactory.getInstance()" is null
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:660)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:920)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:731)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:175)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:155)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:97)
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:174)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5211)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
... 33 more
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'converterService': Unsatisfied dependency expressed through field 'converters'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'workflowItemConverter' defined in file [/dspace/webapps/server/WEB-INF/classes/org/dspace/app/rest/converter/WorkflowItemConverter.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.dspace.app.rest.converter.WorkflowItemConverter]: Constructor threw exception; nested exception is java.lang.NullPointerException: Cannot invoke "org.dspace.submit.factory.SubmissionServiceFactory.getSubmissionConfigService()" because the return value of "org.dspace.submit.factory.SubmissionServiceFactory.getInstance()" is null
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:660)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:657)
... 56 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'workflowItemConverter' defined in file [/dspace/webapps/server/WEB-INF/classes/org/dspace/app/rest/converter/WorkflowItemConverter.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.dspace.app.rest.converter.WorkflowItemConverter]: Constructor threw exception; nested exception is java.lang.NullPointerException: Cannot invoke "org.dspace.submit.factory.SubmissionServiceFactory.getSubmissionConfigService()" because the return value of "org.dspace.submit.factory.SubmissionServiceFactory.getInstance()" is null
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1334)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1232)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1609)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1573)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1462)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1349)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:657)
... 70 more
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.dspace.app.rest.converter.WorkflowItemConverter]: Constructor threw exception; nested exception is java.lang.NullPointerException: Cannot invoke "org.dspace.submit.factory.SubmissionServiceFactory.getSubmissionConfigService()" because the return value of "org.dspace.submit.factory.SubmissionServiceFactory.getInstance()" is null
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:224)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1326)
... 84 more
Caused by: java.lang.NullPointerException: Cannot invoke "org.dspace.submit.factory.SubmissionServiceFactory.getSubmissionConfigService()" because the return value of "org.dspace.submit.factory.SubmissionServiceFactory.getInstance()" is null
at org.dspace.app.rest.converter.AInprogressItemConverter.(AInprogressItemConverter.java:63)
at org.dspace.app.rest.converter.WorkflowItemConverter.(WorkflowItemConverter.java:29)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:211)
... 86 more
The text was updated successfully, but these errors were encountered: