Enable Marlin on Tomcat 8 Windows

276 views
Skip to first unread message

Derek Watling

unread,
Nov 24, 2015, 9:22:14 AM11/24/15
to marlin-renderer
I come from a Windows background and I am trying to enable Marlin to work with GeoServer on a Windows server.

I am running Tomcat 8.0.9 with the Geoserver WAR deployment.
  • I created a Marlin subdirectory in the Java directory, downloaded the Marlin 0.7.1 jar files and copied them to C:\Program Files\Java\Marlin\
  • I then opened the Tomcat monitor application and
  1. on the "Startup" tab added
    java -Xbootclasspath/a:"C:\Program
    Files\Java\Marlin\marlin-0.7.1-Unsafe.jar"
    to the arguments, above "start",
  2. and on the "Java" tab added
    -Dsun.java2d.renderer=org.marlin.pisces.PiscesRenderingEngine

    to the end of the Java Options
  3. restarted Tomcat and checked the log file
    C:\Program Files\Apache Software Foundation\Tomcat 8.0\logs\tomcat8-stderr.2015-11-24.log

    Can't find any reference to Marlin in this log.


Where am I going wrong?

Laurent Bourgès

unread,
Nov 24, 2015, 9:37:54 AM11/24/15
to marlin-...@googlegroups.com
Hi,

You could look at this topic on the forum:
https://groups.google.com/forum/#!topic/marlin-renderer/JXNNZDSqxFU

You'll get Marlin information in the tomcat logs once you have sent a map request.

You could use the simple test scripts I wrote:
https://github.com/bourgesl/marlin-renderer/tree/master/tomcat_samples

Laurent

Derek Watling

unread,
Nov 24, 2015, 11:04:05 AM11/24/15
to marlin-renderer
Thank you for the response.

I downloaded the test scripts and ran draw_shape.jsp which draws a red diamond on a white background. I then ran check_renderer.jsp and get the following output:

Current RenderingEngine implementation:

sun.dc.DuctusRenderingEngine

System properties:

sun.java2d.renderer = org.marlin.pisces.PiscesRenderingEngine

Marlin options (if enabled)

sun.java2d.renderer.useThreadLocal = true
sun.java2d.renderer.pixelsize = 2048

The only catalina log files I can find are in "C:\Program Files\Apache Software Foundation\Tomcat 8.0\logs" and named with the date, eg. "catalina.2015-11-24.log". While I can see this log is being updated it dose not contain any reference to "Marlin" or "PiscesRenderingEngine".

I have tried with adding C:\Program Files\Java\Marlin\marlin-0.7.1-Unsafe.jar to the Java Classpath on the "Java" tab in the Tomcat monitor application and adding java -Xbootclasspath/a:"C:\Program Files\Java\Marlin\marlin-0.7.1-Unsafe.jar" to the Arguments on the "Startup" tab, re-starting Tomcat after each change and re-running draw_shape.jsp and check_renderer.jsp. I get the same result each time!

Laurent Bourgès

unread,
Nov 24, 2015, 12:36:10 PM11/24/15
to marlin-...@googlegroups.com

Hi,

Your tests reports you are using Ductus not Marlin yet!

I guess your command line is wrong:


java -Xbootclasspath/a:"C:\Program Files\Java\Marlin\marlin-0.7.1-Unsafe.jar"

Try without quotes and using slashes not backslashes (unix like):
java -Xbootclasspath/a:C:/Program~1/Java/Marlin/marlin-0.7.1-Unsafe.jar

It is a typical issue with long file names on windows....
Maybe move it to a simpler folder like c:/marlin/...

Please tell me if it works then.

Laurent

Derek Watling

unread,
Nov 25, 2015, 3:04:09 AM11/25/15
to marlin-renderer
Hi Laurent

The Java Classpath is already set to
    C:\Program Files\Apache Software Foundation\Tomcat 8.0\bin\bootstrap.jar;C:\Program Files\Apache Software Foundation\Tomcat 8.0\bin\tomcat-juli.jar
and I appended
    ;C:\Program Files\Java\Marlin\marlin-0.7.1-Unsafe.jar

Using the Startup arguments I tried
    java -Xbootclasspath/a:C:/Program~1/Java/Marlin/marlin-0.7.1-Unsafe.jar
but get exactly the same result as before.

Derek

Andrea Aime

unread,
Nov 25, 2015, 3:19:00 AM11/25/15
to marlin-...@googlegroups.com
Makes me wonder if the params are really passed onto the JVM that's running
Tomcat.

On linux it would be trivial to check, on Windows it seems you have to download
an extra program (looks like one of the well known sysinternals utils), see here:

