RE: [javagroups-users] ENCRYPT1_4 Problem
Brought to you by:
belaban
From: Ian L. <ian...@hu...> - 2004-07-26 20:37:25
|
I have managed to get things somewhat up & running (the problem was that my RSA provider could not be located). However, I'm seeing another problem: I'm working with a small test app written specifically for playing with this stuff; the test app is a small gui that bounces a packet of data from one instance of the test programme running on one machine to another instance of the same programme running on a different physical machine, updating an integer with each bounce. I am able to start up the first instance without any trouble but when I start the second instance of the programme, I see the following exceptions repeated over and over in the debug window for the second instance (the first instance continues to run quite happily): java.security.spec.InvalidKeySpecException: Inappropriate key specification at com.sun.crypto.provider.DESKeyFactory.engineGenerateSecret(DashoA6275) at javax.crypto.SecretKeyFactory.generateSecret(DashoA6275) at org.jgroups.protocols.ENCRYPT1_4.decodedKey(ENCRYPT1_4.java:534) at org.jgroups.protocols.ENCRYPT1_4.up(ENCRYPT1_4.java:340) at org.jgroups.stack.UpHandler.run(Protocol.java:55) This is not a machine specific problem as the problem always occurs on the second instance of the programme. The two machines do not appear to be finding each other. I added the PRINT protocol to the stack and I see that the first machine is reporting a "java.io.StreamCorruptedHeader: invalid stream header" at the same time as the second machine is reporting the InvalidKeySpecExtension shown above. I should also add that I am using the latest Bouncy Castle provider: bcprov-jdk14-124.jar -----Original Message----- From: Bela Ban [mailto:be...@ya...] Sent: Monday, July 26, 2004 9:03 PM To: Ian Littlewood Cc: jav...@li... Subject: Re: [javagroups-users] ENCRYPT1_4 Problem Why don't you debug the JChannel constructor - I cannot tell from here what's wrong. You could also enable full logging to see what's going on Ian Littlewood wrote: >The entire stack trace won't be of much use as the remaining stack >trace is my code, but here it is: > >ChannelException: JChannel(): java.lang.ExceptionInInitializerError > at org.jgroups.JChannel.<init>(JChannel.java:151) > at test.EncryptFrame.initJGroups(EncryptFrame.java:176) <-- > at test.EncryptFrame.<init>(EncryptFrame.java:85) > at test.EncryptFrame.main(EncryptFrame.java:283) > >The line marked with an arrow is the point at which, in my code, I >call: > >Jchannel channel = new Jchannel(stack) > > > >-----Original Message----- >From: Bela Ban [mailto:be...@ya...] >Sent: Monday, July 26, 2004 7:21 PM >To: Ian Littlewood >Cc: jav...@li... >Subject: Re: [javagroups-users] ENCRYPT1_4 Problem > > >Somebody's working on a rewrite of ENCRYPT, so maybe that person has a >look ? I forgot who it is .. > >Can you post the entire stack trace ? > >Ian Littlewood wrote: > > > >>I'm trying to use the ENCRYPT1_4 protocol and having no luck. I'm >>using >>Jgroups 2.2 and JDK 1.4.2_03 and I've followed the instructions in the >>\doc\ENCRYPT.html directory but whenever Itry to use the ENCRYPT1_4 >>protocol, I get the following exception at the point where I create a >>new Jchannel and pass it the stack: >> >>ChannelException: JChannel(): java.lang.ExceptionInInitializerError >>at org.jgroups.JChannel.<init>(JChannel.java:151) >><remainder omitted> >> >>My stack is as follows: >> >>org.jgroups.protocols.UDP(mcast_recv_buf_size=64000;mcast_send_buf_siz >>e >>=3200 >>0;mcast_port=45566;use_packet_handler=false;ucast_recv_buf_size=64000;mcas t >> >> >_ > > >>addr=228.8.8.8;loopback=true;ucast_send_buf_size=32000;ip_ttl=32): >>org.jgroups.protocols.PING(timeout=2000;num_initial_members=3): >>org.jgroups.protocols.MERGE2(max_interval=10000;min_interval=5000): >>org.jgroups.protocols.FD(timeout=2000;max_tries=3;shun=true): >>org.jgroups.protocols.VERIFY_SUSPECT(timeout=1500): >>org.jgroups.protocols.pbcast.NAKACK(max_xmit_size=8192;use_mcast_xmit= >>false >> >> >; > > >>gc_lag=50;retransmit_timeout=600,1200,2400,4800): >>org.jgroups.protocols.UNICAST(timeout=1200,2400,3600): >>org.jgroups.protocols.pbcast.STABLE(stability_delay=1000;desired_avg_g >>ossip >> >> >= > > >>20000;max_bytes=0): >>org.jgroups.protocols.FRAG(frag_size=8192;down_thread=false;up_thread= >>false >> >> >) > > >>: >>org.jgroups.protocols.ENCRYPT1_4(symInit=56;asymInit=512;symAlgorithm= >>DES/E >> >> >C > > >>B/PKCS5Padding;asymAlgorithm=RSA): >>org.jgroups.protocols.pbcast.GMS(print_local_addr=true;join_timeout=30 >>00;jo >> >> >i > > >>n_retry_timeout=2000;shun=true) >> >>If anyone has any ideas, they'd be appreciated. :) >> >> >>------------------------------------------------------- >>This SF.Net email is sponsored by BEA Weblogic Workshop >>FREE Java Enterprise J2EE developer tools! >>Get your free copy of BEA WebLogic Workshop 8.1 today. >>http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click >>_______________________________________________ >>javagroups-users mailing list jav...@li... >>https://lists.sourceforge.net/lists/listinfo/javagroups-users >> >> >> >> >> > > > -- Bela Ban Lead JGroups / JBossCache callto://belaban |