Uploaded image for project: 'Lucee Development'
  1. LDEV-604

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

    Details

    • Type: Bug
    • Status: Deployed
    • Priority: New
    • Resolution: Fixed
    • Affects Version/s: 5.0.0.98
    • Fix Version/s: 5.0.0.230
    • Labels:
      None

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              michaeloffner Michael Offner
              Reporter:
              Aquitaine Samuel Knowlton
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: