Copy link to clipboard
Copied
Suddenly getting java.lang.NullPointerException coldfusion.CfmServlet.init(http://CfmServlet.java:99) errors for ColdFusion 2021 server instances that are started using a Windows Service config using an Active Directory account rather than the Local System account.
I have the sames setup on both CF2018 and 2021 servers and haven't seen this issue before. Seems to have started happening after a Windows Update and subsequent reboot. KB5001347. I did uninstall it, but that' didnt' resolve the issue. If I change the Windows Service login back to Local System, site performs as expected.
Here's what is being returned by the server.
HTTP Status 500 – Internal Server Error
Type Exception Report
Message java.lang.NullPointerException
Description The server encountered an unexpected condition that prevented it from fulfilling the request.
Exception
javax.servlet.ServletException: java.lang.NullPointerException coldfusion.bootstrap.ClassloaderHelper.initServletClass(ClassloaderHelper.java:145) coldfusion.bootstrap.BootstrapServlet.init(BootstrapServlet.java:111) org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359) org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:459) org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:888) org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1597) org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) java.base/java.lang.Thread.run(Thread.java:834)
Root Cause
java.lang.NullPointerException coldfusion.CfmServlet.init(CfmServlet.java:99) coldfusion.bootstrap.ClassloaderHelper.initServletClass(ClassloaderHelper.java:137) coldfusion.bootstrap.BootstrapServlet.init(BootstrapServlet.java:111) org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359) org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:459) org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:888) org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1597) org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) java.base/java.lang.Thread.run(Thread.java:834)
Note The full stack trace of the root cause is available in the server logs.
Apache Tomcat/9.0.41
Any ideas?
Thank you,
Eric
Copy link to clipboard
Copied
That error message is likely the result of an incorrectly installed update. I would suggest you do the following:
a) reinstall the ColdFusion packages; or
b) reinstall ColdFusion 2021.
a) Steps to reinstall the ColdFusion packages:
Proceed to b) only if a) still doesn't help:
b) Steps to reinstall ColdFusion 2021:
Handy reference: https://helpx.adobe.com/coldfusion/kb/coldfusion-2021-update-1.html
Copy link to clipboard
Copied
Thanks for the response BKBK. Prior to this, I did discover, that the service account wasn't in the local administrators group and once I did that the site did in fact load and work correct. I have 6 sites mapped to 6 different CF instances and they all worked once their service account was placed in the local administrators group. I thought I'd give the lockdown tool a try since I'd prefer that the CF service accounts not be in the local administrators group if they don't have to be.
With that thought in mind I followed the advice of Adobe Premier Support. I removed the Service account from the local administrators group and installed the ColdFusion Lockdown tool and ran it against an instance. That actually fixed the issue so that the connector could talk to the ColdFusion instance, but then permissions for application code stored outside of the instance root prevented objects from being created. I then granted the service account full control on those directories directly using Windows Exploer, but that didn't fix the issue.
At that point I decided to delete the instance and recreate it. Now I'm getting port conflict errors. I think I'm going to completely uninstall all the instances and ColdFusion and start over. I think that'll take less time than continueing to troubleshoot this. BTW, I had already installed Update 1 on all the instances on the server and they were working. I have found that doing it through the CF administrator against all instances tends to fail. Best to just install the update via the command line on each instance.
Copy link to clipboard
Copied
Thanks for sharing your experiences.