Andreas
02/18/2022, 6:34 PMAdam Cameron
uptimeInMillis = createObject("java", "java.lang.management.ManagementFactory").getRuntimeMXBean().getUptime()
But:
a) wondering if there's a more CFML- /Lucee -idiomatic way of doing it;
b) that is not reset by a Lucee Server restart (via the admin), for obvious reasons. This is probably not an issue for what I need, but figured I'd mention it anyhow.dswitzer
02/22/2022, 2:26 PMnull
, but in Lucee 5 (and Railo) it returns test
. Since the modelId
is declared within the local
scope, I would expect the isNull(modelId)
to return true if var modelId
exists in the function. However, you have to explicitly specify the local
scope to get it to work (i.e. isNull(local.modelId)
).
I opened up a Lucee issue about this in May 2021, but there's been not traction:
https://luceeserver.atlassian.net/browse/LDEV-3523
Am I wrong? Is this the behavior everyone else would expect?
I see it as a real problem because any UDF in which you're using isNull()
to check a local variable could end up returning drastically different results than what you're expected.bdw429s
02/22/2022, 10:30 PMEncoder class (org.owasp.esapi.reference.DefaultEncoder) CTOR threw exception.
on Lucee 5.3.8.206 (stack in the thread). Has anyone ever seen this before?zackster
02/24/2022, 7:04 PMzackster
02/25/2022, 1:46 PMAdam Cameron
session.sessionid
value derived in Lucee? Looks to be something like... [application_name]_[a GUID]_0
. Is there anything more I should know beyond that?zackster
02/25/2022, 4:48 PMAdam Cameron
a = [1,2,3]
a.each((cookie) => {
writeDump(cookie)
})
I've used a dumb variable name there (in the actual code I was looking over cookie values, so it made more sense 😉), but still.. I would expect 1,2,3
(and that's what I get on CF), but on Lucee I get three dumps of the cookie scope.
I think CF's behaviour is legit... my own variable should take precedence over inbuilt ones (even if they "hide" the inbuilt ones).
It was an edge case though and easily solved. Still... it's a CF incompat so should probably be addressed?leftbower
02/25/2022, 11:38 PMExtension/Applications
page in the server admin in any SNAP after 5.3.9.83 - is it just me? Filed:
https://luceeserver.atlassian.net/browse/LDEV-3890waleedehsan1
02/26/2022, 3:12 PM<cfcookie name="my_cookiesname" value="#mycookie_value#" expires="90" httponly="yes" secure="#application.x#" samesite="strict" />
But my Lucee said I don't know about samesite.
Here is error screen shot.
My Lucee version is Lucee 5.3.6.61
Can anybody help me why my Lucee is unable to idedidentify the samesite attribute?zackster
02/28/2022, 12:40 PMqueryparam
change with lucee 5.3.9.91, since 5.2.6, it would automatically set list=true
if it was an array, this automatic behavior has been disabled https://luceeserver.atlassian.net/browse/LDEV-3893Travis
02/28/2022, 11:00 PMzackster
03/02/2022, 8:10 PMthisOldDave
03/03/2022, 9:25 AM<cfdump output="console>
appears to get swallowed tomcat 8.5.63 Lucee 5.3.8.206 it is not in Catalina.out or stdout/stderror or the application.log in the lucee context where should I look or what am I missing, it is a lucee light install and I havent changed any of the standard output or log settingsDavid Rogers
03/04/2022, 10:04 PMimport Foo.Bar; // does this trigger a classload of Foo.Bar, or just fixup mappings
component {
function init() {
var x = Bar::staticProp; // guaranteed to be init'd?
}
}
mrtom
03/07/2022, 3:23 PMJim Priest
03/08/2022, 4:33 PMThere is too much code inside the template [summary.cfm], Lucee was not able to break it into pieces, move parts of your code to an include or an external component/function
Is there a setting I can override in Lucee to temporarily work around this error?
At this point I'm just trying to get as much of this working as I can and identify areas where we need to go back and fix issues and /or refactor without spending time actually refactoring :)zackster
03/09/2022, 8:28 PMSimone
03/10/2022, 10:23 PMdswitzer
03/11/2022, 1:36 PMryan
03/11/2022, 5:29 PMisValid
to be allowed as a member function?zackster
03/14/2022, 4:26 PMdswitzer
03/14/2022, 5:18 PMAdam Cameron
try {
radix = 36
result = CreateObject("java", "java.math.BigInteger").init("42", radix)
writeDump([result, radix.getClass().getName()]) // 146, java.lang.Double
} catch (any e) {
writeDump([e.message, e.detail])
}
What I'm wondering is... given radix
is a Double, and BigInteger doesn't implement a constructor that takes a Double for the radix (see https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/math/BigInteger.html), how this code runs, rather than giving something along the lines of "no suitable constructor found for BigInteger(String,Double)"dswitzer
03/15/2022, 12:41 PMlog4j-1.2.17.jar
into a folder that is loaded by the JVM via the classpath. I can run createObject("java", "org.apache.log4j.Logger")
and Lucee will load the JAR.
Now I have another JAR (let's call it Example.jar) being loaded via this.javaSettings
in the Application.cfc
and I have the loadColdFusionClassPath
property set to true
. I can call createObject()
to load classes in Example.jar and it an instance of a class is created.
However, the Example.jar is not able to see the log4j-1.2.17.jar
classes. Any attempts to initiate classes that rely on the Log4j v1 return a huge stacktrace, the root appears to be with a class loader issue:
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:476)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 137 more
If I move Example.jar into the same folder as log4j-1.2.17.jar
then everything works as expected. However, I'm trying to keep Example.jar in a path loaded by this.javaSettings
because it's updated frequently and I want to be able to dynamically reload the JAR.
Why would using Lucee's JavaLoader prevent the class from being found? Should this be working? Am I misunderstanding something?leftbower
03/15/2022, 8:17 PMjava.lang.NullPointerException
in Coldbox here:
coldbox\system\core\conversion\DataMarshaller.cfc
This is in a simple handler that just does:
var theBinary = fileReadBinary( file );
event.renderData( data=theBinary, type="PDF" );
Has anyone else experienced same? Dropping back to 5.3.9.92 fixes.zackster
03/15/2022, 10:44 PMdswitzer
03/16/2022, 1:56 PM<cfscript>
function test(){
var local = {modified=""};
return local.modified;
}
writeDump(test());
</cfscript>
When you run the above in any version of ACF, the test()
function returns an empty string. However, in Lucee it throws a key [MODIFIED] doesn't exist on line 3
exception.
Should I file a bug for this?