Jats harvesing problem

Greetings! After upgrading to 3.2.1.2, a publisher cannot establish harvesting connection with us. When they go to a URL with Prefix=jats, they get a 500 error:

https://journals.msvu.ca/index.php/atlantis/oai?verb=GetRecord&metadataPrefix=jats&identifier=oai:ojs-oai.localhost:article/5545

When, however, they go to the same URL with Prefix=oai_dc, they see proper OAI 2 request result:

https://journals.msvu.ca/index.php/atlantis/oai?verb=GetRecord&metadataPrefix=oai_dc&identifier=oai:ojs-oai.localhost:article/5545

After the upgrade, we installed the JATS Template Plugin and OAI JATS Plugin. The Metadata Format page https://journals.msvu.ca/index.php/atlantis/oai?verb=ListMetadataFormats lists jats among others, but it looks like something needs fixing. There is nothing in php_error.log. Does anyone have an idea?

1 Like

Hi @Lolekbolek,

I’m tagging @Vitaliy - our resident JATS expert to see if he may be able to assist.

-Roger
PKP Team

Hi @Lolekbolek,

What do you see in your PHP error log?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher ,

Nothing in php_error_log (even after setting it to error_reporting=E_ALL). Nothing in Apache error.log either. The only trace is in Apache access.log:

[10/Mar/2021:22:50:45 -0400] “GET /index.php/atlantis/oai?verb=GetRecord&metadataPrefix=jats&identifier=oai:ojs-oai.localhost:article/5545 HTTP/1.1” 500 20

Hi @Lolekbolek,

That 500 should definitely correspond to an error message somewhere – depending on your SAPI, it might be in your Apache error log, PHP error log, syslog, or even some separate CGI/FPM log. At a guess, you might consider bumping your PHP memory limit or dropping the number of OAI records per response (see config.inc.php on this), as the JATS generation can be resource intensive.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

Nothing for error 500, but after enabling debug logging, if I search for JATS, I see thousands of lines with these entries in php_error_log:

Line 214515: [17-Mar-2021 16:35:01 America/Halifax] PHP Warning: Declaration of JatsTemplatePlugin::register($category, $path) should be compatible with LazyLoadPlugin::register($category, $path, $mainContextId = NULL) in C:\xampp\htdocs\journal\plugins\generic\jatsTemplate\JatsTemplatePlugin.inc.php on line 261

And I also have this:

[17-Mar-2021 16:49:29] PHP Fatal error: Uncaught Error: Call to undefined method ArticleGalley::getSubmissionId() in C:\xampp\htdocs\journal\plugins\oaiMetadataFormats\oaiJats\OAIMetadataFormat_JATS.inc.php:38
Stack trace:
#0 C:\xampp\htdocs\journal\plugins\oaiMetadataFormats\oaiJats\OAIMetadataFormat_JATS.inc.php(91): OAIMetadataFormat_JATS->_findJats(Object(OAIRecord))
#1 C:\xampp\htdocs\journal\lib\pkp\classes\oai\OAI.inc.php(788): OAIMetadataFormat_JATS->toXml(Object(OAIRecord))
#2 C:\xampp\htdocs\journal\lib\pkp\classes\oai\OAI.inc.php(244): OAI->formatMetadata(‘jats’, Object(OAIRecord))
#3 C:\xampp\htdocs\journal\lib\pkp\classes\oai\OAI.inc.php(73): OAI->GetRecord()
#4 C:\xampp\htdocs\journal\pages\oai\OAIHandler.inc.php(39): OAI->execute()
#5 C:\xampp\htdocs\journal\lib\pkp\classes\core\PKPRouter.inc.php(391): OAIHandler->index(Array, Object(Request))
#6 C:\xampp\htdocs\journal\lib\pkp\classes\core\PKPPageRouter.inc.php(231): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array, false)
#7 C:\xampp\htdocs\journal\lib\pk in C:\xampp\htdocs\journal\plugins\oaiMetadataFormats\oaiJats\OAIMetadataFormat_JATS.inc.php on line 38

Other than that, I lowered the number of OAI records per response from 100 to 10, while the max memory in php.ini is 512M. I hope that’s enough.

1 Like

Hi @Lolekbolek,

I suspect you’re using a version of the OAI JATS plugin that’s not compatible with your OJS. Did you recently upgrade OJS, but forget to upgrade the OAI JATS plugin? Double-check the Plugin Gallery when logged in as an administrator to see if it’s possible to update the plugin.

Regards,
Alec Smecher
Public Knowledge Project Team

Thank you, @asmecher. While it was showing in Plugin Gallery that I had the following:

OAI JATS Plugin
v1.0.3.0 released on 2020-06-02
in plugins\oaiMetadataFormats

JATS Template Plugin
v1.0.4.0 released on 2020-06-02
in plugins\generic

it might be that the information was incorrect, because in my setup I am installing them manually by downloading from GitHub and unwrapping into the destination directories. So, I re-downloaded and re-unwrapped them and it seems that now when I go to the initial page in question, there is no more error!

https://journals.msvu.ca/index.php/atlantis/oai?verb=GetRecord&metadataPrefix=jats&identifier=oai:ojs-oai.localhost:article/5545

I asked the publisher to retry and now they were able to harvest our journal. Mission accomplished! Thank you again.

1 Like