Finding Aid FOP Java Runtime Error

170 views
Skip to first unread message

danc...@gmail.com

unread,
Nov 21, 2018, 10:19:34 AM11/21/18
to AtoM Users
FOP / Java Runtime Errors



Hi, I was recently asked to install AtoM for a customer

It's on a Ubuntu VM in azure, the install all went well except:

The system will not generate Finding Aids, it's failing with a java runtime not found error


Can you help resolve this please, java seems to be installed, have read all sorts but haven't really got any where.

Thanks In advance

Dan





Installation/Error Info Below:


Ubuntu Server 16.04.4 LTS

openjdk version 1.8.0_181
openjdk runtime environment build 1.8.0_181-8u181-b13-1ubuntu0.16.04.1-b13

FOP Version 2.1





[info] [2018-11-21 06:28:38] Job 4568 "arFindingAidJob": Job started.
[info] [2018-11-21 06:28:38] Job 4568 "arFindingAidJob": Generating finding aid (pa30)...
[info] [2018-11-21 06:28:48] Job 4568 "arFindingAidJob": Running: java -jar '/usr/share/nginx/atom/lib/task/pdf/saxon9he.jar' -s:'/tmp/php09bwlI' -xsl:'/usr/share/nginx/atom/lib/task/pdf/ead-pdf-full-details.xsl' -o:'/tmp/phpPBUPUx' 2>&1
[info] [2018-11-21 06:28:54] Job 4568 "arFindingAidJob": Running: fop -r -q -fo '/tmp/phpPBUPUx' -rtf '/usr/share/nginx/atom/downloads/pa30.rtf' 2>&1
[info] [2018-11-21 06:28:55] Job 4568 "arFindingAidJob": Converting the EAD FO to PDF has failed.
[info] [2018-11-21 06:28:55] Job 4568 "arFindingAidJob": ERROR(FOP): [warning] /usr/bin/fop: No java runtime was found
[info] [2018-11-21 06:28:56] Job 4568 "arFindingAidJob": ERROR(FOP): [ERROR] FOP - Exception <java.io.FileNotFoundException: /usr/share/nginx/atom/downloads/pa30.rtf (Permission denied)>java.io.FileNotFoundException: /usr/share/nginx/atom/downloads/pa30.rtf (Permission denied)
[info] [2018-11-21 06:28:56] Job 4568 "arFindingAidJob": ERROR(FOP): at java.io.FileOutputStream.open0(Native Method)
[info] [2018-11-21 06:28:56] Job 4568 "arFindingAidJob": ERROR(FOP): at java.io.FileOutputStream.open(FileOutputStream.java:270)
[info] [2018-11-21 06:28:56] Job 4568 "arFindingAidJob": ERROR(FOP): at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
[info] [2018-11-21 06:28:56] Job 4568 "arFindingAidJob": ERROR(FOP): at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
[info] [2018-11-21 06:28:57] Job 4568 "arFindingAidJob": ERROR(FOP): at org.apache.fop.cli.Main.startFOP(Main.java:180)
[info] [2018-11-21 06:28:57] Job 4568 "arFindingAidJob": ERROR(FOP): at org.apache.fop.cli.Main.main(Main.java:217)
[info] [2018-11-21 06:28:57] Job 4568 "arFindingAidJob": ERROR(FOP): 
[info] [2018-11-21 06:28:57] Job 4568 "arFindingAidJob": Job finished.

Dan Gillean

unread,
Nov 21, 2018, 11:08:40 AM11/21/18
to ica-ato...@googlegroups.com
Hi Dan, 

When we install AtoM, we install Java openjdk-8-jre-headless for use with Elasticsearch. Apache FOP also requires Java, but there can be conflicts if you try to use openjdk there as well, so instead we explicitly recommend the following installation command: 
  • sudo apt install --no-install-recommends fop libsaxon-java

Did you use that command at installation time?

I also noticed that in the job log, there's a permission denied message. I'm wondering if there might be a filesystem permissions issue? You could try resetting the permissions by running the following command from the root AtoM installation directory: 
  • sudo chown -R www-data:www-data /usr/share/nginx/atom
I would restart services after and clear the application cache, to see if this helps. 
  • sudo systemctl resrtart php7.0-fpm
  • sudo systemctl restart memcached
  • sudo systemctl restart atom-worker
  • php symfony cc
Let us know if that helps. Otherwise, I will see if our developers might have further suggestions. 

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory


--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To post to this group, send email to ica-ato...@googlegroups.com.
Visit this group at https://groups.google.com/group/ica-atom-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/e87238c2-c944-4059-a090-ff630b1b50ae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

danc...@gmail.com

unread,
Nov 27, 2018, 5:42:24 AM11/27/18
to AtoM Users
Hi Dan,
 
thanks for your reply, i have only just got a chance to have another look at this.

 I would have followed the instructions on the initial install so should have run that command.
But i just ran it again (sudo apt install --no-install-recommends fop libsaxon-java)  and got the following:


fop is already the newest version 1:2.1-2
libsaxon-java is already the newest version 1:6.5.5-10

it then says a bunch of packages were automatically installed and are no longer required



i also ran the rest of the commands you posted, they all worked except the last one (could not open input file: symfony)


But the important thing is the reports are now generating and downloading correctly

thanks for your help.

Dan Gillean

unread,
Nov 27, 2018, 10:39:02 AM11/27/18
to ica-ato...@googlegroups.com
Hi Dan, 

Glad to hear it's working!

Generally, when I see messages like "could not open input file: symfony," it's because the command was run in the wrong location. All AtoM command-line tasks (i.e. all of those that start with "php symfony") need to be run from AtoM's root installation directory, which is /usr/share/nginx/atom if you have followed our recommended installation instructions. 

The following slide deck might be useful as a reference if you run into any future issues - it outlines AtoM's most common command-line tasks for maintenance and troubleshooting: 
Additionally, see the new Troubleshooting page we've added to the 2.5 documentation - pretty much everything in there will apply to 2.4 as well: 
Regards, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory

--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To post to this group, send email to ica-ato...@googlegroups.com.
Visit this group at https://groups.google.com/group/ica-atom-users.
Reply all
Reply to author
Forward
0 new messages