Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-1708

sun.security.rsa.RSAPrivateCrtKeyImpl cannot be cast to javax.crypto.SecretKey

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • None
    • None
    • None

    Description

      When I used ENCRYPT with key_store like this:
      <config xmlns="urn:org:jgroups" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.3.xsd">
      <TCP />
      <MPING />
      <MERGE2 />
      <FD />
      <VERIFY_SUSPECT />
      <ENCRYPT key_store_name="server.keystore" store_password="changeit" alias="tomcat"/>
      <pbcast.NAKACK />
      <UNICAST3 />
      <pbcast.GMS />
      <UFC />
      <MFC />
      <STATS />
      <pbcast.STATE_SOCK />
      </config>

      When I start the first Cluster it is OK, but when I start the second Cluster it throw:
      Exception in thread "main" java.lang.ClassCastException: sun.security.rsa.RSAPrivateCrtKeyImpl cannot be cast to javax.crypto.SecretKey
      at org.jgroups.protocols.ENCRYPT.initConfiguredKey(ENCRYPT.java:274)
      at org.jgroups.protocols.ENCRYPT.init(ENCRYPT.java:234)
      at org.jgroups.stack.ProtocolStack.initProtocolStack(ProtocolStack.java:848)
      at org.jgroups.stack.ProtocolStack.setup(ProtocolStack.java:467)
      at org.jgroups.JChannel.init(JChannel.java:830)
      at org.jgroups.JChannel.<init>(JChannel.java:158)
      at org.jgroups.JChannel.<init>(JChannel.java:138)

      Attachments

        Activity

          People

            rhn-engineering-bban Bela Ban
            KimShen shen kim (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: