Highlighted

ColdFusion 2018 - QueryExecute() - maxlength property without quotes

Community Beginner ,
May 08, 2018

Copy link to clipboard

Copied

In the ColdFusion 2018 Public Beta with Update 1 applied, using Java 10.0.1 (rather than the default Java 9.0.4), when calling QueryExecute() and passing a struct of query params, if I use cfsqltype="CF_SQL_CHAR", maxlength=64 (note there is no double quotes around the 64) it throws an error. But if I instead use cfsqltype="CF_SQL_CHAR", maxlength="64" (note the 64 in double quotes) it works correctly.

Please investigate.

@Benjamin Reid

Thanks for reporting this . We figured out this is a regression caused due to changes made for data type preservation in CF 2018 and we have now fixed this . Regarding the official support for Java 10 for CF 2018 , the current plan is to support it even though we have shipped the installers with Java 9 JRE .. we are contemplating on switching to Java 10 .

BTW , even the Public beta build was certified in Java 10 before release so you are safe to continue to test with Java 10

Views

792

Likes

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

ColdFusion 2018 - QueryExecute() - maxlength property without quotes

Community Beginner ,
May 08, 2018

Copy link to clipboard

Copied

In the ColdFusion 2018 Public Beta with Update 1 applied, using Java 10.0.1 (rather than the default Java 9.0.4), when calling QueryExecute() and passing a struct of query params, if I use cfsqltype="CF_SQL_CHAR", maxlength=64 (note there is no double quotes around the 64) it throws an error. But if I instead use cfsqltype="CF_SQL_CHAR", maxlength="64" (note the 64 in double quotes) it works correctly.

Please investigate.

@Benjamin Reid

Thanks for reporting this . We figured out this is a regression caused due to changes made for data type preservation in CF 2018 and we have now fixed this . Regarding the official support for Java 10 for CF 2018 , the current plan is to support it even though we have shipped the installers with Java 9 JRE .. we are contemplating on switching to Java 10 .

BTW , even the Public beta build was certified in Java 10 before release so you are safe to continue to test with Java 10

Views

793

Likes

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
May 08, 2018 0
Adobe Community Professional ,
May 09, 2018

Copy link to clipboard

Copied

Benjamin, first, note that CF2018 only supports Java 8 or 9.  See https://coldfusion.adobe.com/files/2018/04/Public_Beta_Support-Matrix.pdf , as is linked to from https://coldfusion.adobe.com/coldfusion-2018-public-beta/ . Look for "jdk" (not "java" or "jvm" or "jre"), to see the indication of that.

And yes, Adobe is aware that Java 10 is now out (and that Java 9 is no longer being updated, and that Java 11 is coming out in Sept).

