Sean, thanks for pointing this out. After some further digging I found that I shouldn't use server.xml but rather conf/Catalina/localhost/. And there I should just use, in my case, repository#oai.xml file name. It also matters if the context is deployed under Tomcat's webapps or not (in my case it is not). And it worked, was all I needed to change. There's a nice article explaining all this a bit confusing (at least for beginners) context/path issue in Tomcat: https://octopus.com/blog/defining-tomcat-context-paths Might be helpful.
Peter W dniu piątek, 5 października 2018 19:10:02 UTC+1 użytkownik Sean Kalynuk napisał: > Hi Peter, > > > > According to the Tomcat documentation, the path attribute can only be used > in a Context element if it is defined in server.xml. (See > https://tomcat.apache.org/tomcat-8.5-doc/config/context.html#Common_Attributes > > for Tomcat 8.5). > > > > Also, see > https://tomcat.apache.org/tomcat-8.5-doc/config/context.html#Naming for > information on naming the .xml file to change the context path. If you are > using an older version of Tomcat, I believe the rules are the same. > > > > In your case, I think you will need to name it: > > > > repository#oai.xml > > > > That will define the context path as /repository/oai > > > > Also, the path to the .xml file is important. It should be defined in > $CATALINA_BASE/conf/Catalina/sample.com/repository#oai.xml (for example) > so that requests to sample.com find the correct webapp. And, the > server.xml file should have a Host element defined for sample.com. > > > > -- > > Sean > > > > *From:* [email protected] <javascript:> <[email protected] > <javascript:>> *On Behalf Of *admin > *Sent:* October 5, 2018 12:26 PM > *To:* DSpace Technical Support <[email protected] <javascript:>> > *Subject:* Re: [dspace-tech] OAI-PMH issue > > > > Hi Tim, > > > > for now I just added "path" into oai.xml file: > > <Context > path="/repository/oai" > docBase="[path]/dspace/webapps/oai" > reloadable="false" > cachingAllowed="true" /> > > restarted Tomcat, but it didn't change anything. DSpace still shows "page > not found" when I click on the OAI-PMH URL (Harvesting tab of the Control > Panel), which is https://sample.com/repository/oai > > > > I didn't change "oai.url" for now; it is "${dspace.baseUrl}/oai" and my > "${dspace.baseUrl}" is https://sample.com/repository, so if I understand > it correctly it is ok? > > > > Peter > > > > > W dniu środa, 3 października 2018 22:33:50 UTC+1 użytkownik Tim Donohue > napisał: > > Hi Peter, > > To me, it sounds like you'll need to tell Tomcat that "/repository/oai" > should reference the OAI webapp. From the behavior you are noting, it > sounds like Tomcat only knows that "/repository" is the DSpace UI webapp > (either XMLUI or JSPUI). So, it's attempting to send "/repository/oai" on > to that DSpace UI webapp. > > > > It may be as simply as having something like this in your Tomcat > configuration: > > <Context path="/repository/oai" docBase="[path-to-webapps]/oai"/> > > > > In addition, you also may need to modify the "oai.url" configuration in > your local.cfg (or in oai.cfg directly): > > > https://github.com/DSpace/DSpace/blob/dspace-6_x/dspace/config/modules/oai.cfg#L12 > > > > Beyond that, I don't think you should need to modify the OAI web > application itself. It should be deployable to any path. > > > > Let us know on this list if this helps you figure it out > > > > - Tim > > > > On Wed, Oct 3, 2018 at 4:25 PM admin <[email protected]> wrote: > > I added that to the url, but nothing changes. Still url not found note > displayed by DSpace. > > > > > W dniu środa, 3 października 2018 15:03:58 UTC+1 użytkownik Sean Kalynuk > napisał: > > Hi, > > > > Try adding this after oai: > > > > /request?verb=Identify > > > > -- > > Sean > > > > *From:* [email protected] <[email protected]> *On Behalf > Of *admin > > > *Sent:* October 2, 2018 2:16 PM > > *To:* DSpace Technical Support <[email protected]> > *Subject:* [dspace-tech] OAI-PMH issue > > > > Hi, > > My DSpace 6.3 has been installed in a subdirectory: > https://sampledomain.com/repository > I noticed that OAI-PMH URL, which is > https://sampledomain.com/repository/oai, doesn't seem to work – clicking > on it takes me to the DSpace's “Page not found. We can't find the page you > asked for.” > > I was wondering if I need to configure OAI somehow additionally because I > have DSpace in a subdirectory (and behind ssl)? > I noticed for example that [dspace]/config/crosswalks/oai/description.xml > hasn't got subdirectory included (do I need it there at all?): > <repositoryIdentifier>sampledomain.com</repositoryIdentifier> > <sampleIdentifier>oai:sampledomain.com:123456789/1234</sampleIdentifier> > > Or can it be simply that OAI is not available from Tomcat...? > > > > > > Best, Peter > > -- > All messages to this mailing list should adhere to the DuraSpace Code of > Conduct: https://duraspace.org/about/policies/code-of-conduct/ > --- > 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 [email protected]. > To post to this group, send email to [email protected]. > > > Visit this group at https://groups.google.com/group/dspace-tech. > For more options, visit https://groups.google.com/d/optout. > > -- > All messages to this mailing list should adhere to the DuraSpace Code of > Conduct: https://duraspace.org/about/policies/code-of-conduct/ > --- > 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 [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/dspace-tech. > For more options, visit https://groups.google.com/d/optout. > > -- > > Tim Donohue > Technical Lead for DSpace & DSpaceDirect > DuraSpace.org | DSpace.org | DSpaceDirect.org > > -- > All messages to this mailing list should adhere to the DuraSpace Code of > Conduct: https://duraspace.org/about/policies/code-of-conduct/ > --- > 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 [email protected] <javascript:>. > To post to this group, send email to [email protected] > <javascript:>. > Visit this group at https://groups.google.com/group/dspace-tech. > For more options, visit https://groups.google.com/d/optout. > -- All messages to this mailing list should adhere to the DuraSpace Code of Conduct: https://duraspace.org/about/policies/code-of-conduct/ --- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/dspace-tech. For more options, visit https://groups.google.com/d/optout.
