This discussion is archived
0 Replies Latest reply: Jun 4, 2013 8:25 AM by 910274 RSS

How to log stack trace of EJB exception cause

910274 Newbie
Currently Being Moderated
We need to log stack trace of exception we are getting from EJB call. We are trying to log it with slf4j with log4j backend:

EJBException ee; LOG.error("EJB exception details: ", ee.getCausedByException());

but this logs only exception type (NullPointerException) without stacktrace. What may be the problem with stacktrace? I tried -XX:-OmitStackTraceInFastThrow even though I don't know if it's valid parameter for our IBM J9 VM, but it didn't help. Our weblogic is in version 12c.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points