mysql - 在 Jboss 8 中安装 EJBCA 6.5

标签 mysql jboss ssl-certificate ejbca

我尝试在 Jboss 8 中安装 EJBCA 6.5,但是当我在 ant deploy 之后运行 ant install 时,我看到此错误:

ejbca:initCA:
     [echo] Initializing CA with 'ManagementCA' 'CN=ManagementCA,O=EJBCA Sample,
C=SE' 'soft' <ca.tokenpassword hidden> '2048' 'RSA' '3650' 'null' 'SHA256WithRSA'   -superadmincn 'SuperAdmin'...
     [java] Exception in thread "main" java.util.ServiceConfigurationError: org.
ejbca.ui.cli.infrastructure.command.CliCommandPlugin: Provider org.ejbca.ui.cli.keybind.InternalKeyBindingCreateCommand could not be instantiated
     [java]     at java.util.ServiceLoader.fail(ServiceLoader.java:232)
     [java]     at java.util.ServiceLoader.access$100(ServiceLoader.java:185)
     [java]     at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384)
     [java]     at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
     [java]     at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
     [java]     at org.ejbca.ui.cli.infrastructure.library.CommandLibrary.<init>(CommandLibrary.java:53)
     [java]     at org.ejbca.ui.cli.infrastructure.library.CommandLibrary.<clinit>(CommandLibrary.java:38)
     [java]     at org.ejbca.ui.cli.EjbcaEjbCli.main(EjbcaEjbCli.java:29)
     [java] Caused by: java.lang.IllegalStateException: EJBCLIENT000025: No EJBreceiver available for handling [appName:ejbca, moduleName:cesecore-ejb, distinctName:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@1817d444
     [java]     at org.jboss.ejb.client.EJBClientContext.requireEJBReceiver(EJBClientContext.java:749)
     [java]     at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:116)
     [java]     at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:183)
     [java]     at org.jboss.ejb.client.EJBInvocationHandler.sendRequestWithPossibleRetries(EJBInvocationHandler.java:253)
     [java]     at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:198)
     [java]     at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:181)
     [java]     at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:144)
     [java]     at com.sun.proxy.$Proxy0.getAvailableTypesAndProperties(UnknownSource)
     [java]     at org.ejbca.ui.cli.keybind.InternalKeyBindingCreateCommand.<init>(InternalKeyBindingCreateCommand.java:69)
     [java]     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     [java]     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
     [java]     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
     [java]     at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
     [java]     at java.lang.Class.newInstance(Class.java:433)
     [java]     at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380)
     [java]     ... 5 more

BUILD FAILED

我的数据库是Mysql,在{EJBCA_HOME}\conf\database.properties中进行此配置:

datasource.jndi-name=EjbcaDS
database.name=mysql
database.url=jdbc:mysql://127.0.0.1:3306/ejbca
database.driver=com.mysql.jdbc.Driver
database.username=username
database.password=password

我还将此数据源添加到 {JBOSS_HOME}\standalone\configuration\standalone.xml

<datasource jndi-name="java:/EjbcaDS" pool-name="EjbcaDS" enabled="true" use-java-context="true">
   <connection-url>jdbc:mysql://localhost:3306/ejbca</connection-url>
         <driver>mysqlDriver</driver>
              <security>
                  <user-name>username</user-name>
                  <password>password</password>
              </security>
 </datasource>
<drivers>
<driver name="mysqlDriver" module="com.mysql">
   <xa-datasource-class>com.mysql.jdbc.Driver</xa-datasource-class>
</driver>
</drivers>

当我查看数据库时,我可以看到所有与 EJBCA 相关的表都是在 ant 部署 之后创建的。我还将 Jboss 的 logging.properties 更改为 TRACE,但在 server.log 中看不到任何信息。我该怎么做才能解决这个问题并在Jboss中成功安装EJBCA?

最佳答案

确保用户名具有对 ejbca 数据库的权限和访问权限

然后

ant clean deployear 
and ant install  

关于mysql - 在 Jboss 8 中安装 EJBCA 6.5,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46514392/

相关文章:

php - MySQL .sql 导入计划

mysql - 按序列号分组并选择该记录的最新(最后)创建日期

Apache、mod_jk 和 JBoss 负载平衡问题

java - 将 HornetQ(2.2.x) 与 Spring 3.1 集成

java - 提供 apache-shiro 作为 JBoss-7、WildFly-8 的模块

ssl - 在 MAMP Pro 3.0.6 中获取 SSL

asp.net - Visual Studio 中的 FTPS 发布失败,结果为 "Secure connection was closed by the remote connection end."

mysql - 为什么MySQL扫描更新但查找选择

mysql - 如何将用户连接到mysql数据库?

php - 如果 CURLOPT_SSLCERT 设置为同时包含证书和私钥的文件,我是否应该设置 CURLOPT_SSLKEY?