Uploaded image for project: 'Lucee Development'
  1. LDEV-1397

Setting client storage to database does not work and fills scope.log with errors

    Details

    • Type: Bug
    • Status: Rejected
    • Priority: New
    • Resolution: Fixed
    • Affects Version/s: 5.2.1.9
    • Fix Version/s: 5.2.2.29
    • Labels:
      None
    • Environment:

      Windows 2008R2, IIS, MSSQL

      Description

      When setting Lucee to store the client scope in a database (for clustering), it does not work and fills the scope.log file with multiple errors for every page request. It appears that there is a bug in the Lucee code that is attempting to use the application name as the datasource instead of the specified datasource.

      Note that it does work correctly for SESSION storage, just not CLIENT storage.

      Notice in the errors below that the datasource name that is being attempted is my APPLICATION NAME, instead of the "lucee_sessions" datasource that is defined.

      In my application.cfc...
      this.name = 'my-app-name';
      this.clientManagement = true;
      this.clientStorage = "lucee_sessions"; // this is a valid datasource set to storage:true
      this.clientCluster = true;

      Errors in scope.log
      "ERROR","Thread-75552","06/26/2017","07:20:18","scope-context","datasource [my-app-name] doesn't exist
      lucee.runtime.exp.DatabaseException: datasource [my-app-name] doesn't exist
      at lucee.runtime.exp.DatabaseException.notFoundException(DatabaseException.java:199)
      at lucee.runtime.PageContextImpl.getDataSource(PageContextImpl.java:3395)
      at lucee.runtime.type.scope.storage.IKHandlerDatasource.store(IKHandlerDatasource.java:85)
      at lucee.runtime.type.scope.storage.IKStorageScopeSupport.store(IKStorageScopeSupport.java:408)
      at lucee.runtime.type.scope.storage.IKStorageScopeSupport.getInstance(IKStorageScopeSupport.java:191)
      at lucee.runtime.type.scope.ScopeContext.getClientScope(ScopeContext.java:245)
      at lucee.runtime.type.scope.ScopeContext.getClientScopeEL(ScopeContext.java:280)
      at lucee.runtime.PageContextImpl.clientScopeEL(PageContextImpl.java:1405)
      at lucee.runtime.type.scope.UndefinedImpl.reinitialize(UndefinedImpl.java:599)
      at lucee.runtime.PageContextImpl.setApplicationContext(PageContextImpl.java:3011)
      at lucee.runtime.listener.ModernAppListener.initApplicationContext(ModernAppListener.java:440)
      at lucee.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:115)
      at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:43)
      at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2408)
      at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2398)
      at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2366)
      at lucee.runtime.engine.Request.run(Request.java:34)
      "
      "ERROR","ajp-nio-8009-exec-4","06/26/2017","07:20:25","scope-context","datasource [my-app-name] doesn't exist
      lucee.runtime.exp.DatabaseException: datasource [my-app-name] doesn't exist
      at lucee.runtime.exp.DatabaseException.notFoundException(DatabaseException.java:199)
      at lucee.runtime.PageContextImpl.getDataSource(PageContextImpl.java:3395)
      at lucee.runtime.type.scope.storage.IKHandlerDatasource.store(IKHandlerDatasource.java:85)
      at lucee.runtime.type.scope.storage.IKStorageScopeSupport.store(IKStorageScopeSupport.java:408)
      at lucee.runtime.type.scope.storage.IKStorageScopeSupport.touchAfterRequest(IKStorageScopeSupport.java:288)
      at lucee.runtime.PageContextImpl.release(PageContextImpl.java:547)
      at lucee.runtime.CFMLFactoryImpl.releaseLuceePageContext(CFMLFactoryImpl.java:208)
      at lucee.runtime.engine.CFMLEngineImpl._service(CFMLEngineImpl.java:1046)
      at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:996)
      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:742)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
      at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:486)
      at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
      at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861)
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455)
      at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      at java.lang.Thread.run(Thread.java:748)
      "

        Attachments

          Activity

            People

            • Assignee:
              pothys-mitrahsoft Pothys - MitrahSoft
              Reporter:
              mike Michael Sprague
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: