Lucee 5 JAR install on Ubuntu 16.04 with Tomcat 7

Having a tough time getting Lucee 5 installs running on Ubuntu 16.04 using
jars. Create the base of our Ansible scripts from
GitHub - foundeo/ubuntu-nginx-lucee: Script for standing up a Lucee server using nginx and Tomcat on Ubuntu and hoping to backport fixes
to ours back to foundeo.
lucee / Lucee / wiki / Lucee 5 Upgrading Railo — Bitbucket results in
a blocked page for me and might hold the keys, but I’m currently getting
the errors below after installing in catalina.out:

WARNING: A context path must either be an empty string or start with a ‘/’
and do not end with a ‘/’. The path [/] does not meet these criteria and
has been changed to []
Jun 21, 2016 1:12:33 PM org.apache.catalina.startup.TldConfig execute
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable
debug logging for this logger for a complete list of JARs that were scanned
but no TLDs were found in them. Skipping unneeded JARs during scanning can
improve startup time and JSP compilation time.
Jun 21, 2016 1:12:33 PM org.apache.catalina.core.ContainerBase
addChildInternal
SEVERE: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1259)
at
org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1998)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoSuchMethodError:
org.apache.tomcat.JarScanner.scan(Lorg/apache/tomcat/JarScanType;Ljavax/servlet/ServletContext;Lorg/apache/tomcat/JarScannerCallback;)V
at org.apache.jasper.servlet.TldScanner.scanJars(TldScanner.java:250)
at org.apache.jasper.servlet.TldScanner.scan(TldScanner.java:106)
at
org.apache.jasper.servlet.JasperInitializer.onStartup(JasperInitializer.java:103)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5573)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
… 10 more

Jun 21, 2016 1:12:33 PM org.apache.catalina.startup.HostConfig
deployDirectory
SEVERE: Error deploying web application directory
/var/lib/tomcat7/webapps/ROOT
java.lang.IllegalStateException: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:903)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1259)
at
org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1998)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Realized that I was actually download the jar file and treating it as a zip
and then unzipping it. Still Monday to me I guess.

Let’s assume I start with a nice fresh Ubuntu 16.04 instance with Java 8 /
Tomcat 7 (hoping to get to Tomcat 8 but in due time).
catalina_home is set to /usr/share/tomcat7.
java_home is set to /usr/lib/jvm/java-8-openjdk-amd64/bin.

Goal:

Download Lucee jars to /opt/lucee/<version folder>/lucee.jar and then
symlink to /opt/lucee/current/lucee.jar which makes it easiest for us and
Ansible to detect if we are on the version of Lucee we want to be.

What changes need to be done from here? Apologies for the “Do it for me,
I’m helpless” kind of question, but I’m hoping to distill documentation out
of this for a number of sources.

Looks like I had the common.loader setup correctly, but somewhere along the
line blanked out all scanning of JARs which was forcing nothing to load.
Derp. Copied the other values out of lucee-express and started to get Lucee
errors finally! Knew it had to be something in that file as you pointed to
it and the other stuff would only seem to matter if Lucee was getting
loaded. Thank for the help. Greatly appreciated!

Noticed I had to create what looks like a ‘{tomcat_home}/lucee-server’
directory with permissions that Lucee is running under. In this round I
stuck to the simple config close to lucee-express. Would setting
lucee-server-directory / lucee-web-directory change this location to
something I can control? Would love to keep it under /opt/lucee.