Skip to main content
WolfShade
Legend
Dec 5, 2015 11:06 PM UTC
Answered

Cannot get BCrypt to work in CF11

Hello, all,

I'm trying to get bcrypt to work in CF11 server, and I'm banging my head into a wall.

I've got the following in my application.cfc file:

this.jsPath = "/path/to/html/classes/";

this.javaSettings = {LoadPath = this.jsPath};

The path is where I have placed "BCrypt.class" file downloaded from GitHub.

This, by itself, doesn't cause any problems.  But adding the following causes it to error, and it will NOT see the application scoped variables (like the onError email address that I'm setting):

bcrypt = CreateObject("java","BCrypt");

This breaks everything and even the error template won't display.  What am I missing?

Thank you,

^_^

    This topic is closed to new replies. Start a new post to keep the conversation going.
    BKBK
    BKBKCorrect answer
    Community Expert
    Dec 6, 2015 3:10 PM UTC

    There is an array in there:

    this.javaSettings = {LoadPaths = ["/path/to/html/classes/"]};

    3 replies

    BKBK
    Community Expert
    BKBKCommunity ExpertCorrect answer
    Community Expert
    Dec 6, 2015 3:10 PM UTC

    There is an array in there:

    this.javaSettings = {LoadPaths = ["/path/to/html/classes/"]};

    Translate
    WolfShade
    WolfShadeAuthor
    Legend
    Dec 7, 2015 2:32 PM UTC

    Hi, BKBK‌,

    I'll give that a shot after I get home from work.  If that does work, I'll contact aliaspooryorik and let him know (I got instructions from one of his blogs.)

    Thanks!

    V/r,

    ^_^

    Translate