Replace Lucee Admin with Application.cfc settings

I want to put all the settings for my app into Application.cfc and completely by-pass the server/web control in Admin.

Can anybody tell me if this is possible please. I can copy the settings using lucee-server.xml but it is messy.

Also I think it’s not possible to view these settings in the server/web admin when they have been set up by Application.cfc, but I could be wrong.

I’m also having a storage = true (storage:true) complaint from lucee as it can’t seem to find this in the Application.cfc for session storage even though it is there. I’ve tried clearing the session DB as others have done but to no avail…

TIA

Tony

Which Version? There’s only one set of settings for lucee, can you post a code snippet and the stacktrace?

Hey Zac

Using the latest version. 5.2.6.60 lucee express…

Application.cfc

// optional settings
, clob:true // default: false
, connectionLimit:100 // default:-1
, storage:true // default: false
, useSSL=false
};

/Users/Tony/Desktop/lucee-express-5.2.6.60/webapps/ROOT/xyz/index.cfm:9

Empty:null

Is this the stacktrace you mean?

Am I correct in thinking it is possible to put all the necessary items in Application.cfc, or do I need to use lucee-server.xml too?

Thanks

Tony

Admin only shows context settings, not application settings.

I mean the exception Java stack trace and the code leading up to it. Imagine you’re asking yourself for help, what do you need to diagnose the problem?

Hi Zac

This is the stacktrace from 5.2.6.59 using lucee with nginx

datasource [rsessions] is not enabled to be used as session/client storage, you have to enable it in the Lucee administrator or define key “storage=true” for datasources defined in the application event handler.
Java Stacktracelucee.runtime.exp.ApplicationException: datasource [rsessions] is not enabled to be used as session/client storage, you have to enable it in the Lucee administrator or define key “storage=true” for datasources defined in the application event handler.
at lucee.runtime.type.scope.ScopeContext.getCFSessionScope(ScopeContext.java:671)
at lucee.runtime.type.scope.ScopeContext.getSessionScope(ScopeContext.java:503)
at lucee.runtime.PageContextImpl.initApplicationContext(PageContextImpl.java:3058)
at lucee.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:118)
at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:43)
at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2405)
at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2395)
at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2363)
at lucee.runtime.engine.Request.exe(Request.java:44)
at lucee.runtime.engine.CFMLEngineImpl._service(CFMLEngineImpl.java:1091)
at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:1039)
at lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:102)
at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:51)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:676)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1132)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
at org.apache.tomcat.util.net.AprEndpoint$SocketWithOptionsProcessor.run(AprEndpoint.java:2464)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)

Tony

Are you defining a datasource?

yes - in the Application.cfc

Could you confirm that it is possible to replicate all server settings in Application.cfc please. And if it is possible to show these settings in the application context…ie in the admin/context screen.

If it is not then I will use a combination of lucee-server.xml and Application.cfc to do the job. I’m not sure if my problem is a bug or just things I’ve done!

Also using a cluster (read container) - what are the jee/cfml settings required?

Thanks

Tony

server or web admin settings are set via administrator or , application settings via application.cfc

I’m not positive about the error you’re seeing there. I do know that while most settings can be put in your Application.cfc, there are a few compile-time settings that can’t be. If your goal is simply to automate all of this stuff for deployment so there’s no step of using the web UI to configure a new server, then I’d recommend checking out CFConfig. It’s a CLI that can fully automate the management of all the XML files and it works on any version of any CF engine

1 Like

Finally got a link for the things that are controllable with Application.cfc and what is controllable by the ServerAdmin…

I will break up the settings into both lucee-server.xml and Application.cfc which helps me in the build context to keep items secure.

I’m putting lucee / nginx (lucee/lucee52-nginx) into a container using Google Container Builder.

Thanks for the help guys!