Lucee on Tomcat 10?

For “fun” I tried getting Lucee to run on Tomcat 10. Looks like the .jar isn’t expanding from {catalina.base}/lib/lucee.jar to {catalina.base}/lucee-server like it normally would. I tried this on Debian and Windows with the same result. I can get it running on Tomcat 9 just fine.

Was there anything in Catalina.out to suggest why?

Here is what I saw, nothing incredibly helpful for a non-dev like me:

[2.773s][info][class,load] lucee.loader.engine.EngineChangeListener source: file:/C:/tomcat/lib/lucee.jar
16-Mar-2021 19:59:55.123 INFO [Catalina-utility-1] org.apache.catalina.core.ApplicationContext.log Marking servlet [CFMLServlet] as unavailable
16-Mar-2021 19:59:55.124 SEVERE [Catalina-utility-1] org.apache.catalina.core.StandardContext.loadOnStartup Servlet [CFMLServlet] in web application [] threw load() exception
16-Mar-2021 19:59:55.432 INFO [Catalina-utility-6] org.apache.catalina.core.ApplicationContext.log Marking servlet [CFMLServlet] as unavailable
16-Mar-2021 19:59:55.433 SEVERE [Catalina-utility-6] org.apache.catalina.core.StandardContext.loadOnStartup Servlet [CFMLServlet] in web application [/nick.com] threw load() exception

That is expected due to the transition from Java EE to Jakarta EE.

Tomcat 10 uses the new Jakarta EE packages and Lucee still uses the javax.* packages.

Your can read more about it at https://blogs.oracle.com/javamagazine/transition-from-java-ee-to-jakarta-ee or just search online for more articles.

The Apache Tomcat team publishes a tool that translates the packages automatically, watch might do the trick here, but I haven’t had the chance to try it myself.

1 Like

I know this is an old thread. I imagine people are still trying to get this working.

I tried getting tomcat working using the tool to no avail. Its really easy to use, you simply drop the war in a javaee-webapps instead of the normal webapps folder and it does the Jakarta migrations and expands like normal into the context. This wasn’t enough. It still throws the same servlet exception.

Side-note, I also tried to manually update Lucee to use the new jakarta.servlet etc and I can get all the way through the build until its including OSGI bundles where it stalls out. The bundles themselves will also need to be updated and I don’t think I have access to the source for those.

Would be nice to get this working though as its the first step in getting ahead of time compilation working.