We're updating the issue view to help you get more done. 

createObject java types - 'cannot load class through its string name'


We have a Java .class file, BCrypt, that we use for authentication.

We specify the location of the class file with the following line in Application.cfc:

<cfset this.javaSettings={LoadPaths=["/inleague/javascript/CFJava"],reloadOnChange=true,watchInterval=30}/>

In our code, we instantiate it as follows:

var bCrypt = createObject("java","BCrypt");

In ACF 10 and (as I recall) Lucee 4.5, this works.

In Lucee 5,it produces the following error:

cannot load class through its string name, because no definition for the class with the specified name [BCrypt] could be found

Unless I add a third parameter:

var bCrypt = createObject("java","BCrypt",'/inleague/javascript/CFJava/');

It's easy enough to specify the location for the handful of instances where we use this, but it appears (on the surface, anyway) that Lucee 5 is not respecting the javaSettings application property.




Michael Offner


Samuel W. Knowlton

Fix versions

Affects versions