0

I have an error that happens only in the production code and the stacktrace below appears in the log.
(I've omitted some repetitions of framework methods like "invoke", "processInvocation", etc and replaced by "[...]")

2021-10-19 10:43:02,978 ERROR [org.jboss.as.ejb3.invocation] (default task-229) WFLYEJB0034: EJB Invocation failed on component ServidorService for method public java.util.List br.xpto.services.servidor.ServidorService.getServidoresDaUnidade(java.lang.String): javax.ejb.EJBTransactionRolledbackException
    at org.jboss.as.ejb3@7.2.0.GA-redhat-00005//org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:203)
    at org.jboss.as.ejb3@7.2.0.GA-redhat-00005//org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:364)
    at org.jboss.as.ejb3@7.2.0.GA-redhat-00005//org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:144)
    [...]
    at org.jboss.as.ee@7.2.0.GA-redhat-00005//org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:185)
    at org.jboss.as.ee@7.2.0.GA-redhat-00005//org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:81)
    at deployment.xpto-server.war//br.xpto.services.clientes.corporativo.CorporativoService$$$view92.findServidoresPorSiglaUnidade(Unknown Source)
    at deployment.xpto-server.war//br.xpto.services.servidor.ServidorService.getServidoresDaUnidade(ServidorService.java:112)
    at jdk.internal.reflect.GeneratedMethodAccessor1425.invoke(Unknown Source)
    [...]
    at org.jboss.as.ee@7.2.0.GA-redhat-00005//org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:185)
    at org.jboss.as.ee@7.2.0.GA-redhat-00005//org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:81)
    at deployment.xpto-server.war//br.xpto.services.servidor.ServidorService$$$view62.getServidoresDaUnidade(Unknown Source)
    at jdk.internal.reflect.GeneratedMethodAccessor1425.invoke(Unknown Source)
    [...]
    at org.jboss.weld.core@3.0.5.Final-redhat-00001//org.jboss.weld.module.ejb.InjectionPointPropagatingEnterpriseTargetBeanInstance.invoke(InjectionPointPropagatingEnterpriseTargetBeanInstance.java:68)
    at org.jboss.weld.core@3.0.5.Final-redhat-00001//org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:106)
    at deployment.xpto-server.war//br.xpto.services.servidor.ServidorService$Proxy$_$$_Weld$EnterpriseProxy$.getServidoresDaUnidade(Unknown Source)
    at deployment.xpto-server.war//br.xpto.rest.corporativo.UnidadeSubRecurso.acessarServidoresCorporativo(UnidadeSubRecurso.java:107)
    at jdk.internal.reflect.GeneratedMethodAccessor1622.invoke(Unknown Source)
    [...]
    at org.jboss.threads@2.3.2.Final-redhat-1//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
    at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.NullPointerException

As you can see, the stacktrace stops at the "Caused by" line. I was expecting at least one more line (starting with "at "), so I would be able to see the line from where the NullPointerException is coming.

Other exceptions (even longer ones) are fully printed. I've seen this happening with two or three NullPointerExceptions. Never saw with other types of exceptions.

Can someone explain why or when this happens?

For information, this is the Java version I'm using:

$ java -version
openjdk version "11.0.8" 2020-07-14 LTS
OpenJDK Runtime Environment 18.9 (build 11.0.8+10-LTS)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.8+10-LTS, mixed mode, sharing)
Alex Oliveira
  • 883
  • 1
  • 9
  • 23

0 Answers0