0 Replies Latest reply on Jan 29, 2014 8:21 AM by Daniel G

    JBoss 7.1.1 EJBCA 6.0.3 JCE authentication problem

    Daniel G Newbie


      I have the following Problem.


      I habe open  java-1.7.0-openjdk-1.7.0 with bcpkix-jdk15on-149.jar and bcprov-jdk15on-149.jar in the JAVA_HOME/lib/ext

      I also but this provider in the java.security file like this:




      I have install JBoss 7.1.1 as a standalone application. JBoss is running well.

      If i start it with ./bin/standalone.sh i JBoss is starting.


      Then i make a ant deploy in  the EJBCA directory. this works and creates the ejbca.ear file with the deploy file.


      So now i want to make a ant install and i geht following error message:


      [java] org.ejbca.ui.cli.ErrorAdminCommandException: javax.ejb.EJBException: java.io.IOException: exception encrypting data - java.lang.SecurityException: JCE cannot authenticate the provider BC


      i have read several work arounds but nothing works.


      i hope you can help me



      So here is the solution for this problem:


      first of all you have to go to your JBOSS home directory .

      you have to add some folders and files:


      1.) create this folder




      mkdir $JBOSS_HOME/modules/org/bouncycastle/main


      2.) copy boucycastle provider to this folder


      in my case it was the bcprov-jdk15on-150.jar


      2.) create module.xml

      <module xmlns="urn:jboss:module:1.1" name="org.bouncycastle">
              <resource-root path="bcprov-jdk15on-150.jar"/>
              <module name="javax.api" slot="main" export="true"/>

      3.) edit standalone.xml



      search this line:


      <subsystem xmlns="urn:jboss:domain:ee:1.0"/>

      change it to

      <subsystem xmlns="urn:jboss:domain:ee:1.0">
      <module name="org.bouncycastle" slot="main"/>

      all instructions are from this hp: http://www.techques.com/question/1-9534512/bouncycastle-+-JBoss-AS7:-JCE-cannot-authenticate-the-provider-BC

      have fun