Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

Catching Exceptions and Writing Them Out


Former Community Member
I need to catch the stack trace of any Exception that occurs

in a process into a string variable. Any one know how to do

8 Replies


Former Community Member
are you using LC ES? if so every service operation in your process which throws a exception can be caught and handled as per your requirements


Former Community Member
Yes I can catch them but I need the stack trace it produced.

There should be a way to catch every Exception with one catch. But you can't and you have to make a catch for every type of Exception a service throws (ie. PermissionsException, PDFOperationsException, etc, etc.). Which means I know have 15 catches for a 2 step process.

What I need is... if the process fails at any point get the Exception stack and write it out to a error.log file... very simple but I have seen no examples to do this. The ES Architects dropped the ball on this one.


Former Community Member
I'm not sure whether there are any ways to catch an exception and write the stack trace to a string.

However, if you are debugging the application, you can see the stack trace from JBoss log. If you need more details in the log, change JBoss log level to DEBUG.

- To see JBoss log: go to \LiveCycle8\jboss\server\all\log\server.log

- To change log level:

Go to \LiveCycle8\jboss\server\all\conf\log4j.xml

Look for this line <param name="Threshold" value="INFO"/>

Then change INFO to DEBUG

Please don't be aggressive here. The fact that your question did not get answered does not mean the whole forum is useless.

Khoa Tran



Former Community Member
I'm not being aggressive I'm stating a fact. I have asked questions in the past and they don't get any replies or valid answers.


Level 9
Hi Defa

Here's your valid answer :-)

No, you can't get at the stack trace.

Yes, it's a pain that you have to trap each of the exceptions individually.

I imagine that the LiveCycle architects are aware of these limitations, and will be taking steps to address it.




Former Community Member
Figured that out, but only after wasting 6 hours.

Thanks for the reply though.