Unable to install print plugin in a deployed and working Mapstore

153 views
Skip to first unread message

xavi...@gmail.com

unread,
Aug 5, 2021, 5:00:27 AM8/5/21
to mapstore-users
Hi all,
I have tried it in several ways but I can't install de the print plugin.
I have tried to create the zip file using mvn clean install -Pprintingbundle. but it wasn't created because I don't have a pom.xml file in my installation. Is this normal?
I'm usning version 2021.01.00 and deployed a war file using tomcat.
Is there a way to download the printing module zip file directly?
Or an installation of mapstore including the printing module?


Thank you very much!

xavi

Tobia Di Pisa

unread,
Aug 5, 2021, 5:28:09 AM8/5/21
to mapstor...@googlegroups.com
Dear Xavi,

it is really strange that you don't have a pom file in your checkout 2021.01.00 has it.
Anyway, you can find the related documentation on how to include the printing module here.
You can also find all packages released with 2021.01.00 here.

Best regards,
     Tobia Di Pisa

--
You received this message because you are subscribed to the Google Groups "mapstore-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapstore-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mapstore-users/9becb7b6-7d41-4187-8311-b75483a3b8bcn%40googlegroups.com.


--


==
GeoServer Professional Services from the experts!

Visit http://bit.ly/gs-services-us for more information.
==
Dott. Ing. Tobia Di Pisa
Technical Lead / Project Manager


GeoSolutions Group
phone: +39 0584 962313
fax:      +39 0584 1660272

https://www.geosolutionsgroup.com/
http://twitter.com/geosolutions_it
-------------------------------------------------------


Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.

This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.

xavi rayo

unread,
Aug 5, 2021, 6:34:40 AM8/5/21
to mapstor...@googlegroups.com
Dear Tobia,
thank you very much for your help. I'll try to use the zip file from the link you give, and see if it works. 
I don't know why I don't have the pom.xml, but I'm thinking of moving to the latest version soon and I guess this will be solved.
I'll tell you if I managed to install the printing plugin.

thanks! 

Missatge de Tobia Di Pisa <tobia....@geosolutionsgroup.com> del dia dj., 5 d’ag. 2021 a les 11:28:

xavi...@gmail.com

unread,
Aug 31, 2021, 7:06:09 AM8/31/21
to mapstore-users
Dear Tobia,
I installed the latest version of Mapstore and managed to make the plugin visible in the burger menu. But when I try to print the map, an error message appears and I can't print the map.
This is the message:
Error on printing: Error while generating PDF: java.io.IOException: Read-only file system at java.base/java.io.UnixFileSystem.createFileExclusively(Native Method) at java.base/java.io.File.createTempFile(File.java:2092) at org.mapfish.print.servlet.MapPrinterServlet.doCreatePDFFile(MapPrinterServlet.java:390) at org.mapfish.print.servlet.MapPrinterServlet.createPDF(MapPrinterServlet.java:190) at org.mapfish.print.servlet.MapPrinterServlet.doPost(MapPrinterServlet.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:660) at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:688) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:367) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1639) 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:834)

Thanks again for your help,

xavi
El dia dijous, 5 d’agost de 2021 a les 12:34:40 UTC+2, xavi...@gmail.com va escriure:

Tobia Di Pisa

unread,
Aug 31, 2021, 8:02:54 AM8/31/21
to mapstor...@googlegroups.com
Dear Xavi,

It seems simply a matter of File System permissions on the directory where MS tries to create the PDF file of the print:
Error on printing: Error while generating PDF: java.io.IOException: Read-only file system at java.base/java.io.UnixFileSystem.createFileExclusively(Native Method) at java.base/java.io.File.createTempFile(File.java:2092) at org.mapfish.print.servlet

Best regards,
     Tobia Di Pisa

xavi...@gmail.com

unread,
Sep 1, 2021, 7:57:06 AM9/1/21
to mapstore-users
Dear Tobia,
I understand, but where can I change these permissions or modify the directory? I thougth the user could decide where to save the PDF files.

Thanks again for your help!

El dia dimarts, 31 d’agost de 2021 a les 14:02:54 UTC+2, tobia.dipisa va escriure:

Lorenzo Natali

unread,
Sep 1, 2021, 8:45:30 AM9/1/21
to mapstore-users
Hi, 
MapStore needs to store on the host file-system the file temporary, to allow the download to the user.

You can configure the directory where to store these temp files by passing the MAPFISH_PDF_FOLDER java property to your java instance. 

xavi rayo

unread,
Sep 8, 2021, 8:40:32 AM9/8/21
to mapstor...@googlegroups.com
Hi Lorenzo,
thank you very much for your answer. 
Should it be declared in the setenv.sh file that I also use to create the connection to the geostore database?
I've tried it like this and stil it does not work.


#Path to the ovr file

GEOSTORE_OVR_FILE=file:///usr/share/tomcat9/bin/geostore-ovr.properties

# add the env. variable 'geostore-ovr' to JAVA_OPTS

MAPFISH_PDF_FOLDER="/var/lib/tomcat9/work/Catalina/localhost/mapstore/pdf_temp/" 

JAVA_OPTS="-Dgeostore-ovr=$GEOSTORE_OVR_FILE"


Thank you very much again!


xavi


Missatge de Lorenzo Natali <lorenzo...@geosolutionsgroup.com> del dia dc., 1 de set. 2021 a les 14:45:
You received this message because you are subscribed to a topic in the Google Groups "mapstore-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapstore-users/qLVx9iAoUQ0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapstore-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mapstore-users/fb726b14-0549-4fb7-9b68-b1d2e4cce1e1n%40googlegroups.com.

Lorenzo Natali

unread,
Sep 8, 2021, 9:47:13 AM9/8/21
to mapstor...@googlegroups.com
It have also to be added to JAVA_OPTS, this way (remember the "-D" ):

#Path to the ovr file
GEOSTORE_OVR_FILE=file:///usr/share/tomcat9/bin/geostore-ovr.properties
# add the env. variable 'geostore-ovr' to JAVA_OPTS
MAPFISH_PDF_FOLDER="/var/lib/tomcat9/work/Catalina/localhost/mapstore/pdf_temp/"
JAVA_OPTS="-Dgeostore-ovr=$GEOSTORE_OVR_FILE -DMAPFISH_PDF_FOLDER=$MAPFISH_PDF_FOLDER"

Reply all
Reply to author
Forward
0 new messages