Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

JSS setup incorrectly? Cryptomanager will not initialize.

144 views
Skip to first unread message

joshuaaa

unread,
May 24, 2008, 9:35:38 PM5/24/08
to
Hello,

I installed jss today and attempted to run a test application with no
luck. I've gone through many previous posts here and read the "using
jss" section multiple times... still haven't figured out what the
problem is. The cryptomanager will not initialize because apparently
my jss4.dll can't find *something*... what ever that happens to be.

The error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\jss\lib
\jss4.dll:
The specified procedure could not be found
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at
org.mozilla.jss.CryptoManager.loadNativeLibraries(CryptoManager.java:
1339)
at org.mozilla.jss.CryptoManager.initialize(CryptoManager.java:
827)
at org.mozilla.jss.CryptoManager.initialize(CryptoManager.java:
800)

C:\jss\lib has all of the .dll's from the NSS and NSPR binary distro
lib folder AND jss4.jar, jss4.dll.

Environment vars:
CLASSPATH = C:\jss\lib\jss4.jar
PATH = C:\jss\lib\
(have tried the path with and without the trailing \)

Operating System: Vista
Java -version:
java version "1.6.0_05"
Java(TM) SE Runtime Environment (build 1.6.0_05-b13)

I have tried WINNT and WIN954 builds for NSS 3.9.2 and NSPR 4.6.4...
what's the difference?
Am I missing something?

All input is welcome and much appreciated.

Nelson B Bolyard

unread,
May 25, 2008, 4:52:53 PM5/25/08
to mozilla's crypto code discussion list
joshuaaa wrote, On 2008-05-24 18:35:

> I installed jss today and attempted to run a test application with no
> luck. I've gone through many previous posts here and read the "using
> jss" section multiple times... still haven't figured out what the
> problem is. The cryptomanager will not initialize because apparently
> my jss4.dll can't find *something*... what ever that happens to be.

Actually, it's trying to load jss4.dll and is saying it can't do so.
Major clues at
http://www.google.com/search?q=java.lang.UnsatisfiedLinkError+jss4.dll

> The error:
> Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\jss\lib\jss4.dll:
> The specified procedure could not be found
> at java.lang.ClassLoader$NativeLibrary.load(Native Method)
> at java.lang.ClassLoader.loadLibrary0(Unknown Source)
> at java.lang.ClassLoader.loadLibrary(Unknown Source)
> at java.lang.Runtime.loadLibrary0(Unknown Source)
> at java.lang.System.loadLibrary(Unknown Source)
> at
> org.mozilla.jss.CryptoManager.loadNativeLibraries(CryptoManager.java:1339)
> at org.mozilla.jss.CryptoManager.initialize(CryptoManager.java:827)
> at org.mozilla.jss.CryptoManager.initialize(CryptoManager.java:800)

The source is seen at
<http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/security/jss/org/mozilla/jss/CryptoManager.java&rev=1.50&mark=800,827#781>
and
<http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/security/jss/org/mozilla/jss/CryptoManager.java&rev=1.50&mark=1335,1339#1331>

> Environment vars:
> CLASSPATH = C:\jss\lib\jss4.jar
> PATH = C:\jss\lib\
> (have tried the path with and without the trailing \)

If that's really your whole PATH, that's the problem. In that case,
it seems that you have replaced your normal PATH with the above string,
instead of ADDING the above string to the normal path. jss4.dll needs
other system shared libraries to load, but can't find them because the
PATH doesn't contain the location of the other system shared libraries.
Try PREPENDING that to the normal path, e.g. in Windows command prompt.
Try

set PATH=C:\jss\lib;%PATH%

or, if you use a UNIX-like shell on Windows, try

PATH="C:/jss/lib;$PATH"; export PATH

> Operating System: Vista
> Java -version:
> java version "1.6.0_05"
> Java(TM) SE Runtime Environment (build 1.6.0_05-b13)
>
> I have tried WINNT and WIN954 builds for NSS 3.9.2 and NSPR 4.6.4...
> what's the difference?
> Am I missing something?
>
> All input is welcome and much appreciated.

Disclaimer: I am not the JSS guru. You may get a better answer from our
JSS guru in a few days.

joshuaaa

unread,
May 26, 2008, 1:26:29 PM5/26/08
to
Nelson,

My PATH is definitely not just that string :) I appended the jss/lib
directory to my PATH.

When does the JSS guru return?

BTW, thanks for taking a look.

Glen Beasley

unread,
May 27, 2008, 2:45:39 PM5/27/08
to mozilla's crypto code discussion list
Nelson B Bolyard wrote:
joshuaaa wrote, On 2008-05-24 18:35:

  
I installed jss today and attempted to run a test application with no
luck. I've gone through many previous posts here and read the "using
jss" section multiple times... still haven't figured out what the
problem is. The cryptomanager will not initialize because apparently
my jss4.dll can't find *something*... what ever that happens to be.
    
Actually, it's trying to load jss4.dll and is saying it can't do so.
Major clues at
http://www.google.com/search?q=java.lang.UnsatisfiedLinkError+jss4.dll

  
The error:


  
Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\jss\lib\jss4.dll:
The specified procedure could not be found
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    
nelson's correct the jss4.dll is not able to load. if the jss4.dll is indeed in your path then
jss4.dll library dependencies are not. JSS needs to load the NSS and NSPR libraries as well.

