CF11 CFEngine not Starting

I recently cloned a client’s repo on my local machine, cd’d to the root, and typed “start cfengine=adobe@11”. It appeared to download the package as it does with other cf engines, but the server isn’t starting. There’s no icon in the system tray, and when I type “stop”, it reads “server already stopped”. I get the same results with another folder I created to test the CF11 engine in CB.

I’ve set up up a number of dummy CF sites on my machine using CommandBox with other cfengines (adobe@2016, adobe@2021) and had no problems with them starting up. A message in CB reads to add “–debug --console” to the start command if the server won’t start. So I did that and the below is what output to the screen:
"…
[ERROR] java.lang.NullPointerException
[ERROR] at coldfusion.CfmServlet.init(CfmServlet.java:97)
[ERROR] at coldfusion.bootstrap.ClassloaderHelper.initServletClass(ClassloaderHelper.java:121)
[ERROR] at coldfusion.bootstrap.BootstrapServlet.init(BootstrapServlet.java:59)
[ERROR] at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:117)
[ERROR] at io.undertow.servlet.core.ManagedServlet$DefaultInstanceStrategy.start(ManagedServlet.java:309)
[ERROR] at io.undertow.servlet.core.ManagedServlet.createServlet(ManagedServlet.java:145)
[ERROR] at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:588)
[ERROR] at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:559)
[ERROR] at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
[ERROR] at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
[ERROR] at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
[ERROR] at io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:601)
[ERROR] at runwar.Server.createServletDeployment(Server.java:1360)
[ERROR] at runwar.Server.startServer(Server.java:517)
[ERROR] at runwar.Start.main(Start.java:51)
[ERROR] javax.servlet.ServletException: java.lang.NullPointerException
[ERROR] at coldfusion.bootstrap.ClassloaderHelper.initServletClass(ClassloaderHelper.java:129)
[ERROR] at coldfusion.bootstrap.BootstrapServlet.init(BootstrapServlet.java:59)
[ERROR] at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:117)
[ERROR] at io.undertow.servlet.core.ManagedServlet$DefaultInstanceStrategy.start(ManagedServlet.java:309)
[ERROR] at io.undertow.servlet.core.ManagedServlet.createServlet(ManagedServlet.java:145)
[ERROR] at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:588)
[ERROR] at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:559)
[ERROR] at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
[ERROR] at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
[ERROR] at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
[ERROR] at io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:601)
[ERROR] at runwar.Server.createServletDeployment(Server.java:1360)
[ERROR] at runwar.Server.startServer(Server.java:517)
[ERROR] at runwar.Start.main(Start.java:51)
[ERROR] Caused by: java.lang.NullPointerException
[ERROR] at coldfusion.CfmServlet.init(CfmServlet.java:97)
[ERROR] at coldfusion.bootstrap.ClassloaderHelper.initServletClass(ClassloaderHelper.java:121)
[ERROR] … 13 more
[DEBUG] Runwar: Running shutdown hook
[DEBUG] Runwar: shutdown hook:stopServer()
[INFO ] Runwar: ******************************************************************************
[INFO ] Runwar: *** stopping server ‘CF11Test’ (socket 49857)
[INFO ] Runwar: ******************************************************************************
[DEBUG] Runwar: All deployments undeployed and underlying Undertow servers stopped
[DEBUG] Runwar: Stopped server
[DEBUG] Runwar: shutdown hook joining main thread
[DEBUG] Runwar: Shutdown hook finished

Server’s output stream closed. It’s been stopped elsewhere.

Stopping server…

ERROR (5.9.0+00721)

Server process returned failing exit code [1]"

I don’t know what all of that’s telling me. The client is running their site on CF11, so using CF11 for my my local dev envi would be ideal – thanks much.

Which Java version do you have installed locally? The error looks like one you get when a class it expects is missing from the JDK

Interesting - neither Java nor the JDK had been installed yet (this is new laptop that was recently sent to me for work). But I just installed the latest JDK, version 20.0.1, restarted the PC, and I’m still getting the same output when I type “start --debug --console”.

Well, JDK 20 is not going to work as ACF versions less than 2023 are not going to run on it. CommandBox v5.9 has experimental support for JDK 17 but I don’t know that it’s tested with 20. It’s possible that you installed CommandBox with a JDK installation of its own.

The issue you are running in to is an ACF11 issue, as it can’t find a class that it needs:

[ERROR] Caused by: java.lang.NullPointerException
[ERROR] at coldfusion.CfmServlet.init(CfmServlet.java:97)
[ERROR] at coldfusion.bootstrap.ClassloaderHelper.initServletClass(ClassloaderHelper.java:121)

My suspicion is that it is a JAR that used to be in the JDK called tools.jar which versions of ACF prior to 2018 relied on to start and is not bundled with JDK versions above 8.

My suggestion for your server would be to add the following to the server.json file and use JDK8 explicitly for that server:

{
    "JVM":{
        "javaVersion":"openjdk8"
    }
}
1 Like

Thanks much, that did the trick.

My co. has a variety of clients, and the devs often use CB in place of having to install a CF or Lucee server + web server when setting up dev environments. So I figure this sort of thing will probably pop up again at some point. For learning about other CommandBox settings relevant to this situation, is there anywhere other than the OrtusBooks documentation you could recommend? I believe in RTFM, but I learn much better through tutorials and situations where I can see things in action, and see when/why things like this need to be applied. A particular series in CFCasts maybe?

I think there are some CommandBox series on CFCasts that might be helpful. @bdw429s could probably chime in on that.

I would also emphatically recommend that your client move off of ACF11. It is EOL and is no longer being maintained. There are a number of recent vulnerabilities that have been patched in 2018 and above but not in 11

1 Like

There are several community forums around and CFCasts as Jon said, but to be clear, your missing information was that Adobe 11 (which is VERY old, insecure, and unsupported!) does not run on Java 20. No CommandBox tutorial would have told you that. You’d have to look at Adobe’s own docs, which honestly probably don’t even cover ColdFusion 11 at this point.

Unless you set a javaversion like Jon showed, CommandBox will use whatever version of java the CLI is running on when starting a server. This version can be viewed in the output of the info command.

FWIW, I have considered attempting to add a feature to CommandBox to detect if the Java version being used to start a server is compat with the given CF engine, but I never bothered because it’s non-trivial to detect the version of Java just given the path to the binary (output of java -version varies across versions), and there are people who run experimental versions of Java as tests and I wouldn’t want to preclude that.

1 Like

Thanks, I’ll browse CFCasts and see what’s out there. And oh yes, we’ve gently but emphatically recommended they upgrade from 11 as well.

(@bdw429s) I’ve just run into an issue in the CF Admin for that server; I can’t get the client’s dev DB (a local MySQL DB) to connect as a data source. I tried adding the same DB as a data source to another server that’s CF 2016, and it connected with no problems. Would you have any advice on how to get that to work? I’m wondering if I’m just going to have to suck it up and run this dev site on a CF version higher than 11.

You’d need to be much more specific about what exactly didn’t work. And in a new topic, please.