Array to list function - works in ACF not in Lucee

194 views
Skip to first unread message

localtel...@gmail.com

unread,
Mar 23, 2015, 4:02:21 PM3/23/15
to lu...@googlegroups.com
Hello all,

I have a file that uses this function...

67: <cfset returnlist = ArrayToList(Arguments.query_object.getMetadata().getColumnLabels())>

And it's getting this error

Lucee 4.5.1.000 Error (java.sql.SQLException)
Message method is not implemented
Cause java.sql.SQLException



This works fine is Adobe ColdFusion but not in Lucee -  any suggestions on what might need to be changed?  The database is MySQL

Thanks

Larry

Chip Pinkston

unread,
Mar 23, 2015, 4:09:55 PM3/23/15
to lu...@googlegroups.com
You may want to check that getColumnLabels() is available in getMetadata().  I've run into issues that worked under ACF the failed under Railo calling getMetadata() functions.

But ArrayToList should be working just fine if you're getting an array back.  ;-)

Chip.

localtel...@gmail.com

unread,
Mar 23, 2015, 4:35:44 PM3/23/15
to lu...@googlegroups.com
Sorry, this let me more confused than I was...  How would I check to see if this is available?  This is my first venture into Lucee so admittedly a novice here.

Thank you

Nando Breiter

unread,
Mar 23, 2015, 4:55:52 PM3/23/15
to lu...@googlegroups.com
Larry,

What happens if run a similar query in some test code and dump

myQuery.getMetadata().getColumnLabels() ? (I think it would error in the same way)

What happens if you dump myQuery.getMetadata() ?

Since you need a list of columns, perhaps you could use the function querycolumnlist() - http://www.luceedocs.org/function/querycolumnlist

<cfset returnlist = querycolumnlist(Arguments.query_object)>





Aria Media Sagl
Via Rompada 40
6987 Caslano
Switzerland

+41 (0)91 600 9601
+41 (0)76 303 4477 cell
skype: ariamedia

--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/f3dab7d0-3774-4ff8-a7e2-48cbde47c6eb%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Chip Pinkston

unread,
Mar 23, 2015, 5:02:15 PM3/23/15
to lu...@googlegroups.com
I meant dump that function call:

<cfdump var="#Arguments.query_object.getMetadata()#" abort='true' />

Under ACF you'll see a bunch of methods there - including getColumnLabels.  I'm just trying this on a quick temp query locally and Lucee is throwing an error of 'method is not implemented'.

<cfset qry = QueryNew('testing')>
<cfdump var="#qry.getMetadata()#" abort='true' />

Here are some notes about how getMetaData was different under Railo from ACF - this looks like it's your issue:

localtel...@gmail.com

unread,
Mar 23, 2015, 6:18:56 PM3/23/15
to lu...@googlegroups.com
Got it.

Lucee, and Railo didn't like 

<cfset returnlist = ArrayToList(Arguments.query_object.getMetadata().getColumnLabels())>

So using this instead...

<cfset returnList = arguments.query_object.getColumnlist(false)>


Lucee is happy now!

Thanks for the help folks!

Gert Franz

unread,
Mar 24, 2015, 5:25:47 AM3/24/15
to lu...@googlegroups.com

You need to know that Lucee <> ACF.

So there are some/many implementations that are different. And the thing you are using is an undocumented feature. If the getColumnLabels() Method is a method of the Adobe query resultset then you cannot rely that we have implemented the resultset in Lucee in the same way ACF has done it.

So you could work around this by checking what methods the Lucee resultset has in the underlying java collection class, but then again you are on an undocumented path.

 

Sincerely
Gert Franz

 

RASIA GmbH

Spittelgasse 7

5103 Moeriken-Wildegg

Email: ge...@rasia.ch
Skype: gert.franz

Phone Switzerland: +41 76 5680 231

--

You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.

image001.png

localtel...@gmail.com

unread,
Mar 24, 2015, 1:55:04 PM3/24/15
to lu...@googlegroups.com
Good info Gert,  Thanks!

I developed this site and application in ACF and it was a nearly painless process to to move to Lucee - there were some differences, obviously, but none that could not be overcome. The core of ACF and Lucee are close enough that having an app that works well under both is certainly doable.  Over time it will be interesting to see if this remains the case.  It will also be interesting to see if Lucee, among the non-enterprise user community, grows large enough where it will make sense to target Lucee and no longer worry about CF compatibility.... Frankly, with the direction that Adobe appears to be taking CF, I think I'm hoping it will!

Larry
Reply all
Reply to author
Forward
0 new messages