• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CF11 to CF2018: Error Executing Database Query. HOUR_OF_DAY: 2 -> 3

New Here ,
Oct 17, 2019 Oct 17, 2019

Copy link to clipboard

Copied

After migrating a CF11 application to CF2018 I've been seeing the occasional error:

Error Executing Database Query. HOUR_OF_DAY: 2 -> 3

 

This error occurs when trying to query a database record that contains an invalid datetime field due to Daylight Savings Time (DST).

 

For example, using the following timezone data:

/usr/share/zoneinfo/America/New_York  Sun Mar 11 06:59:59 2018 UT = Sun Mar 11 01:59:59 2018 EST isdst=0 gmtoff=-18000
/usr/share/zoneinfo/America/New_York  Sun Mar 11 07:00:00 2018 UT = Sun Mar 11 03:00:00 2018 EDT isdst=1 gmtoff=-14400
/usr/share/zoneinfo/America/New_York  Sun Nov  4 05:59:59 2018 UT = Sun Nov  4 01:59:59 2018 EDT isdst=1 gmtoff=-14400
/usr/share/zoneinfo/America/New_York  Sun Nov  4 06:00:00 2018 UT = Sun Nov  4 01:00:00 2018 EST isdst=0 gmtoff=-18000

A record with a datetime stamp of 2018-03-11 02:15:00 will throw this error because that time doesn't exist due to DST.

 

It seems this is due to underlying changes with upgrading from Java 8 to Java 11? I'm wondering if there is any kind of global setting that could be used to resolve these errors? I don't care if that datetime doesn't actually exist in my timezone, I'd rather it grab the value without throwing. Short of updating all datetime fields in the db is there a way to resolve these errors?

 

Full Stack Trace:

Error Executing Database Query. HOUR_OF_DAY: 2 -> 3
coldfusion.tagext.sql.QueryTag$DatabaseQueryException: Error Executing Database Query.
coldfusion.tagext.sql.QueryTag$DatabaseQueryException: Error Executing Database Query.
	at coldfusion.tagext.sql.QueryTag.startQueryExecution(QueryTag.java:894)
	at coldfusion.tagext.sql.QueryTag.doEndTag(QueryTag.java:794)
	at cfget2ecfm1450148990.runPage(REDACTED)
	at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:262)
	at coldfusion.filter.CFVariablesScopeFilter.invoke(CFVariablesScopeFilter.java:56)
	at coldfusion.tagext.lang.ModuleTag.doStartTag(ModuleTag.java:330)
	at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:4082)
	at cfsearch2ecfm1798092348.runPage(REDACTED)
	at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:262)
	at coldfusion.tagext.lang.IncludeTag.handlePageInvoke(IncludeTag.java:729)
	at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:565)
	at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:4082)
	at cfApplication2ecfc1861989389$funcONREQUEST.runFunction(REDACTED)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:553)
	at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:484)
	at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:447)
	at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:398)
	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:371)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:287)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:818)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:601)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:426)
	at coldfusion.runtime.AppEventInvoker.invoke(AppEventInvoker.java:115)
	at coldfusion.runtime.AppEventInvoker.onRequest(AppEventInvoker.java:308)
	at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:553)
	at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:43)
	at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
	at coldfusion.filter.PathFilter.invoke(PathFilter.java:162)
	at coldfusion.filter.IpFilter.invoke(IpFilter.java:45)
	at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:96)
	at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:78)
	at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
	at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
	at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:60)
	at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
	at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
	at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62)
	at coldfusion.CfmServlet.service(CfmServlet.java:226)
	at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:311)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:46)
	at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:47)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
	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:199)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:491)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357)
	at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:422)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.sql.SQLException: HOUR_OF_DAY: 2 -> 3
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89)
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63)
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:73)
	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:85)
	at com.mysql.cj.jdbc.result.ResultSetImpl.getTimestamp(ResultSetImpl.java:903)
	at com.mysql.cj.jdbc.result.ResultSetImpl.getObject(ResultSetImpl.java:1243)
	at coldfusion.sql.QueryTable.populate(QueryTable.java:422)
	at coldfusion.sql.QueryTable.populate(QueryTable.java:287)
	at coldfusion.sql.Executive.getRowSet(Executive.java:712)
	at coldfusion.sql.Executive.executeQuery(Executive.java:1586)
	at coldfusion.sql.Executive.executeQuery(Executive.java:1317)
	at coldfusion.sql.Executive.executeQuery(Executive.java:1247)
	at coldfusion.sql.SqlImpl.execute(SqlImpl.java:427)
	at coldfusion.tagext.sql.QueryTag.executeQuery(QueryTag.java:1211)
	at coldfusion.tagext.sql.QueryTag.startQueryExecution(QueryTag.java:841)
	... 64 more
Caused by: com.mysql.cj.exceptions.WrongArgumentException: HOUR_OF_DAY: 2 -> 3
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)
	at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105)
	at com.mysql.cj.result.SqlTimestampValueFactory.localCreateFromTimestamp(SqlTimestampValueFactory.java:112)
	at com.mysql.cj.result.SqlTimestampValueFactory.localCreateFromTimestamp(SqlTimestampValueFactory.java:50)
	at com.mysql.cj.result.AbstractDateTimeValueFactory.createFromTimestamp(AbstractDateTimeValueFactory.java:87)
	at com.mysql.cj.protocol.a.MysqlBinaryValueDecoder.decodeTimestamp(MysqlBinaryValueDecoder.java:84)
	at com.mysql.cj.protocol.result.AbstractResultsetRow.decodeAndCreateReturnValue(AbstractResultsetRow.java:87)
	at com.mysql.cj.protocol.result.AbstractResultsetRow.getValueFromBytes(AbstractResultsetRow.java:241)
	at com.mysql.cj.protocol.a.result.BinaryBufferRow.getValue(BinaryBufferRow.java:244)
	... 75 more
Caused by: java.lang.IllegalArgumentException: HOUR_OF_DAY: 2 -> 3
	at java.base/java.util.GregorianCalendar.computeTime(GregorianCalendar.java:2826)
	at java.base/java.util.Calendar.updateTime(Calendar.java:3425)
	at java.base/java.util.Calendar.getTimeInMillis(Calendar.java:1812)
	at com.mysql.cj.result.SqlTimestampValueFactory.localCreateFromTimestamp(SqlTimestampValueFactory.java:108)
	... 81 more

Views

1.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation
Resources
Documentation