Highlighted

Cannot get BCrypt to work in CF11

LEGEND ,
Dec 05, 2015

Copy link to clipboard

Copied

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,

^_^

Adobe Community Professional
Correct answer by BKBK | Adobe Community Professional

There is an array in there:

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

Views

624

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Cannot get BCrypt to work in CF11

LEGEND ,
Dec 05, 2015

Copy link to clipboard

Copied

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,

^_^

Adobe Community Professional
Correct answer by BKBK | Adobe Community Professional

There is an array in there:

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

Views

625

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Dec 05, 2015 0
Adobe Community Professional ,
Dec 06, 2015

Copy link to clipboard

Copied

There is an array in there:

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 06, 2015 0
LEGEND ,
Dec 07, 2015

Copy link to clipboard

Copied

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,

^_^

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 07, 2015 0
LEGEND ,
Dec 08, 2015

Copy link to clipboard

Copied

I haven't tested it, yet, but it did not error when I tried to create the instance, so I'm going to assume that your answer is the correct one.

Thank you, BKBK‌!

V/r,

^_^

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 08, 2015 0