Session Management problems (solved)

Hi,
I want to activate the session and client management and store it on my server into a MSQL-Database.
I tried this on my develpment-machine and it works fine. Now I want install it on my live server and I get the following error:

 Lucee 5.2.7.62 Error (database)
Message 	Unable to select from your client storage database, and was also unable to create the tables. Here's the exceptions we encountered.
DatabaseName 	Microsoft SQL Server
DatabaseVersion 	11.00.7462
DriverName 	jTDS Type 4 JDBC Driver for MS SQL Server and Sybase
DriverVersion 	1.3.1
Datasource 	efactum_clientscope
Stacktrace 	The Error Occurred in
C:\Inetpub\wwwroot\www.internet-studie\AbbVie-Portal\application.cfm: line 7

    5: sessionmanagement="Yes"
    6: sessionStorage = "efactum_clientscope"
    7: setdomaincookies="No">
    8: <cfset Hauptseite="http://www.AbbVie-Portal.de">
    9: <cfset server_von_mv="'87.128.43.155','factum-internet','mv-internet','172.28.68.20','localhost'">

Java Stacktrace 	lucee.runtime.exp.DatabaseException: Unable to select from your client storage database, and was also unable to create the tables. Here's the exceptions we encountered.
 	at lucee.runtime.type.scope.storage.db.Ansi92.select(Ansi92.java:110)
 	at lucee.runtime.type.scope.storage.StorageScopeDatasource._loadData(StorageScopeDatasource.java:111)
 	at lucee.runtime.type.scope.client.ClientDatasource.getInstance(ClientDatasource.java:55)
 	at lucee.runtime.type.scope.ScopeContext.getClientScope(ScopeContext.java:266)
 	at lucee.runtime.type.scope.ScopeContext.getClientScopeEL(ScopeContext.java:316)
 	at lucee.runtime.PageContextImpl.clientScopeEL(PageContextImpl.java:1456)
 	at lucee.runtime.type.scope.UndefinedImpl.reinitialize(UndefinedImpl.java:598)
 	at lucee.runtime.PageContextImpl.setApplicationContext(PageContextImpl.java:3084)
 	at lucee.runtime.tag.Application.doStartTag(Application.java:566)
 	at abbvie_portal315.application_cfm$cf.call(/AbbVie-portal/application.cfm:7)
 	at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:933)
 	at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:823)
 	at lucee.runtime.listener.ClassicAppListener._onRequest(ClassicAppListener.java:54)
 	at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:45)
 	at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2464)
 	at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2454)
 	at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2427)
 	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:230)
 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
 	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
 	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:474)
 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
 	at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:478)
 	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
 	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:798)
 	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1434)
 	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:745)
 Caused by: lucee.runtime.exp.DatabaseException:
 	at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:372)
 	at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2988)
 	at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2421)
 	at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:671)
 	at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:613)
 	at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:572)
 	at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.execute(JtdsPreparedStatement.java:784)
 	at lucee.runtime.type.util.QueryUtil.execute(QueryUtil.java:301)
 	at lucee.runtime.type.QueryImpl.execute(QueryImpl.java:280)
 	at lucee.runtime.type.QueryImpl.(QueryImpl.java:224)
 	at lucee.runtime.type.QueryImpl.(QueryImpl.java:211)
 	at lucee.runtime.type.scope.storage.db.Ansi92.select(Ansi92.java:73)
 	... 43 more

Timestamp 17.05.18 17:34:36 MESZ

It is an SQL Server 11.0.7462.
I run Lucee 5.2.7.62 on Windows:
|Konfigurationsfile |C:\lucee\tomcat\lucee-server\context\lucee-server.xml|
|Betriebssystem |Windows Server 2012 R2 (6.3) 64bit|
|Remote IP |127.0.0.1|
|Host Name |127.0.0.1|
|Servlet Container |Apache Tomcat/8.5.11|
|Java |1.8.0_121 (Oracle Corporation) 64bit|
|Architecture |64bit|

The database is installed in the Server-Admin. Storage is set to β€œYes” and if I check the database in admin, I get no errors.

Anyone an idea, what could be wrong?

Thank you for your tipps!!!

Michael

First guess would be SQL permission problem.

1 Like

Hi Kabutotx,
thank you for your tipp. My database seems to have some permission problems.
I stored the variables into another database and now it works (with other problems :wink:)
Bye

Michael