Railo 4.1: Template compilation and javaagent path

Share this post:

The latest Railo 4.1 bring “Smarter Template Compilation” (read the blog post!). In order to get it running you need to set the -javagent variable for your JVM or else you will see this message in the Administrator:

There is no Java Agent defined in this environment. The Java Agent is needed to improve memory (PermGen Space) consumption for templates. To enable the Java Agent follow this instructions: Add the “-javaagent” JVM argument and set it to point to the railo-inst.jar in this environment that would be: -javaagent:/railo-inst.jar.

The issue with my installation was that in my instance the “/” defaults to the main path and not the Tomcat one. Furthermore, I have Railo installed in a multi-deployment setup so I actually only have one Railo for all web applications. So, the obvious answer was to use the absolute path which in my case is “/Library/apache-tomcat-7.0.32/railo/WEB-INF/lib/railo-inst.jar”.

But even with the absolute path, Railo was unable to find the jar. In the end it all boiled down to pass the absolute, absolute (if that makes sense) path to the argument. In my case (on MacOS X) this is “/Volumes/Macintosh HD/Library/apache-tomcat-7.0.32/railo/WEB-INF/lib/railo-inst.jar”.

Hope this helps someone out there.

Over 10 years in business.

Self-funded. No investors. No bullshit.

More than 3,000 customers worldwide.

Helpmonks - no bullshit customer engagement service

Growth starts with action

Empower your team and delight your customers.

Helpmonks - email management for small businesses