我正在尝试在Jboss 8中安装EJBCA 6.5,但是在ant install
之后运行ant deploy
时,我看到此错误:
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>
当我查看数据库时,可以看到在
ant deploy
之后已经创建了与EJBCA相关的所有表。我也将Jboss的logging.properties
更改为TRACE
,但是在server.log
中看不到任何信息。我应该怎么做才能解决此问题并在Jboss中成功安装EJBCA? 最佳答案
确保用户名具有特权并有权访问ejbca数据库
然后
ant clean deployear
and ant install