I have several web app modules with same groupId deployed on wildfly 18, let's say org.foo.ecommerce
These modules are configured with its own subgroup , therefore:
- module1 - org.foo.ecommerce.mod1
- module2 - org.foo.ecommerce.mod2
- module3 - org.foo.ecommerce.mod3
So I configured wildfly with an handler for each module, like the following:
<periodic-rotating-file-handler name="MOD1_HANDLER">
<level name="DEBUG"/>
<encoding value="UTF-8"/>
<formatter>
<pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] - %s%E%n"/>
</formatter>
<file relative-to="log.path" path="mod1.log"/>
<suffix value=".yyyy-MM-dd"/>
</periodic-rotating-file-handler>
<logger category="org.foo.ecommerce.mod1" use-parent-handlers="false">
<handlers>
<handler name="MOD1_HANDLER"/>
</handlers>
</logger>
Now, if for some reason a NullPointerException is thrown, I can find it ONLY on wildfly server.log.
How can I display all exceptions on the module that belongs from ?
UPDATE
This is the stacktrace on console / server.log
org.jboss.resteasy.spi.UnhandledException: java.lang.NullPointerException
at org.jboss.resteasy.resteasy-jaxrs@3.9.1.Final//org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:82)
at org.jboss.resteasy.resteasy-jaxrs@3.9.1.Final//org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:346)
at org.jboss.resteasy.resteasy-jaxrs@3.9.1.Final//org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:193)
at org.jboss.resteasy.resteasy-jaxrs@3.9.1.Final//org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:456)
at org.jboss.resteasy.resteasy-jaxrs@3.9.1.Final//org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:229)
at org.jboss.resteasy.resteasy-jaxrs@3.9.1.Final//org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:135)
at org.jboss.resteasy.resteasy-
Notice that even if I declare my own exception the behaviour is the same
@javax.ejb.ApplicationException(rollback = true)
public class ApplicationException extends RuntimeException {
}