Incorrect URLs in OAI-interface

393 views
Skip to first unread message

Eike Martin Löhden

unread,
Jan 4, 2023, 10:08:33 AM1/4/23
to dspac...@googlegroups.com
Hi,

I'm currently developing a DSpace-7.2 platform for medieval charters and
facing an issue with the OAI-PMH interface. I think the same issue has
once been reported as a bug
(https://github.com/DSpace/DSpace/issues/8332), but marked as "cannot
reproduce".
If I open the OAI-interface under [dspace.server.url]/oai, the links to
- for example - "Identify" is redirected to
[dspace.server.url]/request?verb=Identify. The OAI-page also doesn't
have a layout, because it can't find the necessary files like
"bootstrap.min.css", "style.css" and so on. The browser console shows a
404 Error. I think, there is a problem with the oai-url, but I can't
find it.
I've installed DSpace on a Debian bullseye Server with JDK-11 and using
a postgres database.
Does anyone know this error?

Thanks and kind regards,
Eike


Mohammad S. AlMutairi

unread,
Jan 4, 2023, 10:48:34 AM1/4/23
to DSpace Technical Support
Hi Eike,

May I suggest you to upgrade to DSpace 7.4 or maybe jump to 7.5-snapshot version and then check to see if you still have this issue that was reported by Mark last June. The version (7.2) you developing on we all had a lot of issues with it at that time which were fixed in 7.3 and 7.4.

Hope it help

Eike Martin Löhden

unread,
Jan 5, 2023, 9:16:27 AM1/5/23
to dspac...@googlegroups.com

Hi Mohammad,

thank you very much for your help! It actually solved the problem with the layout and the links. But now I get a 500 error, when I try to open "http://localhost:8080/server/oai/request?verb=Identify". And in the logs, it shows me the following stack-trace:

```
05-Jan-2023 15:08:29.852 SEVERE [http-nio-8080-exec-3] org.apache.catalina.core.ApplicationDispatcher.invoke Servlet.service() for servlet [dispatcherServlet] threw exception
        java.lang.IllegalStateException: getOutputStream() has already been called for this response
                at org.apache.catalina.connector.Response.getWriter(Response.java:584)
                at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:227)
                at org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration$StaticView.render(ErrorMvcAutoConfiguration.java:228)
                at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1401)
                at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1145)
                at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1084)
                at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)
                at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
                at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:626)
                at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
                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.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:102)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
                at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:102)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
                at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:102)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
                at org.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:64)
                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.ApplicationDispatcher.invoke(ApplicationDispatcher.java:710)
                at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:457)
                at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:384)
                at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
                at org.springframework.boot.web.servlet.support.ErrorPageFilter.handleErrorStatus(ErrorPageFilter.java:161)
                at org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:128)
                at org.springframework.boot.web.servlet.support.ErrorPageFilter.access$000(ErrorPageFilter.java:64)
                at org.springframework.boot.web.servlet.support.ErrorPageFilter$1.doFilterInternal(ErrorPageFilter.java:101)
                at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
                at org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:119)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
                at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
                at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
                at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:102)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
                at org.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:71)
                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:202)
                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
                at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542)
                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143)
                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:346)
                at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:382)
                at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
                at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:888)
                at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1684)
                at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
                at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
                at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
                at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
                at java.base/java.lang.Thread.run(Thread.java:829)

```

Kind regards,
Eike.



Am 04.01.23 um 16:48 schrieb Mohammad S. AlMutairi:
--
All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
---
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/1afaf56f-a809-47f3-9e39-10e00988fffcn%40googlegroups.com.

Mohammad S. AlMutairi

unread,
Jan 5, 2023, 10:27:22 AM1/5/23
to DSpace Technical Support
Hi Eike,

Glad it worked for you. It could be a permission issue. You need to double check who owns dspace folder and its files and then make sure it matches what user is tomcat run as with in /usr/lib/systemd/system/tomcat9.service. You need to give that user a write permission as you see it heighted in red below. Also double check how Solr was installed. You can remove it cleanly using the Solr removal steps you see below or you can just use the Solr installation steps which is using the force option to overwrite the old installation (Not prefered).

# Edit /usr/lib/systemd/system/tomcat9.service
User=tomcat
Group=tomcat
PrivateTmp=yes
AmbientCapabilities=CAP_NET_BIND_SERVICE
NoNewPrivileges=true
CacheDirectory=tomcat9
CacheDirectoryMode=750
ProtectSystem=strict
ReadWritePaths=/etc/tomcat9/Catalina/
ReadWritePaths=/var/lib/tomcat9/webapps/
ReadWritePaths=/var/log/tomcat9/
ReadWritePaths=/opt/dspace

################################## Solr Removal #################################
# login with root to remove old solr installation from your server.
a) sudo passwd root
b) su - root

1) systemctl stop solr
2) rm -r /var/solr
3) rm -r /opt/sol*
4) rm /etc/init.d/solr
5) deluser --remove-home solr
6) deluser --group solr
7) update-rc.d -f solr remove
8) rm -rf /etc/default/solr.in.sh
############################### End of Solr Removal ################################

################################## Solr Installation #################################
1) mkdir /build
2) cd /build
3) apt install lsof -y
4) wget https://downloads.apache.org/lucene/solr/8.11.2/solr-8.11.2.tgz
5) tar xzf solr-8.11.2.tgz solr-8.11.2/bin/install_solr_service.sh --strip-components=2
6) bash ./install_solr_service.sh solr-8.11.2.tgz -f
7) cp -r /opt/dspace/solr/* /var/solr/data/ # Do this step after installing dspace backend. You need to change /opt/dspace to the folder you installed the dspace backend into.
8) chown -R solr:solr /var/solr/data/
9) systemctl enable solr
10) systemctl restart solr
11) curl http://localhost:8983/solr/admin/cores
12) [dspace]/bin/dspace index-discovery -b
############################ End of Solr Installation ###############################


Kind regards
Reply all
Reply to author
Forward
0 new messages