Before we deride Adobe about this, note (I'm saying this for all readers) that both Java 9 and 10 had only VERY short lives. Java 9 was released Sep 2017 and updates ended in March 2018, and Java 10 then came out in March 2018 and support ends in Sep 2018. That's only 6 months each between release and end of updates! This is detailed at Oracle Java SE Support Roadmap.

I was writing up more on this matter as a reply here, about the current and likely future state of things, and it started getting long so I decided it would be better as a blog post. Check it out, for more:

On ColdFusion and its support for Java 9, 10, and 11

Comments welcome here or there.

/Charlie (server troubleshooter, carehart.org)

Likes

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
Reply
Loading...
May 09, 2018 1
LEGEND ,
May 09, 2018

Copy link to clipboard

Copied

Charlie,


Thank you for such an information packed entry.  I'm sure many will benefit from it.

V/r,

^ _ ^

Likes

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
Reply
Loading...
May 09, 2018 0
Community Beginner ,
May 09, 2018

Copy link to clipboard

Copied

Hi Charlie,

Indeed, I was aware of all that, in fact I asked a question recently surrounding the topic of Java 9/10/11 on the ColdFusion Public Beta blog.

To be clear, I am not deriding Adobe, I am just forward planning and looking for answers to help me do so.

I think it is good that we are increasing awareness of the very short lived Java 9-10-11 migration to the next LTS release.

For reference, my question was:

============================

With regard to Java versions:

I see the ColdFusion 2018 Public Beta is currently shipping with Java 9.0.4. Given that Java 9 has already reached Public EOL in March 2018, and Java 10 is GA but due for Public EOL in September 2018 (due to both Java 9 & 10 not being classified as Long Term Support releases): what version of Java is Adobe planning on shipping ColdFusion 2018 with for the public release? Obviously Java 11 is not GA yet, but would it be correct to presume the long term plan is to offer CF2018 with Java 11?

Similarly, what is the intention with regard to ColdFusion 11 & 2016: is the plan to provide updates to support Java 9/10/11, as was done previously with the transition from Java 7 to Java 8?

============================

I see that your post "On ColdFusion and its support for Java 9, 10, and 11" answers a large portion of my questions. Thanks & two thumbs up!

Likes

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
Reply
Loading...
May 09, 2018 0
Adobe Community Professional ,
May 09, 2018

Copy link to clipboard

Copied

Thanks, Benjamin (and Wolfshade). Glad to have helped, and thanks also for the kind comment on the blog post as well.

As for you saying here now that you were "aware of all that", well, your original post here simply says "I tried to do x with CF2018 and Java 10. Please investigate."  That doesn't sound like you were acknowledging that CF2018 doesn't yet support Java 10. 🙂

And I appreciate how your other thread has pressed them for an answer on the very matter of if/when CF would support Java 10 or 11. Did they answer yet? (I couldn't find that post, though I remember reading it. You may want to share that link here.)

As for your clarifying that you're not deriding them, only investigating, fair enough. To be clear, that's why I added my parenthetical "I'm saying this for all readers" comment, in the hope that you would not think I was asserting that of you. 🙂

Finally, given the original question you asked here, would you think that my first reply was indeed "the answer" (to that specific question)? If so, there is a mechanism to mark a given response as "the answer". If you may be holding out for a response from Adobe on the bigger question of if/when they would support Java 10, I will just note that you really would have served yourself better not only by asking that but also by naming the thread with that. 🙂

As it is, I suspect many will never even read this and see the discussion we have had. I am thinking of putting a blog post on the community portal in the hopes that it may get more attention to the topic (from people and Adobe).

/Charlie (server troubleshooter, carehart.org)

Likes

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
Reply
Loading...
May 09, 2018 0
Community Beginner ,
May 09, 2018

Copy link to clipboard

Copied

I am not a regular user of these community forums, and I clearly made a few mistakes in my post:

  • The key topic wasn't clear - my main issue is with the QueryExecute param evaluation throwing an error when quotes are not used around the maxlength parameter;
  • I had been assuming the issue was happening with Java 9.0.4 as well, but hadn't actually checked that (although it does still happen on the default Java 9.0.4 btw);
  • I should not have mentioned Java 10, knowing that it was not officially supported;
  • I didn't consider the broader community interpretation of my post, I was just flagging an issue I encountered for Adobe to investigate pre official release of CF2018;

My post to Adobe re Java 9/10/11 was just on the CF2018 pre-release blog post (you can see it *currently* at the end of the thread), and no they did not reply:

Public beta for Adobe ColdFusion (2018 release) and Adobe ColdFusion Builder (2018 release) | ColdFu...

In that context, I don't think the question is answered, because the issue still exists in the CF2018 Public Beta with Updater 1 applied.

Here is a code sample that can reproduce the issue:

<cfscript>

    qMyQuery = QueryExecute(" SELECT Test = :TestValue ", {TestValue = { cfsqltype="CF_SQL_CHAR", maxlength=64, value="Some text" }, { Datasource = "DataSource", Username = "UserName", Password = "Password" } );

    WriteDump(qMyQuery);

</cfscript>

I would like Adobe to look into this, or alternatively advise if quotes are now required in that context (they were not previously). Should I be posting issues that I have in the CF2018 Pre Release to another location rather than the Community Forums?

Likes

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
Reply
Loading...
May 09, 2018 1
Engaged ,
May 10, 2018

Copy link to clipboard

Copied

@Benjamin Reid

Thanks for reporting this . We figured out this is a regression caused due to changes made for data type preservation in CF 2018 and we have now fixed this . Regarding the official support for Java 10 for CF 2018 , the current plan is to support it even though we have shipped the installers with Java 9 JRE .. we are contemplating on switching to Java 10 .

BTW , even the Public beta build was certified in Java 10 before release so you are safe to continue to test with Java 10

Likes

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
Reply
Loading...
May 10, 2018 2
Community Beginner ,
May 10, 2018

Copy link to clipboard

Copied

Thanks Suresh, fantastic.

I have also noticed that a similar problem is happening with the null property on the QueryExecute params. It appears not to be recognising null="Yes/No" as a valid query param option. It throws an Expression error.

Not sure if will be fixed by the same fix for the maxlength parameter. If you need me to I can start a separate ticket.

Here is some example code that demonstrates the issue:

<cfscript>

    qMyQuery = QueryExecute(" SELECT Test = :TestValue ", {TestValue = { cfsqltype="CF_SQL_CHAR", null=1, value="" }, { Datasource = "DataSource", Username = "UserName", Password = "Password" } );

    WriteDump(qMyQuery);

</cfscript>

It throws the following error details in the CFCATCH struct:

Type: Expression Error

ErrNumber: 0

Message: Variable NULL is undefined.

Name: NULL

Stack Trace:

coldfusion.runtime.UndefinedVariableException: Variable NULL is undefined.

at coldfusion.runtime.CfJspPage._get(CfJspPage.java:454)

at coldfusion.runtime.CfJspPage._get(CfJspPage.java:420)

at coldfusion.runtime.CfJspPage._get(CfJspPage.java:399)

at coldfusion.runtime.CfJspPage._autoscalarize(CfJspPage.java:1798)

at cfa_CF2018_Bug_22ecfm722924986.runPage("File Path Removed For Security":8)

at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:261)

at coldfusion.tagext.lang.IncludeTag.handlePageInvoke(IncludeTag.java:729)

at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:565)

at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)

at coldfusion.filter.IpFilter.invoke(IpFilter.java:45)

at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:542)

