Datasource not picked up as being available for storage when defined using cfapplication

Description

The following is called in whichever is called first in a given request of onApplicationStart, onSessionStart, and onRequestStart. The server has no settings at all defined in the administrator.

A dump of application.datasources immediately prior to the Application call shows the following ( apologies for the MS Paint skills )

The result is the following error

This identical code sample + data structure works on Lucee 4.x, but causes the error above in Lucee 5 ( last tested on Lucee 5.0.0.233-SNAPSHOT but also seen in the RC )

Environment

None

Attachments

2

Activity

Former user 
25 April 2016 at 09:20

Further investigation showed that this was due to the MySQL connector being unable to handle the UTC timezone.

This relates to the MySQL bug http://bugs.mysql.com/bug.php?id=79343 / http://stackoverflow.com/questions/26515700/mysql-jdbc-driver-5-1-33-time-zone-issue and is fixed in the, at time of writing, unrelreased v5.1.39 of the MySQL connector

The temporary workaround is to add

to the connection string

Michael Offner 
25 April 2016 at 08:22

can you try this:

Former user 
20 April 2016 at 10:00
(edited)

Ok so reproduction as follows

1 - Take a server with Tomcat 8, Lucee jar files in /opt/lucee/lib ( /opt/lucee symlinks to a folder /opt/lucee4 containing /lib/*jars ) - this server works perfectly
2 - Stop Tomcat
3 - Change the /opt/lucee symlink to point to /opt/lucee_5_0_0_235-SNAPSHOT ( with just lucee.jar in /opt/lucee_5_0_0_235-SNAPSHOT/lib/lucee.jar )
4 - Start Tomcat

This then results, with no other changes ( so same codebase etc, just changing the lucee jars ), with the following error

From there I did the following

  • Reboot tomcat - no effect

  • Put a dump in immediately prior to the application cfscript-tag that confirms that the stryver_sessions datasource in the structure being supplied as datasources - no effect

  • Split up the Application calls so that it first does an Application with datasources, then does an Application with session settings - no effect

  • Reboot tomcat again - no effect

  • Added line application.datasources.session_dsn_name.storage = true; immediately prior to Application ( the dump showed this to already be true ) - no effect

  • Added line application.datasources.session_dsn_name['storage'] = true; immediately prior to Application ( the dump showed this to already be true ) - no effect

  • Added a line that re-defines the session_dsn_name key to be a new struct with the same values and lower cased key names - no effect

  • Rebooted tomcat again - no effect

So at this point I gave up on that route and looked another route, adding a dump in the "configureMappingsAndDatasources" method that calls Application, and adding dumps in onApplicationStart, onSessionStart, and onRequestStart to see if it's actually ever working.

Going down this route, onApplicationStart worked fine, but then the process errored prior to onSessionStart which considering the error makes sense.

Resetting server and clearing cookies, to trigger new everything results in the following

  • onApplicationStart

  • configureMappingsAndDatasources

  • configureMappingsAndDatasources

  • ERROR

Clearing cookies, to start a new session, without rebooting tomcat results in

  • onSessionStart

  • configureMappingsAndDatasources

  • onRequestStart

  • ERROR

Doing nothing, to use an existing session and without rebooting tomcat results in

  • onRequestStart

  • configureMappingsAndDatasources

  • ERROR

Rebooting tomcat without clearing cookies etc results in the same as clearing cookies, not entirely unexpected there.

Application.cfc has the following at the top

configureMappingsAndDatasources looks like

Former user 
19 April 2016 at 20:59

Afraid I'm still trying to find a good time to put our test cluster back onto 5 to look into this further - dev/ci machines aren't quite a reliable option for this ATM

Michael Offner 
19 April 2016 at 16:16

news on this?

Unresolved

Details

Assignee

Reporter

Priority

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Affects versions

Created 4 April 2016 at 15:34
Updated 21 May 2024 at 23:19