Getting error on downloading the certificate #240
Unanswered
priyanka-TL
asked this question in
Issues
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
@tejash-jl I have set up the demo-certificate-issuance in my local and created the certificate. I'm facing issue with downloading the certificate as a pdf
I have created the certificate using the below curl and got success message
curl --location --request POST 'http://localhost:8081/api/v1/ProjectCertificate' \ --header 'Content-Type: application/json' \ --data-raw '{ "recipient":{ "id":"2a2bcdd1-6d0b-4406-a5cb-9f691edb931e", "name":"Priyanka Pradeep", "type":"user" }, "issuer":{ "name":"Gujarat Council of Educational Research and Training", "url":"http://gcert.gujarat.gov.in", "kid":"1-b9b5a044-4b63-408c-ba19-14bf361f75d0" }, "signatory":[{ "designation":"CEO", "image":"https://www.deccanherald.com/sites/dh/files/styles/article_detail/public/article_images/2019/11/05/Kerala%20police-1572894601.jpg?itok=lRLf80FP", "name":"CEO" }], "status": "ACTIVE", "certificateLabel":"Completion Certificate", "projectName":"Come to School - Parent mela", "stateName":"Kerala" }'
while downloading the certificate using the below API I'm getting 400 bad request
curl --location --request GET 'http://localhost:8081/api/v1/ProjectCertificate/1-7eab4359-e10f-4c5a-9bff-f07a6c04a49a' \ --header 'Accept: application/pdf' \ --header 'template: https://gist.githubusercontent.com/priyanka-TL/96852f61b0f434e080e5ae5a24246528/raw/1c54ffd4e37273b72ef12ce6a31bf54ba0265aaa/template.html'
In logs I'm getting the below error
10:42:27.305 [http-nio-8081-exec-7] INFO d.s.registry.helper.RegistryHelper:264 - Read Api: shard id: 1 for label: 1-7eab4359-e10f-4c5a-9bff-f07a6c04a49a registry_1 | 10:42:27.327 [http-nio-8081-exec-7] INFO d.s.registry.dao.VertexReader:496 - Finished loading information. Start creating the response registry_1 | java.lang.NullPointerException registry_1 | at dev.sunbirdrc.registry.controller.RegistryEntityController.getEntityType(RegistryEntityController.java:450) registry_1 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) registry_1 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) registry_1 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) registry_1 | at java.lang.reflect.Method.invoke(Method.java:498) registry_1 | at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190) registry_1 | at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138) registry_1 | at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:105) registry_1 | at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:878) registry_1 | at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:792) registry_1 | at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) registry_1 | at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040) registry_1 | at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943) registry_1 | at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) registry_1 | at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) registry_1 | at javax.servlet.http.HttpServlet.service(HttpServlet.java:626) registry_1 | at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) registry_1 | at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) registry_1 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227) registry_1 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) registry_1 | at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
Please help me to resolve the error
cc - @aks30 @vijiurs @kiranharidas187 @varsha-sl @Prateek-slokam @aishwaryashikshalokam
Beta Was this translation helpful? Give feedback.
All reactions