Still on my journey to launch a server instance from a user data script, I’m getting there, but I’m stuck in the adding a datasource step.
I’m creating a temporary .cfm
file to run once then be deleted, this contains:
I confirmed this works on my local CommandBox dev machine (Lucee 5.4.6.9)
Servlet container: WildFly / Undertow - 2.2.37.Final
Java 11.0.26
Mac OS X (12.7.2) 64bit
Does not work on Alma 9 install using the latest Lucee installer (Lucee 6.2.0.321)
I’ll look at a submitting a bug report, not done before…
You can snip out the middle section (where you see the cfc/cfml line), it’s always the same with Catalina etc, but there’s often a caused by section (s) at the bottom which should be always included
lucee.runtime.exp.NativeException: Cannot invoke "java.sql.Connection.close()" because "this.connection" is null
at lucee.runtime.db.DatasourceConnectionImpl.close(DatasourceConnectionImpl.java:295)
at lucee.runtime.tag.Admin._doVerifyDatasource(Admin.java:2920)
at lucee.runtime.tag.Admin.doUpdateDatasource(Admin.java:2699)
at lucee.runtime.tag.Admin._doStartTag(Admin.java:729)
at lucee.runtime.tag.Admin.doStartTag(Admin.java:359)
at config_db_cfm$cf$4d.call(/config_db.cfm:25)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:1063)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:987)
at lucee.runtime.listener.ClassicAppListener._onRequest(ClassicAppListener.java:63)
at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:42)
at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2785)
at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2772)
at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2743)
at lucee.runtime.engine.Request.exe(Request.java:45)
at lucee.runtime.engine.CFMLEngineImpl._service(CFMLEngineImpl.java:1099)
at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:1056)
at lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:97)
at lucee.loader.servlet.jakarta.CFMLServlet.service(CFMLServlet.java:49)
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:195)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
at org.apache.catalina.filters.RemoteIpFilter.doFilter(RemoteIpFilter.java:924)
at org.apache.catalina.filters.RemoteIpFilter.doFilter(RemoteIpFilter.java:980)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:483)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:663)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:397)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:905)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1743)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException: Cannot invoke "java.sql.Connection.close()" because "this.connection" is null
... 45 more
I tried adding the verify attribute (my local dev box doesn’t require this) same error.
I also checked in on another Alma 9 working install I have running serving my dev site and got the same error.
Yes it does, though its not entirely obvious which attributes in the cfadmin tag map to which items in the actual admin interface and there appears to be no clear definition I can find. Most use values that are placeholders of variables rather than examples of the format of the data
I have now got pretty much everything working - apart from the add datasource…