Menu

java.security.NoSuchAlgorithmException

Help
2000-08-26
2001-05-29
  • Kelly Campbell

    Kelly Campbell - 2000-08-26

    On linux with JDK1.2.2 I get the following exception while trying to run UserConfig:

    camk@penguin:~/imjay-0.1.1> java -cp imjay-0.1.1.jar:lib/jabberbeans.jar:lib/jce1_2-do.jar:lib/xalan-1.2.jar:lib/xerces-1.1.2.jar:lib/xmlproperties-0.2.1.jar net.mccune.tim.chat.tools.UserConfig
    First name: Kelly
    Last name: Campbell
    Generating encryption key...
    FATAL ERROR
    java.security.NoSuchAlgorithmException: KeyPairGenerator not available
        at java.security.Security.getEngineClassName(Security.java:340)
        at java.security.Security.getEngineClassName(Security.java:350)
        at java.security.Security.getImpl(Security.java:602)
        at java.security.KeyPairGenerator.getInstance(KeyPairGenerator.java:149)    at net.mccune.tim.chat.KeyGenerator.generateKeyPair(KeyGenerator.java:31)
        at net.mccune.tim.chat.tools.UserConfig.main(UserConfig.java:43)

     
    • Tim McCune

      Tim McCune - 2000-08-26

      Thanks Kelly.  Nice to see someone's actually trying to use Imjay. :-)
      This problem is because I left something out of README.  I just added the following step to the setup instructions:

      1) If you do not already have the Java Cryptography Extension (JCE) installed, you must install it.  To do this, open the file lib\security\java.security under your JRE home.  Add the following line to the java.security file, substituting the preference order    of "SunJCE" for n:
      security.provider.n=com.sun.crypto.provider.SunJCE

      I'm going to fix a bug and then release 0.1.2 with the updated README.  Let me know if you have any more problems.  Thanks.

       
      • Anonymous

        Anonymous - 2000-10-26

        Hi, even though I modify java.security I am still get same error

        I wrote this on my java.security file
        security.provider.1=com.sun.crypto.privoder.SunJCE

        Thanks

         
    • Anonymous

      Anonymous - 2001-05-29

      I got the "User Sucessfully saved" message, now what ??? I tried to run the chat.bat file, but it gives me th following error:

      D:\DOWNLO~1\INTRAM~1\ImSecure>chat
      java.lang.NullPointerException
              at org.imjay.protocols.jabber.Registrar.signOn(Registrar.java:45)
              at org.imjay.protocols.jabber.JabberClient.<init>(JabberClient.java:84)
              at org.imjay.Chat.main(Chat.java:74)
      Unknown/invalid root element: stream:error
              at org.jabber.jabberbeans.sax.JabberDocumentHandler.handleStartElement(J
      abberDocumentHandler.java:94)
              at org.jabber.jabberbeans.sax.SubHandler.startElement(SubHandler.java:10
      2)
              at com.microstar.xml.SAXDriver.startElement(SAXDriver.java:373)
              at com.microstar.xml.XmlParser.parseElement(XmlParser.java:945)
              at com.microstar.xml.XmlParser.parseContent(XmlParser.java:1118)
              at com.microstar.xml.XmlParser.parseElement(XmlParser.java:947)
              at com.microstar.xml.XmlParser.parseDocument(XmlParser.java:496)
              at com.microstar.xml.XmlParser.doParse(XmlParser.java:176)
              at com.microstar.xml.XmlParser.parse(XmlParser.java:146)
              at com.microstar.xml.SAXDriver.parse(SAXDriver.java:173)
              at org.jabber.jabberbeans.sax.InputStreamHandler.run(InputStreamHandler.
      java:68)
      ISH: SAX:Unknown/invalid root element: stream:error

      Also what do I put in for "Jabber host" in the userConfig file ???

       
      • Tim McCune

        Tim McCune - 2001-05-29

        Your last sentence explains the error message. :)  The Jabber server that you are connecting to is defined in imjay.xml under <server><host>.  This host name needs to match the jabber host in your user config.  The NPE that you are seeing is very likely happening because they currently do not match.  Hope that helps.

         
        • Anonymous

          Anonymous - 2001-05-29

          Cool...Thanks !!!

          No the console has been initialized, How do I send a message and to who ??? (list of registered users ?? ) Also I am automatically disconnected in a few seconds after login on ....

           

Log in to post a comment.