at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)

at coldfusion.filter.PathFilter.invoke(PathFilter.java:163)

at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:96)

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:225)

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 coldfusion.inspect.weinre.MobileDeviceDomInspectionFilter.doFilter(MobileDeviceDomInspectionFilter.java:121)

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.core.StandardHostValve.invoke(StandardHostValve.java:137)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)

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:425)

at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)

at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:754)

at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1376)

at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)

at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

at java.base/java.lang.Thread.run(Thread.java:844)

Likes

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
Reply
Loading...
May 10, 2018 0
Adobe Community Professional ,
May 11, 2018

Copy link to clipboard

Copied

Thanks for the clarifications, Benjamin. And these things happen, no worries. Indeed, it led to the broader discussion of CF support of Java 9, 10, and 11, which was worthwhile.

And since your subject line was indeed about the specific issue (of the quotes in the tag), then it turned out that was the right title after all. 🙂 And only those interested in the topic will dig in after all.

And I see that Adobe has responded to your specific concern, which is great. And I see that they responded with new info about support of Java 10, which is also great! 🙂 I will share that in my blog, since I can point to it as a public statement here.

Hope you get to resolution of the specific problem.

/Charlie (server troubleshooter, carehart.org)

Likes

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
Reply
Loading...
May 11, 2018 0
Engaged ,
May 11, 2018

Copy link to clipboard

Copied

This problem was encountered in our internal testing as well and was fixed recently . It didn't make it to the public beta build but it's fixed and verified

Likes

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
Reply
Loading...
May 11, 2018 1
Community Beginner ,
May 31, 2018

Copy link to clipboard

Copied

Fantastic to hear all this activity for CF 2018 but thoughts on CF 2016?

Java 8 is EOL in January 2019 and it looks like Adobe has committed to support the product through 2019 - http://wwwimages.adobe.com/content/dam/acom/en/products/coldfusion/pdfs/cf2016/Roadmap_for_Adobe_Col...

Do you know if they have any plans yet to see if CF 2016 will run properly on Java 9 / 10?

Thanks for any guidance you can provide!

Likes

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
Reply
Loading...
May 31, 2018 0