Skip to main content
Participant
April 1, 2019
Question

Libsodium DLL not being loaded into Coldfusion 11

  • April 1, 2019
  • 2 replies
  • 628 views

Hi,

I have an application running on colfusion server and i am trying to install it.

I have already done that with ColdFusion2016 and it is running smoothly yet when i try it on ColdFusion 11 i get an error.

The setup is as follows:

Under ColdFusion11/cfusion/lib:

I add:

libsodium.dll

libsodium-jna-1.0.4.jar

commons-codec-1.10.jar

jna-4.2.2.jar

And in the coldfusion Administrator, the lib path is added under Dcoldfusion.libPath

When trying to use it in a java class from the directory of ColdFusion Class Path ,

I am getting the error:

Could not initialize class com.muquit.libsodium jna.SodiumLibrary$SingletonHelper

In my java code:

i load the library through:

SodiumLibrary.setLibraryPath("C:/ColdFusion11/cfusion/lib/libsodium.dll");

and then i call:

SodiumLibrary.cryptoBoxSealOpen

Please advise,

    This topic has been closed for replies.

    2 replies

    BKBK
    Community Expert
    Community Expert
    April 3, 2019

    mr_louis_simion  wrote

    ...

    And in the coldfusion Administrator, the lib path is added under Dcoldfusion.libPath

    ...

    In my java code:

    i load the library through:

    SodiumLibrary.setLibraryPath("C:/ColdFusion11/cfusion/lib/libsodium.dll");

    ...

    As an alternative to that, do the following:

    1) Stop ColdFusion 11.

    2) Make a backup of the file C:/ColdFusion11/cfusion/bin/jvm.config. Give the backup copy the name C:/ColdFusion11/cfusion/bin/jvm.backup.

    3) Open the file jvm.config in a text editor. At the end of the line corresponding to the setting java.library.path, add a comma, followed by {application.home}/lib/libsodium.dll

    4) Save the file (as C:/ColdFusion11/cfusion/bin/jvm.config).

    5) Restart ColdFusion 11.

    Inspiring
    April 2, 2019

    Wild guess. One is a 64 bit install, the other is a 32 bit installation and the DLL only corresponds to one.