gnu-crypto-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNU Crypto] NoSuchMethodError thrown in ModeFactory.getInstance


From: Chris Wright
Subject: [GNU Crypto] NoSuchMethodError thrown in ModeFactory.getInstance
Date: Fri, 08 Oct 2004 13:24:33 +0100

Hi all,

I'm having trouble using gnu-crypto-2.0.1 with version 3.4.2 of gcj.

Here's the commands I'm using to build gnu-crypto:

 export CC=/usr/local/gcc-3.4.2/bin/gcc
 export GCJ=/usr/local/gcc-3.4.2/bin/gcj
 ${GNU_CRYPTO_SRC}/gcj/init.sh
 ./configure --prefix=/usr/local/gnu-crypto-2.0.1
 make
 make install


Here's my java code (Test.java):

 import gnu.crypto.mode.ModeFactory;

 public class Test
 {
   public static void main(String[] args)
   {
     try
     {
       IMode mode = ModeFactory.getInstance("CFB", "AES", 16);
     }
     catch (Exception x)
     {
       x.printStackTrace();
     }
   }
 }


Here's the script I'm using to build the code:

 #!/bin/bash

 GCJ=/usr/local/gcc-3.4.2/bin/gcj
 GC201=/usr/local/gnu-crypto-2.0.1

$GCJ --main=Test -I$GC201/share/gnu-crypto.jar -o test ./Test.java $GC201/lib/lib-gnu-crypto.a


Here's the command I'm using to run the code:

 LD_LIBRARY_PATH=/usr/local/gcc-3.4.2/lib ./test


Here's the stack trace that gets printed:

 Exception in thread "main" java.lang.NoSuchMethodError
at gnu.crypto.mode.ModeFactory.getInstance(java.lang.String, gnu.crypto.cipher.IBlockCipher, int) (/usr/local/gnu-crypto-2.0.1/obj/source/gnu/crypto/mode/ModeFactory.java:135) at gnu.crypto.mode.ModeFactory.getInstance(java.lang.String, java.lang.String, int) (/usr/local/gnu-crypto-2.0.1/obj/source/gnu/crypto/mode/ModeFactory.java:102)
   at Test.main(java.lang.String[]) (Unknown Source)


Note that the same code runs happily under a JVM. Anyone have any idea what's going on?

Thanks for your time,

Chris.

_________________________________________________________________
Use MSN Messenger to send music and pics to your friends http://www.msn.co.uk/messenger





reply via email to

[Prev in Thread] Current Thread [Next in Thread]