http://coldfusion.com logo
Join Slack
Powered by
# box-products
  • f

    Fritz

    07/11/2022, 6:07 PM
    Hi, is it possible to export/import REST mappings using cfconfig? I just found this question from 2019 with no answer: https://dev.lucee.org/t/commandbox-cfconfig-and-rest/5441 I need to import REST mapping using a configuration file and I also did not find anything in the commandbox docs. Thanks
    b
    l
    • 3
    • 12
  • c

    cubortea

    07/12/2022, 10:59 AM
    today lucee.extention.org was down, and all my application under docker-commandbox has problem. After lucee.extention.org up again, all back normal. I try to reproduce this problem in my local installation, I turn off my internet, after that I run docker-compose up, in the log I saw the same error when lucee.extention.org was down: ERROR: Failed to download the bundle [log4j:1.2.17] from [http://release.lucee.org/rest/update/provider/download/log4j/1.2.17/?serverId=c25a2e22f6da9088aeeedf932120a75a&serverSecurityKey=aed6b5d8-0b75-4316-9db0-d9444f11a41f&allowRedirect=true&jv=11.0.15] and copy to [/root/serverHome/WEB-INF/lucee-server/bundles/log4j-1-2-17.jar] after that my redis extension has problem too [ERROR] runwar.context: lucee.runtime.exp.NativeException: cannot load class through its string name, because no definition for the class with the specified name [ortus.extension.cache.redis.RedisCache] could be found caused by (java.lang.ClassNotFoundException:ortus.extension.cache.redis.RedisCache not found by lucee.core [49]; java.lang.ClassNotFoundException:ortus.extension.cache.redis.RedisCache;) is it possible to make my installation independent without any download to other website (http://release.lucee.org) ? FYI, all my lucee extension is already independent, I already copy it to ${BOX_SERVER_APP_SERVERHOMEDIRECTORY}/WEB-INF/lucee-server/deploy/
    • 1
    • 1
  • c

    cubortea

    07/12/2022, 11:05 AM
    I forgot to inform , I use docker-commandbox with image jdk11-3.5.3 (commandBoc 5.5.2) with lucee version 5.3.9.141
  • c

    cubortea

    07/12/2022, 1:08 PM
    what make me strange, commandBox 5.5.1 already use log4j-2.17.1 why this still download 1.2.17
  • l

    lmajano

    07/12/2022, 1:59 PM
    that's a good question
  • l

    lmajano

    07/12/2022, 1:59 PM
    @bdw429s can you assist here
  • b

    bdw429s

    07/12/2022, 4:08 PM
    This is really a question to ask the Lucee team.
  • b

    bdw429s

    07/12/2022, 4:09 PM
    In theory, a warmed up container will already have everything downloaded so it doesn't need to download anything else at runtime.
  • b

    bdw429s

    07/12/2022, 4:10 PM
    But the behavior of downloading bundles on the fly is a lucee thing.
    c
    • 2
    • 9
  • g

    gpickin

    07/12/2022, 4:59 PM
    Going live now - CFML News Podcast -

    https://youtu.be/Lon8ghRKRvQ▾

  • a

    Adam Cameron

    07/12/2022, 10:19 PM
    Hey BoxPeople. Just spotted a ColdBox-specific Q on StackOverflow... https://stackoverflow.com/q/72936709/894061
    👍 2
  • s

    simiane

    07/14/2022, 9:22 AM
    Hi all, I'm using Cachebox 6.1.0+1309 on my (non-ColdBox) application, using a few different DiskStores to cache various objects. In general, all is well... however, I occasionally get a locking problem with accessing an object in the store, and once it happens the lock is never released. All subsequent requests hit lock timeouts. The error occurs in the
    get
    function in
    DiskStore.cfc
    . There is an exclusive lock, which throws an error like this:
    "A timeout occurred while attempting to lock DiskStore.814767090.image_3081_3145ee96fbf2496f0de48c0efbbba15a."
    I'm not sure how to go about debugging this... Presumably I should update my version, and clearly I could benefit from some graceful handling of the problem... but I can't see why the it occurs in the first place, and there seems to be no pattern to it. Anyone have any thoughts?
  • l

    lmajano

    07/14/2022, 2:28 PM
    I think you should try updating to 6.7 first
  • l

    lmajano

    07/14/2022, 2:28 PM
    then report back if it continues
  • l

    lmajano

    07/14/2022, 2:28 PM
    concurrency issues are a pain
  • l

    lmajano

    07/14/2022, 2:28 PM
    and sometimes recreating the load can be impossible
  • s

    simiane

    07/14/2022, 2:52 PM
    Hi @lmajano, thanks for the response. I've updated to 6.7... it'll be some time before I can tell whether I'm getting the same issues - but a new problem seems to be cropping up now, in the
    objectMarshaller.cfc
    at line 70: The parameter 1 of function ToBinary, which is now xxxx must be a base-64 encoded string. I'm trying to set up a test case, but this looks to be a similar scenario whereby the error only happens occasionally and the majority of calls are successful.
  • s

    simiane

    07/14/2022, 3:17 PM
    Ok, I'm able to replicate this now... I can't tell you why though! So, I have an item in a diskstore cache with a specific key. The contents of the item is a simple string. If I just call
    getCache('MyCacheName').get('MyCacheKey')
    a bunch of times (I'm doing it 10,000 times in a loop), I can get the error to appear. I assume it's some kind of race condition. Cachebox is instantiated as a singleton in the server scope and called by multiple sites.
    p
    l
    • 3
    • 9
  • d

    dbinott

    07/14/2022, 6:10 PM
    What is best practice for things like table row looping from a record set? Is that to be kept out of the view? In the model?
    g
    a
    r
    • 4
    • 23
  • d

    Daniel Mejia

    07/14/2022, 10:17 PM
    Is this normal for CacheBox?
    Copy code
    2022-07-14 14:58:50 coldbox.system.cache.providers.CacheBoxColdBoxProvider Starting to reap CacheBoxProvider: quickMeta, id: 777526668
    2022-07-14 14:58:50 coldbox.system.cache.providers.CacheBoxColdBoxProvider Finished reap in 1ms for CacheBoxProvider: quickMeta, id: 777526668
    2022-07-14 14:58:56 coldbox.system.cache.providers.CacheBoxColdBoxProvider Starting to reap CacheBoxProvider: default, id: 650428702
    2022-07-14 14:58:56 coldbox.system.cache.providers.CacheBoxColdBoxProvider Starting to reap CacheBoxProvider: TEMPLATE, id: 1236036316
    2022-07-14 14:58:56 coldbox.system.cache.providers.CacheBoxColdBoxProvider Finished reap in 1ms for CacheBoxProvider: default, id: 650428702
    2022-07-14 14:58:56 coldbox.system.cache.providers.CacheBoxColdBoxProvider Finished reap in 1ms for CacheBoxProvider: TEMPLATE, id: 1236036316
    2022-07-14 14:59:15 coldbox.system.cache.providers.CacheBoxColdBoxProvider Starting to reap CacheBoxProvider: quickMeta, id: 1292892883
    2022-07-14 14:59:15 coldbox.system.cache.providers.CacheBoxColdBoxProvider Finished reap in 1ms for CacheBoxProvider: quickMeta, id: 1292892883
    l
    • 2
    • 18
  • d

    David Rogers

    07/15/2022, 2:18 PM
    should qb emit the cte here?
    Copy code
    cte = getInstance("QueryBuilder@qb").with("cte", (q) => {
        q.from("t1").select("c1")
    }).from("target").update(values={
        "target.c1": getInstance("QueryBuilder@qb").from("cte").select("c1")
    }, toSql=true)
    
    // exactly `UPDATE [target] SET [c1] = cte.c1`
    // expected `;with cte as (select c1 from t1) UPDATE ...` ?
    writedump(cte);
  • p

    Peter Hoopes

    07/16/2022, 12:46 AM
    Apologies for the noob question: I’ve been watching the LogBox 101 videos and reading the docs. A quick question - instantiating the LogBox system in the
    application
    scope makes sense, but in the demos (and in the docs) the pages create a new
    log
    object from
    application.LogBox
    and then run its methods. Do I have to create a new
    log
    object on each page or can there be something else in a broader scope? I’d like to just be able to call the
    log.error();
    commands where needed. Either I’m dumb and should know that I have to create the
    log
    object or there’s another place to put it. Any pointers would be appreciated.
    b
    • 2
    • 18
  • e

    elpete

    07/16/2022, 1:31 AM
    Wait for the
    Categories
    video. 🙂
  • e

    elpete

    07/16/2022, 1:31 AM
    In general, one
    log
    in the
    application
    scope is fine, but LogBox allows you to create multiple loggers for logging granularity.
  • e

    elpete

    07/16/2022, 1:32 AM
    This allows you to turn on debug logging for one logger but not for another.
  • e

    elpete

    07/16/2022, 1:33 AM
    Here’s some reading if you are interested: https://logbox.ortusbooks.com/configuration/configuring-logbox/logbox-dsl#categories https://logbox.ortusbooks.com/configuration/configuring-logbox/adding-categories-to-specific-loggin-levels https://logbox.ortusbooks.com/configuration/configuring-logbox/adding-categories-granularly
    👍 1
  • t

    Tyler Clendenin

    07/19/2022, 3:33 PM
    anyone seen this error when running commandbox 5.5.2+00578 on windows with OpenJDK 17.0.2+8 LTS
    Copy code
    Unable to make public boolean sun.nio.ch.FileLockImpl.isValid() accessible: module java.base does not "exports <http://sun.nio.ch|sun.nio.ch>" to unnamed module @35390ee3
      caused by: java.lang.reflect.InaccessibleObjectException
      Unable to make public boolean sun.nio.ch.FileLockImpl.isValid() accessible: module java.base does not "exports <http://sun.nio.ch|sun.nio.ch>" to unnamed module @35390ee3
    seems to not be an issue with an earlier JDK (the bundled one)
    r
    b
    • 3
    • 5
  • a

    Aubrey C.

    07/19/2022, 4:25 PM
    I’m setting the admin passwords in the cfconfig and I’ve also tried the using an .env file:
    Copy code
    12:14:51    |   | Found OS environment variable [cfconfig_web_adminPassword]
    12:14:51    |   | Found OS environment variable [cfconfig_adminPassword]
    12:14:51    |   | Found OS environment variable [cfconfig_adminPasswordDefault]
    Copy code
    12:14:51    |   | Found OS environment variable [cfconfig_web_adminPassword]
    12:14:51    |   | Found OS environment variable [cfconfig_adminPassword]
    12:14:51    |   | Found OS environment variable [cfconfig_adminPasswordDefault]
    12:14:51    |   | Importing into [luceeweb]...
    12:14:51    |   | [adminPassword] set.
    12:14:51    |   | Importing into [luceeserver]...
    12:14:51    |   | [adminPassword] set.
    12:14:51    |   | [adminPasswordDefault] set.
    However, I’m still getting an error when the app runs.
    Copy code
    The key [CFCONFIG_ADMINPASSWORD] does not exist, only the following keys are available:  APP, APP_DIR, AWS_EXECUTION_ENV, BIN_DIR, BOX_SERVER_APP_CFENGINE ...
    anyone know how to resolve this?
    b
    • 2
    • 3
  • g

    gpickin

    07/19/2022, 5:01 PM
    CFML News Podcast - going live -

    https://youtu.be/UGyXU0RzMxQ▾

  • c

    cfvonner

    07/19/2022, 11:01 PM
    I'm having trouble setting up a cbValidation custom validation udf. In the documentation example (https://coldbox-validation.ortusbooks.com/advanced/advanced-custom-validators#closure-lambda-validator) a lambda is used to define the udf. As far as I know, that syntax is only available in CF2021 and Lucee 5. I'm using CF2018 and am struggling with how to write that udf without using a lambda (
    =>
    ) expression. Here's my cbValidation code:
    Copy code
    cbValidation.validateOrFail(
        target = rc,
        constraints = {
            facilityid : {
                required : true,
                requiredMessage : "A {field} (FID) must be provided."
                type : "integer",
                typeMessage : "The {field} must be a whole number greater than 1.",
                min : "1",
                minMessage : "The {field} must be a whole number greater than 1.",
                udf : function ( value, target ) {
                    if( isNull( arguments.value ) ) return false;
                    return ecFacilityService.getByFacilityID( facilityid = arguments.value, lazyload = true ).len() > 0;
                },
                udfMessage : "There are no facilities with a {field} value of {rejectedValue}."
            }
        }
    );
    This throws a ColdFusion "Invalid Construct: Either argument or name is missing". Not sure what I'm doing wrong.
    c
    a
    • 3
    • 12
1...91011...30Latest