Signserver 3.5.1 throws NullPointerException when attempting to issue a CSR:
signserver-3.5.1$ bin/signserver generatecertreq 2 "CN=Test" "SHA1WithECDSA" /home/user/req-1.pem
Exception in thread "main" org.signserver.cli.spi.UnexpectedCommandFailureException: javax.ejb.EJBException
at org.signserver.admin.cli.defaultimpl.GenerateCertReqCommand.execute(GenerateCertReqCommand.java:112)
at org.signserver.cli.CommandLineInterface.execute(CommandLineInterface.java:97)
at org.signserver.admin.cli.AdminCLI.main(AdminCLI.java:51)
Caused by: javax.ejb.EJBException
at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:5215)
at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:5113)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4901)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2045)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1994)
at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:213)
at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:79)
at com.sun.proxy.$Proxy374.getCertificateRequest(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie.dispatchToMethod(ReflectiveTie.java:144)
at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:174)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:528)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:199)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1624)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1486)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:990)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:214)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:742)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMessageMediatorImpl.java:539)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMessageMediatorImpl.java:2324)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:497)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:540)
Caused by: java.lang.NullPointerException
at org.signserver.server.BaseProcessable.genCertificateRequest(BaseProcessable.java:353)
at org.signserver.ejb.WorkerSessionBean.getCertificateRequest(WorkerSessionBean.java:1099)
at org.signserver.ejb.WorkerSessionBean.getCertificateRequest(WorkerSessionBean.java:1067)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5388)
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:619)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:162)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:144)
at sun.reflect.GeneratedMethodAccessor114.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:861)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:370)
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5360)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5348)
at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:206)
... 19 more
Here is the configuration of the signer:
signserver-3.5.1$ bin/signserver getconfig 2
OBSERVE that this command displays the current configuration which
doesn't have to be the same as the active configuration.
Configurations are activated with the reload command.
The current configuration of worker with id : 2 is :
KEYDATA=<...keydata...>=
2014-06-27 14:17:07,897 ERROR [WorkerConfig] Error, required environment variable SIGNSERVER_NODEID isn't set.
2014-06-27 14:17:07,898 ERROR [WorkerConfig] Error, required environment variable SIGNSERVER_NODEID isn't set.
Either this isn't a Signer or no Signer Certificate have been uploaded to it.
The same error appears also for the other signer (id: 1).
Thank you as usually.
Last edit: Konstantin Shemyak 2014-06-27
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Signserver 3.5.1 throws NullPointerException when attempting to issue a CSR:
Here is the configuration of the signer:
The same error appears also for the other signer (id: 1).
Thank you as usually.
Last edit: Konstantin Shemyak 2014-06-27
Sorry - case solved. I did not have the worker correctly configured. After deleting and re-creating the worker, signing operations work as expected.
Last edit: Konstantin Shemyak 2014-06-27
Ok.
Do you know what misconfigured (for future reference)?
Cheers,
Markus
PrimeKey Solutions
genCertificateRequest()
received NullPointerException intoken.getClass()
:My signer did not have any crypto token configured, and
getCryptoToken()
returnednull
.Thank you Konstantin!
I have registered https://jira.primekey.se/browse/DSS-833 for eventually adding a null check and better error message.
Cheers,
Markus
PrimeKey Solutions offers a commercial EJBCA & SignServer support subscription and training. Please see www.primekey.se or contact info@primekey.se for more information.
http://www.primekey.se/Services/Support/
http://www.primekey.se/Services/Training/