Might be worth checking

Cheers
Andrea


--
You received this message because you are subscribed to the Google Groups "marlin-renderer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to marlin-render...@googlegroups.com.
To post to this group, send email to marlin-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
==
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.
==

Ing. Andrea Aime 
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy


AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

 

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility  for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


-------------------------------------------------------

Laurent Bourgès

unread,
Nov 25, 2015, 3:32:48 AM11/25/15
to marlin-...@googlegroups.com
Hi Derek,

Marlin should be added to the JVM classpath ie using -Xbootclasspath/a (append) only to be loaded by the java2d RenderingEngine (not the java classpath) !

I do not remember what is the shortened path for "C:\Program Files\"; I tested on windows 7 (virtual box), it's "C:\PROGRA~1\"

Please try:

  java -Xbootclasspath/a:C:\PROGRA~1\Java/Marlin/marlin-0.7.1-Unsafe.jar

Are you sure that the tomcat monitor application really supports giving command line options ?


PS: I usually use the setenv.bat in the tomcat folder (to set environment variables).

Laurent

Derek Watling

unread,
Nov 25, 2015, 7:56:02 AM11/25/15
to marlin-...@googlegroups.com
Hi Andrea

I have tried these programs, but can only see how Tomcat is loaded. I can't see not how Tomcat loads the Java JVM, or even see a Java process.

Derek

Derek Watling
Cell: 082 562 4698

--
You received this message because you are subscribed to a topic in the Google Groups "marlin-renderer" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/marlin-renderer/PNUcQ0qZfXw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to marlin-render...@googlegroups.com.

Derek Watling

unread,
Nov 25, 2015, 8:26:10 AM11/25/15
to marlin-renderer
Hi Laurent and Andrea

Thank you for all the help. Finally got it working.

Under "Java Options" on Tomcat's "Java" tab I added the following 2 lines, as shown by the red arrows:
-Xbootclasspath/a:C:\Program Files\Java\Marlin\marlin-0.7.1-Unsafe.jar
-Dsun.java2d.renderer=org.marlin.pisces.PiscesRenderingEngine



After re-starting Tomcat and running draw_shape.jsp / check_renderer.jsp again I now get:

Current RenderingEngine implementation:

org.marlin.pisces.PiscesRenderingEngine


And in the tomcat8-stdout.2015-11-25.log file I now have:

INFO: ===============================================================================
INFO: Marlin software rasterizer           = ENABLED
INFO: Version                              = [marlin-0.7.1-Unsafe]
INFO: sun.java2d.renderer                  = org.marlin.pisces.MarlinRenderingEngine
INFO: sun.java2d.renderer.useThreadLocal   = true
INFO: sun.java2d.renderer.useRef           = soft
INFO: sun.java2d.renderer.pixelsize        = 2048
INFO: sun.java2d.renderer.subPixel_log2_X  = 3
INFO: sun.java2d.renderer.subPixel_log2_Y  = 3
INFO: sun.java2d.renderer.tileSize_log2    = 5
INFO: sun.java2d.renderer.blockSize_log2   = 5
INFO: sun.java2d.renderer.blockSize_log2   = 5
INFO: sun.java2d.renderer.forceRLE         = false
INFO: sun.java2d.renderer.forceNoRLE       = false
INFO: sun.java2d.renderer.useTileFlags     = true
INFO: sun.java2d.renderer.useTileFlags.useHeuristics = true
INFO: sun.java2d.renderer.rleMinWidth      = 40
INFO: sun.java2d.renderer.useSimplifier    = false
INFO: sun.java2d.renderer.doStats          = false
INFO: sun.java2d.renderer.doMonitors       = false
INFO: sun.java2d.renderer.doChecks         = false
INFO: sun.java2d.renderer.useLogger        = false
INFO: sun.java2d.renderer.logCreateContext = false
INFO: sun.java2d.renderer.logUnsafeMalloc  = false
INFO: Renderer settings:
INFO: CUB_COUNT_LG = 2
INFO: CUB_DEC_BND  = 20.0
INFO: CUB_INC_BND  = 8.0
INFO: QUAD_DEC_BND = 8.0
INFO: sun.java2d.renderer.gamma            = 1.0
INFO: ===============================================================================

Derek 
Auto Generated Inline Image 1

Laurent Bourgès

unread,
Nov 25, 2015, 11:04:05 AM11/25/15
to marlin-...@googlegroups.com
Derek,

Congratulations !

Sorry, I never used that the Tomcat monitor application but it is interesting to know that it exists and is useful.


Enjoy Marlin with geoserver,

Laurent
Reply all
Reply to author
Forward
0 new messages