phoss-smp
phoss-smp copied to clipboard
NullPointerException with MongoDB backend when updating to 7.1.x
I was able to update Phoss SMP from lower versions to 7.0.5. The problem is now when we try to update to the next ones (7.1.0 or 7.1.2).
The deploy runs without errors, I can login on PhossSMP page, but then when selecting some menus, I start to receive “Internal Errors”:
[2024-04-30T17:33:10,548] [SMP-SERVER] [ERROR] [http-nio-80-exec-4] handleInternalError internal-error-560 -- com.helger.photon.core.interror.InternalErrorHandler.handleInternalError(InternalErrorHandler.java:584)
java.lang.NullPointerException: The value of 'DocumentTypeIdentifier' may not be null!
[2024-04-30T17:33:10,597] [SMP-SERVER] [WARN ] [http-nio-80-exec-4] Not sending internal error mail, because 'sender' is not set! -- com.helger.photon.core.interror.InternalErrorHandler._sendInternalErrorMailToVendor(InternalErrorHandler.java:190)
[2024-04-30T17:33:21,923] [SMP-SERVER] [ERROR] [http-nio-80-exec-6] handleInternalError internal-error-561 -- com.helger.photon.core.interror.InternalErrorHandler.handleInternalError(InternalErrorHandler.java:584)
java.lang.NullPointerException: The value of 'DocumentTypeIdentifier' may not be null!
at com.helger.commons.ValueEnforcer.notNull(ValueEnforcer.java:276) ~[ph-commons-11.1.6.jar:11.1.6]
at com.helger.phoss.smp.domain.serviceinfo.SMPServiceInformation.setDocumentTypeIdentifier(SMPServiceInformation.java:106) ~[phoss-smp-backend-7.1.2.jar:7.1.2]
at com.helger.phoss.smp.domain.serviceinfo.SMPServiceInformation.<init>(SMPServiceInformation.java:77) ~[phoss-smp-backend-7.1.2.jar:7.1.2]
at com.helger.phoss.smp.backend.mongodb.mgr.SMPServiceInformationManagerMongoDB.toServiceInformation(SMPServiceInformationManagerMongoDB.java:229) ~[phoss-smp-backend-mongodb-7.1.2.jar:7.1.2]
at com.helger.phoss.smp.backend.mongodb.mgr.SMPServiceInformationManagerMongoDB.lambda$getAllSMPServiceInformationOfServiceGroup$6(SMPServiceInformationManagerMongoDB.java:452) ~[phoss-smp-backend-mongodb-7.1.2.jar:7.1.2]
at com.mongodb.client.internal.MongoIterableImpl.forEach(MongoIterableImpl.java:118) ~[mongodb-driver-sync-5.0.1.jar:?]
at com.helger.phoss.smp.backend.mongodb.mgr.SMPServiceInformationManagerMongoDB.getAllSMPServiceInformationOfServiceGroup(SMPServiceInformationManagerMongoDB.java:452) ~[phoss-smp-backend-mongodb-7.1.2.jar:7.1.2]
at com.helger.phoss.smp.ui.secure.PageSecureTasksProblems.fillContent(PageSecureTasksProblems.java:460) ~[phoss-smp-webapp-7.1.2.jar:7.1.2]
at com.helger.phoss.smp.ui.secure.PageSecureTasksProblems.fillContent(PageSecureTasksProblems.java:75) ~[phoss-smp-webapp-7.1.2.jar:7.1.2]
at com.helger.photon.uicore.page.AbstractWebPage.getContent(AbstractWebPage.java:162) ~[ph-oton-uicore-9.2.3.jar:9.2.3]
at com.helger.photon.bootstrap4.uictrls.ext.BootstrapPageRenderer.getPageContent(BootstrapPageRenderer.java:133) ~[ph-oton-bootstrap4-uictrls-9.2.3.jar:9.2.3]
at com.helger.photon.bootstrap4.uictrls.ext.BootstrapPageRenderer.getPageContent(BootstrapPageRenderer.java:160) ~[ph-oton-bootstrap4-uictrls-9.2.3.jar:9.2.3]
at com.helger.phoss.smp.ui.secure.SMPRendererSecure.getContent(SMPRendererSecure.java:227) ~[phoss-smp-webapp-7.1.2.jar:7.1.2]
at com.helger.phoss.smp.ui.SMPLayoutHTMLProvider.fillBody(SMPLayoutHTMLProvider.java:70) [phoss-smp-webapp-7.1.2.jar:7.1.2]
at com.helger.photon.core.html.AbstractSWECHTMLProvider.fillHeadAndBody(AbstractSWECHTMLProvider.java:106) [ph-oton-core-9.2.3.jar:9.2.3]
at com.helger.photon.core.html.AbstractHTMLProvider.createHTML(AbstractHTMLProvider.java:164) [ph-oton-core-9.2.3.jar:9.2.3]
at com.helger.photon.app.html.PhotonHTMLHelper.createHTMLResponse(PhotonHTMLHelper.java:117) [ph-oton-app-9.2.3.jar:9.2.3]
at com.helger.photon.core.servlet.AbstractApplicationXServletHandler.handleRequest(AbstractApplicationXServletHandler.java:102) [ph-oton-core-9.2.3.jar:9.2.3]
at com.helger.phoss.smp.servlet.SMPApplicationXServletHandler.handleRequest(SMPApplicationXServletHandler.java:81) [phoss-smp-webapp-7.1.2.jar:7.1.2]
at com.helger.xservlet.handler.simple.XServletHandlerToSimpleHandler.onRequest(XServletHandlerToSimpleHandler.java:241) [ph-xservlet-10.1.8.jar:10.1.8]
at com.helger.xservlet.AbstractXServlet._invokeHandler(AbstractXServlet.java:355) [ph-xservlet-10.1.8.jar:10.1.8]
at com.helger.xservlet.AbstractXServlet.service(AbstractXServlet.java:540) [ph-xservlet-10.1.8.jar:10.1.8]
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658) [servlet-api.jar:6.0]
at com.helger.xservlet.AbstractXServlet.service(AbstractXServlet.java:596) [ph-xservlet-10.1.8.jar:10.1.8]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:205) [catalina.jar:10.1.18]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) [catalina.jar:10.1.18]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) [tomcat-websocket.jar:10.1.18]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) [catalina.jar:10.1.18]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) [catalina.jar:10.1.18]
at com.helger.web.servlets.scope.AbstractScopeAwareFilter.doHttpFilter(AbstractScopeAwareFilter.java:82) [ph-web-10.1.8.jar:10.1.8]
at com.helger.servlet.filter.AbstractHttpServletFilter.doFilter(AbstractHttpServletFilter.java:66) [ph-servlet-10.1.8.jar:10.1.8]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) [catalina.jar:10.1.18]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) [catalina.jar:10.1.18]
at com.helger.xservlet.AbstractXFilter.doHttpFilter(AbstractXFilter.java:190) [ph-xservlet-10.1.8.jar:10.1.8]
at com.helger.servlet.filter.AbstractHttpServletFilter.doFilter(AbstractHttpServletFilter.java:66) [ph-servlet-10.1.8.jar:10.1.8]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) [catalina.jar:10.1.18]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) [catalina.jar:10.1.18]
at com.helger.servlet.filter.CharacterEncodingFilter.doHttpFilter(CharacterEncodingFilter.java:184) [ph-servlet-10.1.8.jar:10.1.8]
at com.helger.servlet.filter.AbstractHttpServletFilter.doFilter(AbstractHttpServletFilter.java:66) [ph-servlet-10.1.8.jar:10.1.8]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) [catalina.jar:10.1.18]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) [catalina.jar:10.1.18]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167) [catalina.jar:10.1.18]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90) [catalina.jar:10.1.18]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482) [catalina.jar:10.1.18]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115) [catalina.jar:10.1.18]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) [catalina.jar:10.1.18]
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:673) [catalina.jar:10.1.18]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) [catalina.jar:10.1.18]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:340) [catalina.jar:10.1.18]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:391) [tomcat-coyote.jar:10.1.18]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) [tomcat-coyote.jar:10.1.18]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:896) [tomcat-coyote.jar:10.1.18]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1744) [tomcat-coyote.jar:10.1.18]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) [tomcat-coyote.jar:10.1.18]
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) [tomcat-util.jar:10.1.18]
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) [tomcat-util.jar:10.1.18]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:10.1.18]
at java.base/java.lang.Thread.run(Thread.java:829) [?:?]
[2024-04-30T17:33:21,930] [SMP-SERVER] [WARN ] [http-nio-80-exec-6] Not sending internal error mail, because 'sender' is not set! -- com.helger.photon.core.interror.InternalErrorHandler._sendInternalErrorMailToVendor(InternalErrorHandler.java:190)
Is it possible, that you eventually changed the configuration when updating the version?
Or are you using non-standard document type identifiers inside of your SMP?
Sorry for such a late reply here. I've lost track of this topic!
So, to deploy new versions I take note of the /WEB-INF/classes/application.properties file and then, after deploy a new version, I just shutdown tomcat, replace all configs with the old ones and start it up again. I'm almost sure that I did not change nothing during the deployment. Not sure how to answer you that second question, but I can see this default value on the config file "smp.identifiertype=peppol".
Thanks,
Tiago Martins
Okay, with version 7.1.2 In introduced the identifier type peppol-lax (see #275). There was an additional fix for that in v7.1.3. So can you please update to the latest version (7.1.3 at the time of writing) and use this peppol-lax identifier type - that should solve your issue I assume.
@tiagojmmartins can you please give me a short update, if changing to peppol-lax helped? Thanks
I am getting this exact error after update från 7.1.* to 7.2.4
How can I determine what causes the error?
When changing to peppol-lax it did not produce internal error. Now it just starts working for almost a minute and then fails
Same as before the update. Was hoping that the improvements to listing endoints would fix our issue.
We have 54.500 endpoints,
@jjtilly Sorry, that improvement was basically only for the SQL version. Please create a new issue for that - thanks
Edit: Just did it: #333