Hi,

Seems like the bouncycastle.jar is not in the classpath of the client.
This is the JCE provider we use instead of the default impl and it
contains implementations of the required algorithms.

Please check whether you have a directory named 'lib' within in the
samples/security directory and it should contain bcprov-jdk13-131.jar
file [1].
Also please check whether the build.xml that you use has the following path def.

    <path id="axis.classpath">
        <fileset dir="../../lib">
            <include name="*.jar"/>
        </fileset>
        <fileset dir="lib">
            <include name="*.jar"/>
        </fileset>
    </path>

And if those are available you can see that the ant build file
properly loads all the jars in the 'lib' directory.

Thanks,
Ruchith

[1] This directory also contains :
commons-discovery-0.2.jar
secUtil.jar
wss4j-SNAPSHOT.jar
xmlsec-1.2.1.jar

On 3/25/06, Ali Sadik Kumlali <[EMAIL PROTECTED]> wrote:
> Dear all,
>
>  Thanks to Axis2 team, 0.95 relase has finally announced on the site.
>
>  Happily, there is an extra download for security sample which makes me feel
>  I finally get rid of security sample nightmare :)
>
>  Unfortunately and surprisingly, I can't get security sample to work and
>  still get the same errors. I've listed all my journey with the new release
>  step by step.
>
>  Hope, I'll somehow find a way to make it work :)
>
>  Thanks,
>
>  Ali Sadik Kumlali
>
>
> -------------------------------------------------------------------------------
>  TRIALS WITH JDK 1.4
> -------------------------------------------------------------------------------
>  Let's make sure the Java version:
>
>  c:\axis2\samples\security>java -version
>  java version "1.4.2_02"
>  Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03)
>  Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode)
>
>  Let's run the sample:
>
>  c:\axis2\samples\security>ant
>  Buildfile : build.xml
>
>  securitySample:
>       [java] org.apache.axis2.AxisFault: WSHandler: Encryption: error during
> mess
>  age processingorg.apache.ws.security.WSSecurityException:
> An unsupported signatu
>  re or encryption algorithm was used; nested exception is:
>       [java]
> org.apache.xml.security.encryption.XMLEncryptionException:
> Canno
>  t find any provider supporting AES/CBC/ISO10126Padding
>  < span style="font-family: courier;">     [java] Original Exception was
> java.security.NoSuchAlgorithmException: Canno
>  t find any provider supporting AES/CBC/ISO10126Padding; nested exception
> is:
>       [java]
> org.apache.ws.security.WSSecurityException: WSHandler:
> Encryptio
>  n: error during message
> processingorg.apache.ws.security.WSSecurityException: An
>   unsupported signature or encryption algorithm was used; nested exception
> is:
>       [java]
> org.apache.xml.security.encryption.XMLEncryptionEx ception:
> Canno
>  t find any provider supporting AES/CBC/ISO10126Padding
>       [java] Original Exception was
> java.security.NoSuchAlgorithmException: Canno
>  t find any provider supporting AES/CBC/ISO10126Padding
>       [java]     at
> org.apache.axis2.security.WSDoAllSender.invoke(WSDoAllSender.
>  java:253)
>
>  ...
>
>
> -------------------------------------------------------------------------------
>  TRIALS WITH JDK 1.5
> -------------------------------------------------------------------------------
>  Let's make sure the Java version:
>
>  c:\axis2\samples\security>java -version
>  java version "1.5.0_01"
>  Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08)
>  Java HotSpot(TM) Client VM (build 1.5.0_01-b08, mixed mode)
>
>  Let's run the sample:
>
>  c:\axis2\samples\security>ant
>  Buildfile: build.xml
>
>  securitySample:
>       [java] Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apach
>  e/xpath/compiler/FuncLoader
>       [java]     at
> org.apache.ws.security.WSSConfig.<init>(WSSConfig.java:75)
>       [java]     at
> org.apache.ws.security.WSSConfig.getNewInstance(WSSConfig.jav
>  a:98)
>       [java]     at
> org.apache.ws.security.WSSConfig.<clinit>(WSSConfig.java:48)
>       [java]     at
> org.apache.ws.security.WSSecurityEngine.<clinit>(WSSecurityEn
>  gine.java:51)
>  ...
>
>  I remembered Ruchith Fernando's advice related to JDK 1.5 & Xalan and
>  followed the link he gave:
>
> http://svn.apache.org/viewcvs.cgi/*checkout*/webservices/axis2/trunk/java/xdocs/faq.html.
>
>  Found an item mentioned to download xalan-2.7.0.jar. I downloaded it from:
>
>  http://www.apache.org/dist/java-repository/xalan/jars/
>
>  and put under c:\axis2\lib but got the same error. Searched in Google for
> org.apache.xpath.compiler.FuncLoader. What I found that the
> FuncLoader.class existed in xalan-2.6.0.jar not in xalan-2.7.0.jar.
>  Finally, downloaded xalan-2.6.0.jar and put under c:\axis2\lib. This time I
> got the same error found in JDK 1.4:
>
>  securitySample:
>       [java] org.apache.axis2.AxisFault: WSHandler: Encryption: error during
> mess
>  age processingorg.apache.ws.security.WSSecurityException:
> An unsupported signatu
>  re or encryption algorithm was used; nested exception is:
>       [java]
> org.apache.xml.security.encryption.XMLEncryptionException:
> Canno
>  t find any provider supporting AES/CBC/ISO10126Padding
>       [java] Original Exception was
> java.security.NoSuchAlgorithmException: Canno
>  t find any provider supporting AES/CBC/ISO10126Padding; nested exception
> is:
>       [java]
> org.apache.ws.security.WSSecurityException: WSHandler:
> Encryptio
>  n: error during message
> processingorg.apache.ws.security.WSSecurityException: An
>   unsupported signature or encryption algorithm was used; nested exception
> is:
>       [java]
> org.apache.xml.security.encryption.XMLEncryptionException:
> Canno
>  ...
>
>  Again looked in FAQ and added
>
> security.provider.7=org.bouncycastle.jce.provider.BouncyCastleProvider
>
>  line to
>  < br>
> d:\programs\java\jre1.5.0_06\lib\security\java.security
>
>  file. I made sure that java -version belonged to the java installation
> found under d:\programs\java\jre1.5.0_06. Therefore, I must had changed
> correct java.security file.
>
>  Finally, ran the ant script again and, unfortunately, got the same error.
>
>
>
>  ________________________________
> Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.
>
>

Reply via email to