Please check your path.

http://www.mozilla.org/projects/security/pki/jss/using_jss.html

A good way to ensure you have your path correct is to use the JSS test programs start with

java -cp jss4.jar org.mozilla.jss.tests.SetupDBs . ./passwords

http://mxr.mozilla.org/security/source/security/jss/org/mozilla/jss/tests/SetupDBs.java
where the  format of  the passwords file is
http://mxr.mozilla.org/security/source/security/jss/org/mozilla/jss/tests/passwords

-glen
        at java.lang.ClassLoader.loadLibrary0(Unknown Source)
        at java.lang.ClassLoader.loadLibrary(Unknown Source)
        at java.lang.Runtime.loadLibrary0(Unknown Source)
        at java.lang.System.loadLibrary(Unknown Source)
        at
org.mozilla.jss.CryptoManager.loadNativeLibraries(CryptoManager.java:1339)
        at org.mozilla.jss.CryptoManager.initialize(CryptoManager.java:827)
        at org.mozilla.jss.CryptoManager.initialize(CryptoManager.java:800)
    
The source is seen at

  
Environment vars:
CLASSPATH = C:\jss\lib\jss4.jar
PATH = C:\jss\lib\
(have tried the path with and without the trailing \)
    
If that's really your whole PATH, that's the problem.  In that case,
it seems that you have replaced your normal PATH with the above string,
instead of ADDING the above string to the normal path.  jss4.dll needs
other system shared libraries to load, but can't find them because the
PATH doesn't contain the location of the other system shared libraries.
Try PREPENDING that to the normal path, e.g. in Windows command prompt.
Try

set PATH=C:\jss\lib;%PATH%

or, if you use a UNIX-like shell on Windows, try

PATH="C:/jss/lib;$PATH"; export PATH

  
Operating System: Vista
Java -version:
java version "1.6.0_05"
Java(TM) SE Runtime Environment (build 1.6.0_05-b13)

I have tried WINNT and WIN954 builds for NSS 3.9.2 and NSPR 4.6.4...
what's the difference?
Am I missing something?

All input is welcome and much appreciated.
    
Disclaimer: I am not the JSS guru.  You may get a better answer from our
JSS guru in a few days.
_______________________________________________
dev-tech-crypto mailing list
dev-tec...@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto
  

joshuaaa

unread,
May 27, 2008, 6:26:11 PM5/27/08
to
On May 27, 1:45 pm, Glen Beasley <Glen.Beas...@Sun.COM> wrote:
> Nelson B Bolyard wrote:
> > joshuaaa wrote, On 2008-05-24 18:35:
>
> >> I installed jss today and attempted to run a test application with no
> >> luck. I've gone through many previous posts here and read the "using
> >> jss" section multiple times... still haven't figured out what the
> >> problem is. The cryptomanager will not initialize because apparently
> >> my jss4.dll can't find *something*... what ever that happens to be.
>
> > Actually, it's trying to load jss4.dll and is saying it can't do so.
> > Major clues at
> >http://www.google.com/search?q=java.lang.UnsatisfiedLinkError+jss4.dll
>
> The error:
> >> Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\jss\lib\jss4.dll:
> >> The specified procedure could not be found
> >> at java.lang.ClassLoader$NativeLibrary.load(Native Method)
>
> nelson's correct the jss4.dll is not able to load. if the jss4.dll is
> indeed in your path then
> jss4.dll library dependencies are not. JSS needs to load the NSS and
> NSPR libraries as well.
>
> Please check your path.
>
> http://www.mozilla.org/projects/security/pki/jss/using_jss.html
>
> A good way to ensure you have your path correct is to use the JSS test
> programs start with
>
> java -cp jss4.jar org.mozilla.jss.tests.SetupDBs . ./passwords
>
> http://mxr.mozilla.org/security/source/security/jss/org/mozilla/jss/t...
> where the format of the passwords file ishttp://mxr.mozilla.org/security/source/security/jss/org/mozilla/jss/t...

>
> -glen
>
> >> at java.lang.ClassLoader.loadLibrary0(Unknown Source)
> >> at java.lang.ClassLoader.loadLibrary(Unknown Source)
> >> at java.lang.Runtime.loadLibrary0(Unknown Source)
> >> at java.lang.System.loadLibrary(Unknown Source)
> >> at
> >> org.mozilla.jss.CryptoManager.loadNativeLibraries(CryptoManager.java:1339)
> >> at org.mozilla.jss.CryptoManager.initialize(CryptoManager.java:827)
> >> at org.mozilla.jss.CryptoManager.initialize(CryptoManager.java:800)
>
> > The source is seen at
> > <http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/security/jss/org/...>
> > and
> > <http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/security/jss/org/...>
> > dev-tech-cry...@lists.mozilla.org
> >https://lists.mozilla.org/listinfo/dev-tech-crypto

Thanks for taking a look guys. My path/classpath was correct. I did a
fresh install on an XP machine and everything went smoothly, so I
hopped back on my vista machine and tried again, odd enough,
everything works now. I'm assuming I had wrong binaries for either
NSPR or NSS.

0 new messages