steveduke
04/06/2022, 5:28 PMzackster
04/07/2022, 6:58 PMArrayToStruct(arr, boolean valueAsKey)
improvement from 6.0 https://github.com/lucee/Lucee/commit/b75a2a30e9abe1969438b83cf4106383321b3528Adam Cameron
import
is respected. Pseudo code "repro":
// some/directory/to/FTP.cfc
component {
public static struct function adapter() {
return {}
}
}
// test/unit/some/directory/to/FtpTest.cfc
import testbox.system.BaseSpec
import some.directory.to.FTP
component extends=BaseSpec {
function run() {
describe("Tests FTP adapter", () => {
it("should work...", () => {
result = FTP::adapter() // errors with "Component from type [org.lucee.cfml.Ftp] has no accessible static Member with name [adapter]"
expect(result).toBe({})
})
})
}
}
So it's looking for (and finding) a different Ftp (sic(*)) class, rather than my one. I would perhaps expect this if I did not have the literal import
statement saying which one I meant.
If I fully-qualify the usage, it's fine, eg:
result = some.directory.to.FTP::adapter()
But I should not have to do that. The imports should take priority, That's what they for, right?
(*) also as I'm on a case sensitive file system, it shouldn't even consider Ftp
to be the same as FTP
in the first place. That's not the same thing.gratzc
04/08/2022, 1:01 PMBrandon Brown
04/08/2022, 7:51 PMAdam Cameron
Lucee 5.3.8.206 Error (expression)
Message key [EN] doesn't exist
Stacktrace The Error Occurred in
/admin/resources/text.cfm: line 32
called from /admin/web.cfm: line 174
When hitting /lucee/admin/server.cfm
.
I've googled for other ppl getting similar, but drawn a blank.
The code in question seems to be https://github.com/lucee/Lucee/blob/5.3.8.206/core/src/main/cfml/context/admin/resources/text.cfm#L32
The only match for that file name I can find in the file system of the container is this:
root@6411ac0084f7:/var/www# find / -name text.cfm
[...]
/opt/lucee/web/temp/compress/da44506fe5fac4a8da74e7830bd71a99/c87947aefcfb3c98371e09351fcfe603/resources/text.cfm
And whilst it's the same file (code etc), it is not the one being executed & erroring.
This is in a freshly-built container, based on FROM lucee/lucee:5.3
chapmandu
04/10/2022, 11:51 PMmadmike_de
04/12/2022, 7:37 AM"ERROR","Thread-106437","04/12/2022","09:33:27","mail","Could not connect to SMTP host: <http://in-v3.mailjet.com|in-v3.mailjet.com>, port: 25;lucee.runtime.exp.NativeException: Could not connect to SMTP host: <http://in-v3.mailjet.com|in-v3.mailjet.com>, port: 25
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2211)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:740)
at javax.mail.Service.connect(Service.java:366)
at lucee.runtime.net.smtp.SMTPSender.run(SMTPSender.java:60)
Caused by: javax.mail.MessagingException: Could not connect to SMTP host: <http://in-v3.mailjet.com|in-v3.mailjet.com>, port: 25;
nested exception is:
javax.net.ssl.SSLException: Unsupported or unrecognized SSL message
... 4 more
Caused by: javax.net.ssl.SSLException: Unsupported or unrecognized SSL message
at java.base/sun.security.ssl.SSLSocketInputRecord.handleUnknownRecord(Unknown Source)
at java.base/sun.security.ssl.SSLSocketInputRecord.decode(Unknown Source)
at java.base/sun.security.ssl.SSLTransport.decode(Unknown Source)
at java.base/sun.security.ssl.SSLSocketImpl.decode(Unknown Source)
at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(Unknown Source)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at com.sun.mail.util.SocketFetcher.configureSSLSocket(SocketFetcher.java:626)
at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:400)
at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:217)
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2175)
... 3 more
"
System: Ubuntu, Apache2, Lucee 5.3.9.115-RC (happened also with 5.3.8), let's encrypt certificates.
Any idea what is happening here?Adam Cameron
isStruct
is not listed under the struct
category.James Ramsey
04/13/2022, 6:02 PMAdam Cameron
cfhttp(url="<https://example.com>", result="responseFromExample")
writeDump(responseFromExample.statusCode)
CF: 200 OK
Lucee: variable [RESPONSEFROMEXAMPLE] doesn't exist on line cfhttp(url="https
I suspect this is a case that Lucee is getting confused because there's a possibility that there is more to the cfhttp
"tag" than just the initial statement... it could optionally have a following block.
CF gets it right: the next token after the initial cfhttp
is not a {
, therefore that musta been the end of the statement, and the next token is the beginning of a new statement.
Lucee should also be able to do this.
Yes?Gareth
04/16/2022, 4:18 AMAdam Cameron
reMatch
. Probably something to do with one of these two: https://luceeserver.atlassian.net/issues/?jql=fixversion%20%20%3E%3D%205.3.8.4%20and%20fixversion%20%3C%3D%205.3.8.42%20and%20text%20~%20regex
Repro:
s = ""
pattern = ".*"
writeDump([
reMatch = s.reMatchNoCase(pattern),
matches = s.matches(pattern),
split = s.split(pattern)
])
https://trycf.com/gist/5761040d136d2c4396d89bb60e97043f/lucee5?theme=monokai
Compare the difference between Lucee 5 (reMatch
returns an empty array) and Lucee 4.5 and CF2021 (correctly returns an array with one empty string in it).
One might try to reason out of this, saying it's the difference between this.useJavaAsRegexEngine = true
and this.useJavaAsRegexEngine = false
. Whilst setting it to true
does "fix" the issue, that's neither here nor there, because with either Java or PCRE (or... Apache ORO I think, but that's close to a very old version of PRCE I think anyhow?) regexes, the results should be the same: .*
matches an empty string.
Also note changing that setting on CF2021 has no effect: it returns [""]
either way. Which is correct.
This breaks TestBox, for a specific edge-case (which I have raised separately in the testing channel).Adam Cameron
try {
throw(message="SAME_MESSAGE_AND_DETAIL", detail="SAME_MESSAGE_AND_DETAIL")
} catch (any e) {
writeDump([
message = e.message,
detail = e.detail // where gone?
])
}
try {
throw(message="DIFFERENT_MESSAGE", detail="DIFFERENT_DETAIL")
} catch (any e) {
writeDump([
message = e.message,
detail = e.detail
])
}
https://i2.paste.pics/35fd501360fba93bed8162716fd57211.png▾
Simone
04/18/2022, 2:54 PMGVJustDOIT
04/18/2022, 6:48 PMlucee.runtime.exp.NativeException: com.compoundtheory.classloader.NetworkClassLoader at java.base/java.net.URLClassLoader.findClass(Unknown Source) at java.base/java.lang.ClassLoader.loadClass(Unknown Source) at java.base/java.lang.ClassLoader.loadClass(Unknown Source) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at lucee.runtime.reflection.pairs.MethodInstance.invoke(MethodInstance.java:56) at lucee.runtime.reflection.Reflector.callMethod(Reflector.java:877) at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:831) at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1747) at _cfc.bolt.javaloader.javaloader_cfc$cf.udfCall1(/_cfc/bolt/javaloader/JavaLoader.cfc:250) at _cfc.bolt.javaloader.javaloader_cfc$cf.udfCall(/_cfc/bolt/javaloader/JavaLoader.cfc) at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106) at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344) at lucee.runtime.type.UDFImpl.call(UDFImpl.java:217) at lucee.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:784) at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:787) at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1747) at _cfc.bolt.javaloader.javaloader_cfc$cf.udfCall1(/_cfc/bolt/javaloader/JavaLoader.cfc:50) at _cfc.bolt.javaloader.javaloader_cfc$cf.udfCall(/_cfc/bolt/javaloader/JavaLoader.cfc) at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106) at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344) at lucee.runtime.type.UDFImpl.call(UDFImpl.java:217) at lucee.runtime.ComponentImpl._call(ComponentImpl.java:684) at lucee.runtime.ComponentImpl._call(ComponentImpl.java:572) at lucee.runtime.ComponentImpl.call(ComponentImpl.java:1911) at lucee.runtime.functions.other._CreateComponent.call(_CreateComponent.java:81) at _cfc.bolt.bolthttp_cfc$cf.udfCall(/_cfc/bolt/bolthttp.cfc:207) at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106) at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344) at lucee.runtime.type.UDFImpl.call(UDFImpl.java:217) at lucee.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:784) at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:787) at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1747) at _cfc.bolt.bolthttp_cfc$cf.udfCall(/_cfc/bolt/bolthttp.cfc:7) at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106) at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344) at lucee.runtime.type.UDFImpl.call(UDFImpl.java:217) at lucee.runtime.ComponentImpl._call(ComponentImpl.java:684) at lucee.runtime.ComponentImpl._call(ComponentImpl.java:572) at lucee.runtime.ComponentImpl.call(ComponentImpl.java:1911) at lucee.runtime.functions.other._CreateComponent.call(_CreateComponent.java:66) at
Adam Cameron
• Strings (a zero length string will return)true
• Arrays (an array with no elements will return)true
• Structs (a struct with no keys will return)true
• Query (a query with no rows will returnIt also checks null. Possibly worth mentioning? Am happy to make the change myself unless I'm missing something or it's not actually supposed to? Checking a bit more thoroughly: https://trycf.com/gist/541cd1f2115559fedc6753471aa8e282/lucee5?theme=monokai It also identifies empty XML. And whilst it claims to take "any" type for the parameter value, it doesn't. It errors-out on a function (either defined via a statement or an expression).)true
Brandon Brown
04/19/2022, 9:02 PMosgi.wiring.package=io.nats.client
Below is the MANIFEST.MF file for my jar and also the MANIFEST.MF file for the package I am trying to use.
Manifest-Version: 1.0
Built-By: brandon
Build-Jdk: 1.8
Created-By: brandon
Bundle-ManifestVersion: 2
Bundle-Name: LuceeNATS
Bundle-SymbolicName: net.testing.luceenats
Bundle-Version: 2.0.1
Export-Package: net.testing.lucee.nats;uses:="javax.servlet,lucee.runtime,lucee.runtime.exp,lucee.runtime.listener,jnats;version="2.14.0",net.twentyonesolutions.luceeapps";version="2.0.0"
Import-Package: javax.servlet,javax.servlet.http,lucee.runtime,lucee.runtime.exp,lucee.runtime.listener,lucee.runtime.type.scope,lucee.runtime.util,<http://net.twentyonesolutions.lucee.app|net.twentyonesolutions.lucee.app>,net.twentyonesolutions.lucee.core,io.nats.client
Comment: (use this line if using javax.websocket-api for javax.websocket as opposed to bootdelegate) Import-Package: javax.servlet,javax.servlet.http,lucee.runtime,lucee.runtime.exp,lucee.runtime.listener,lucee.runtime.type.scope,lucee.runtime.util,<http://net.twentyonesolutions.lucee.app|net.twentyonesolutions.lucee.app>,io.nats.client
Manifest-Version: 1.0
Automatic-Module-Name: io.nats.jnats
Bnd-LastModified: 1646784054419
Bundle-ManifestVersion: 2
Bundle-Name: jnats
Bundle-SymbolicName: jnats
Bundle-Version: 2.14.0
Created-By: 1.8.0_292 (AdoptOpenJDK)
Implementation-Title: Java Nats
Implementation-Vendor: <http://nats.io|nats.io>
Implementation-Version: 2.14.0
Private-Package: io.nats.client,io.nats.client.api,io.nats.client.impl
,io.nats.client.support
Require-Capability: <http://osgi.ee;filter:=%22(&(osgi.ee=JavaSE)(version=1.8))%22|osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))">
Tool: Bnd-5.1.2.202007211702
Brandon Brown
04/20/2022, 2:38 PMlucee.runtime.Component
how do I access a variable set in the variables
scope from inside of that CFC? I tried get
but it is deprecated and will return nullSimone
04/21/2022, 3:32 PMristo
04/23/2022, 7:18 PMthisOldDave
04/25/2022, 2:17 PMzackster
04/25/2022, 10:22 PMGareth
04/26/2022, 1:54 AMdanmurphy
04/28/2022, 8:55 PMtoLowerCase()
on a string, is that dropping down to java to make that happen? Or is that an undocumented alias to lCase()
or something?
https://trycf.com/gist/167ff5c50107ea90c8b4c9174a27246f/lucee5?theme=monokaiAdam Cameron
s = "something"
writeDump([
"s" = s,
"s.equals(s)" = s.equals(s),
"s.equals(s) == true" = s.equals(s) == true,
"s.equals(s) === true" = s.equals(s) === true, // <------------ FALSE ON LUCEE
"s === s" = s === s,
"(s === s) === true" = (s === s) === true,
"(s.equals(s) && true) === true" = (s.equals(s) && true) === true,
"type of CFML boolean" = returnsTrue().getClass().getName(), // Lucee: java.lang.Boolean; CF: coldfusion.runtime.CFBoolean
"type of Java boolean" = s.equals(s).getClass().getName()
])
function returnsTrue() {
return true
}
(https://trycf.com/gist/d433815998890e7129e15c82806ca78a/lucee5?theme=monokai)
All works as one would expect on CF. I cannae work out what Lucee is up to.Brandon Brown
05/02/2022, 6:16 PMcfadmin
tag. In one part of my extension I need to call createPageContext
on an instance of the CFMLEngine but I get an exception on line 173 of PageContextUtil.java that says Index 0 out of bounds for length 0
From what I can gather is that there is no ServletConfig registered on the engine instance. I will only receive this error after restarting Lucee from the GUI or programmatically. On first boot of the server though everything works great.Brandon Brown
05/02/2022, 6:16 PMBrandon Brown
05/03/2022, 1:38 PMonApplicationEnd
but it doesn't fire at all for me and I am using Lucee 5.3.8-206 and appears to be a known bug https://luceeserver.atlassian.net/browse/LDEV-1944johnfarrar
05/04/2022, 3:38 PM