cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco Transform Router 2.1.1 - NullPointerException

nicolasalvarezc
Champ on-the-rise
Champ on-the-rise

We've encountered an issue with the Alfresco Transform Router service after updating from version 2.0.0 to 2.1.1, despite having our Alfresco enterprise edition properly configured and running smoothly since inception.

2024-05-02 15:55:35.211 INFO 8 --- [nio-8095-exec-5] o.a.transform.base.TransformController : GET Transform Config version: 1
2024-05-02 15:55:35.216 ERROR 8 --- [nio-8095-exec-5] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.NullPointerException: Cannot invoke "org.alfresco.transform.config.TransformConfig.getTransformOptions()" because "transformConfig" is null] with root cause

java.lang.NullPointerException: Cannot invoke "org.alfresco.transform.config.TransformConfig.getTransformOptions()" because "transformConfig" is null
at org.alfresco.transform.config.CoreVersionDecorator.setOrClearCoreVersion(CoreVersionDecorator.java:77) ~[alfresco-transform-model-3.1.1.jar!/:3.1.1]
at org.alfresco.transform.base.TransformController.transformConfig(TransformController.java:259) ~[alfresco-base-t-engine-3.1.1.jar!/:3.1.1]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) ~[spring-web-5.3.27.jar!/:5.3.27]
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150) ~[spring-web-5.3.27.jar!/:5.3.27]
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117) ~[spring-webmvc-5.3.27.jar!/:5.3.27]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895) ~[spring-webmvc-5.3.27.jar!/:5.3.27]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808) ~[spring-webmvc-5.3.27.jar!/:5.3.27]
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.3.27.jar!/:5.3.27]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1072) ~[spring-webmvc-5.3.27.jar!/:5.3.27]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:965) ~[spring-webmvc-5.3.27.jar!/:5.3.27]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) ~[spring-webmvc-5.3.27.jar!/:5.3.27]
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) ~[spring-webmvc-5.3.27.jar!/:5.3.27]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:529) ~[tomcat-embed-core-9.0.74.jar!/:na]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) ~[spring-webmvc-5.3.27.jar!/:5.3.27]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:623) ~[tomcat-embed-core-9.0.74.jar!/:na]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:209) ~[tomcat-embed-core-9.0.74.jar!/:na]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) ~[tomcat-embed-core-9.0.74.jar!/:na]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) ~[tomcat-embed-websocket-9.0.74.jar!/:na]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) ~[tomcat-embed-core-9.0.74.jar!/:na]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) ~[tomcat-embed-core-9.0.74.jar!/:na]
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-5.3.27.jar!/:5.3.27]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.27.jar!/:5.3.27]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) ~[tomcat-embed-core-9.0.74.jar!/:na]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) ~[tomcat-embed-core-9.0.74.jar!/:na]
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-5.3.27.jar!/:5.3.27]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.27.jar!/:5.3.27]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) ~[tomcat-embed-core-9.0.74.jar!/:na]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) ~[tomcat-embed-core-9.0.74.jar!/:na]
at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:96) ~[spring-boot-actuator-2.7.11.jar!/:2.7.11]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.27.jar!/:5.3.27]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) ~[tomcat-embed-core-9.0.74.jar!/:na]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) ~[tomcat-embed-core-9.0.74.jar!/:na]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.3.27.jar!/:5.3.27]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.27.jar!/:5.3.27]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) ~[tomcat-embed-core-9.0.74.jar!/:na]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) ~[tomcat-embed-core-9.0.74.jar!/:na]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167) ~[tomcat-embed-core-9.0.74.jar!/:na]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90) ~[tomcat-embed-core-9.0.74.jar!/:na]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:481) ~[tomcat-embed-core-9.0.74.jar!/:na]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130) ~[tomcat-embed-core-9.0.74.jar!/:na]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) ~[tomcat-embed-core-9.0.74.jar!/:na]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) ~[tomcat-embed-core-9.0.74.jar!/:na]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) ~[tomcat-embed-core-9.0.74.jar!/:na]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:389) ~[tomcat-embed-core-9.0.74.jar!/:na]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) ~[tomcat-embed-core-9.0.74.jar!/:na]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:926) ~[tomcat-embed-core-9.0.74.jar!/:na]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1791) ~[tomcat-embed-core-9.0.74.jar!/:na]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) ~[tomcat-embed-core-9.0.74.jar!/:na]
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) ~[tomcat-embed-core-9.0.74.jar!/:na]
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) ~[tomcat-embed-core-9.0.74.jar!/:na]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-9.0.74.jar!/:na]
at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]

Despite exhaustive efforts from various angles, the persisting issue emerges during container startup, hindering successful health checks and communication with other services (Tengines). Any guidance on analyzing or initiating a review of this isolated case would be greatly appreciated, as it appears distinct from the established stability of our long-standing Alfresco Stack.

2 REPLIES 2

HAW1223
Champ in-the-making
Champ in-the-making

Hello @nicolasalvarezc , currently I'm also encountering this issue in my project. 

Were you able to resolve this issue at that time? If yes, can you please tell me how did you resolve? Thanks

Hi @HAW1223

Yes, I was able to identify what was causing the issue. In my case, the problem was related to the way the T-Router handles transformer registration during its startup process. Specifically, if any single T-Engine fails to respond properly during the initialization, that alone can cause the entire T-Router to fail its registration process, leading to the /transform/config endpoint throwing a NullPointerException — exactly like the one you shared. So, if you see the T-Router trying and failing to reach a transformer, that’s very likely the root cause of the error.

Here’s what worked for me:

1. Identify if any transformer is failing to respond during startup.
You can usually spot this in the T-Router logs, where it repeatedly tries to contact a specific T-Engine and fails (e.g., connection refused, 404, timeout, etc.). If this happens, it's a strong indicator that the registration process is breaking due to that specific engine.

Additionally, you can run a curl command directly from the Alfresco repo container to the T-Router endpoint
curl http://trouter-hostname:port/transform/config

If this request returns a generic error or shows a message like null - null, it confirms that the T-Router failed to
register the transformers — which is what leads to the NullPointerException you're seeing in the logs.

2. Confirm that the T-Router is stable and registering all transformers properly.
To verify this, you should see entries in the logs like the following:

INFO 7 --- [cTaskExecutor-1] o.a.t.base.registry.TransformRegistry : Transformers (46) Transforms (3884):
INFO 7 --- [cTaskExecutor-1] o.a.t.base.registry.TransformRegistry : appleIWorks
INFO 7 --- [cTaskExecutor-1] o.a.t.base.registry.TransformRegistry : Archive
...........
INFO 7 --- [nio-8095-exec-6] o.a.transform.base.TransformController : GET Transform Config version: 2

If those entries are present, it’s a sign that the T-Router initialized correctly and is not the source of the issue. You can also confirm that all T-Engines are reachable by running curl commands from the Alfresco repo container to each T-Engine’s /version endpoint and checking their responses.

3. Restart the T-Router service once all endpoints are confirmed to be responsive.
After that, the /transform/config endpoint should return the expected configuration without errors.

Let me know if that helps — happy to provide more details if needed.

Best regards,
Nicolas A.