java.lang.NoClassDefFoundError: Could not initialize class org.jose4j.jwa.AlgorithmFactoryFactory
Issue #40
invalid
I am using jose4j on Java, it worked great but it has started to give me the following error:
java.lang.NoClassDefFoundError: Could not initialize class org.jose4j.jwa.AlgorithmFactoryFactory
at org.jose4j.jws.JsonWebSignature.getAlgorithm(JsonWebSignature.java:123)
at com.barcelo.crmcampaigns.utils.JsonWebTokenUtils.createTokenForUser(JsonWebTokenUtils.java:70)
at com.barcelo.crmcampaigns.utils.SecurityUtils.addAuthentication(SecurityUtils.java:73)
at com.barcelo.crmcampaigns.webapp.controller.AuthController.authentication(AuthController.java:61)
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.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:776)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:705)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:857)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842
Would know tell me that I 'm doing wrong? Thanks and have a nice day!
Comments (3)
-
-
reporter Hi!!, I fixed the error that occurred when trying to generate the token in the method call getCompactSerialization. So it seems the library jose4 had not deployed properly and that caused the failure of the AlgorithmFactoryFactory class initialization; to deploy properly run smoothly again.
Thank you very much for your attention and for the help .
-
repo owner - changed status to invalid
issue was resolved
- Log in to comment
I honestly can't tell from only that information.
Is there a cause or causes on that stack trace or the first time it happened (i.e. "Caused by: " followed another stack trace)?
What version are you using?
Did this start happening after an upgrade to 0.4.4? The logging facade that the library uses changed from Commons Logging to slf4j per
#18. It might be a missing dependency issue.Are there any changes that coincide with this error starting to happen?