Lucee 6.2.1.122 Not saving setting and red 500 on restart

On 1 system I have Lucee 6.2.0.321 and that works fine.
It is running Rocky 9
Tomcat 9.0.102
Java 21.0.6

On another system I have loaded up
Lucee 6.2.1.122
It is running Rocky 9
Tomcat 9.0.102
Java 24.0.1

Both are deployed using the Lucee WAR files.

Other then a slightly newer Java, the systems are configured identically, with all the folders and read/write/executes set the same.

However, on Lucee 6.2.1.122 when I change the settings and press the restart lucee button, the page throws up a red 500, and the grey loading overlay comes up and just stays there with Please Wait…

When I refresh the page, Lucee does not load anymore. I have to restart Tomcat to bring Lucee back and it required the password.txt file.

The 1st time this occured there as a big error message, which I am trying to figure out how to get back up, and all I can remember is something was null (I know, big help).

But I found a single error log file in the logs folder that looks like the error that I saw:

"Severity","ThreadID","Date","Time","Application","Message"
"ERROR","ajp-nio-0:0:0:0:0:0:0:0-8009-exec-9","05/07/2025","13:14:28","","java.lang.NullPointerException: Cannot invoke ""org.osgi.framework.BundleContext.installBundle(String, java.io.InputStream)"" because ""context"" is null;java.lang.NullPointerException: Cannot invoke ""org.osgi.framework.BundleContext.installBundle(String, java.io.InputStream)"" because ""context"" is null;java.lang.NullPointerException: Cannot invoke ""org.osgi.framework.BundleContext.installBundle(String, java.io.InputStream)"" because ""context"" is null;Cannot invoke ""org.osgi.framework.BundleContext.installBundle(String, java.io.InputStream)"" because ""context"" is null;lucee.runtime.exp.NativeException: java.lang.NullPointerException: Cannot invoke ""org.osgi.framework.BundleContext.installBundle(String, java.io.InputStream)"" because ""context"" is null
	at lucee.loader.engine.CFMLEngineFactory.initEngine(CFMLEngineFactory.java:687)
	at lucee.loader.engine.CFMLEngineFactory._restart(CFMLEngineFactory.java:902)
	at lucee.loader.engine.CFMLEngineFactory.restart(CFMLEngineFactory.java:881)
	at lucee.runtime.config.ConfigAdmin.restart(ConfigAdmin.java:3947)
	at lucee.runtime.tag.Admin.doRestart(Admin.java:935)
	at lucee.runtime.tag.Admin._doStartTag(Admin.java:847)
	at lucee.runtime.tag.Admin.doStartTag(Admin.java:359)
	at restart_cfm$cf.call(/admin/restart.cfm:5)
	at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:1112)
	at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:1006)
	at lucee.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:213)
	at lucee.runtime.listener.ModernAppListener.onRequest(ModernAppListener.java:100)
	at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2810)
	at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2797)
	at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2768)
	at lucee.runtime.engine.Request.exe(Request.java:45)
	at lucee.runtime.engine.CFMLEngineImpl._service(CFMLEngineImpl.java:1109)
	at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:1066)
	at lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:97)
	at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:42)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:623)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:199)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:168)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:168)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:346)
	at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:424)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:935)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1792)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
	at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1189)
	at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:658)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
	at java.base/java.lang.Thread.run(Thread.java:1447)
Caused by: javax.servlet.ServletException: java.lang.NullPointerException: Cannot invoke ""org.osgi.framework.BundleContext.installBundle(String, java.io.InputStream)"" because ""context"" is null
	... 42 more
Caused by: java.lang.NullPointerException: Cannot invoke ""org.osgi.framework.BundleContext.installBundle(String, java.io.InputStream)"" because ""context"" is null
	at lucee.loader.osgi.BundleUtil.installBundle(BundleUtil.java:76)
	at lucee.loader.osgi.BundleUtil.addBundle(BundleUtil.java:68)
	at lucee.loader.osgi.BundleUtil.addBundle(BundleUtil.java:47)
	at lucee.loader.osgi.BundleLoader.loadBundles(BundleLoader.java:127)
	at lucee.loader.engine.CFMLEngineFactory.initEngine(CFMLEngineFactory.java:671)
	... 41 more

I am going to wait a little bit if anyone wants to get more information/troubleshoot before I go and test out Lucee 6.2.0.321 to see if I get the same error/issues.

Java 24 isn’t officially supported yet and if you using a modern java, I’d be sticking to at least tomcat 10.1 for java 21 and tomcat 11 for java 24

could also be a permissions issue?

1 Like

I checked the permissions, they are all identical to the other installs I have. I will see if Java 21 gives an issue.

I should mention I tried Tomcat 10 but I could not get Lucee 6 to work with it. And when I was researching why, there was a post on the forum that 3 additional files were needed if you were not using the packaged Lucee and a recipe would eventually by made for the configuration, but I have not seen that recipe appear, so I do not know what 3 files were needed.

any reason you aren’t just using the official installer, express or docker images?

they are all battle tested and known to work!

1 Like
  1. I use Virtualmin as my domain controller with Apache on the front end and Tomcat on the backend.
  2. I am familiar with setting up Tomcat and WAR files on my servers.
  3. I have never messed with docker, so I am not familiar with how to reverse proxy thru apache to a docker (or even how to mess with docker).
  4. The installer is self contained Tomcat/Jetty and I would have to mess with it to figure out how to reverse proxy to it via apache as well as adjust the ports, etc, and at this moment I do not have time to dig into that.
  5. Finally - all the other versions of testing with Lucee (v5 and a few v6) have been flawless

Moved to JDK-21 and still the same error. I will move to an older version of Lucee and see if it is misconfig I have somewhere or something else.

if you diff Lucee express against a vanilla copy of tomcat, you can see exactly what’s changed / been added.

The installer is only Tomcat, optionally a JRE and just the required jars and a welcome page, there’s no jetty

Express is almost identical, just without the nested tomcat folder, so a slightly different folder structure, both are generated from the same build process

The latest snapshots, now also include the original conf files so you can diff them to see what has been modified

I will have a look into it, probably tonight. I Live stream my coding explorations on Twitch, and I have been thinking of what to test next, and this seems like it could be something to check out and hack into my test server.

don’t be shy, feel free to link your twitch here if you like, I’m sure people would be interested!

My Twitch account is: Twitch

As for the Lucee issue of 6.2.1.122, I downgraded to 6.2.0.321 and it does not have the problem listed above.

However! I am going to redownload the WAR and try again to rule out any missing files, bad permissions, etc.

Went back with a fresh copy of 6.2.1.122, still throws the same error.

And just to reiterate, Lucee stops completely, and I have to restart Tomcat to load it again.

Does this work if you unzip it and run?

https://cdn.lucee.org/lucee-express-6.2.1.122.zip

Yes, it runs like the other versions.

Did a little test. I took the lucee-server folder in that zip file, and copied it on top of the 6.2.1.122 lucee-server folder and it works.

Cool, progress!

I’d then suggest doing a diff between the not working instance against the working instance so see if you find find a clue what’s different and causing the problem?

It’s more likely to be related to the Tomcat config…

I do not know what I am looking for in the differences. I have attached the file since there is alot of scrolling.
Differences.txt (132.5 KB)

nothing jumps out,

Can you do the same for the whole top level tomcat dir, minus the lucee-server folder and any *.logs files,

I’d expect the problem to be related with xml, properties, conf and jar

I am not sure how that will help. The only change I did was copy the lucee-server from the express zip file on top of the war’s lucee-server file and it worked like normal. So the issue lies with what ever is different between the lucee-server in express file to the war file.

Ignore