Looking at the stack trace, I don't think you can catch it. This will require that you have the code somewhere in the thread where the exception is thrown.
Looking at the lowest stack on the track, you will see the following:
at java.lang.Thread.run(Thread.java:724)
For me, this suggests that the exception occurs in the thread most likely launched by Axis. Because of this, you cannot catch it and show an error message.
If this is the expected behavior, the best thing you can do is set up the logging structure so that you don't show INFO from Axis. Keep in mind that this may mean that you will also miss out on more useful error messages.
In general, I would like to focus on how to solve the "Failed to send ViaPost" problem, rather than suppress the registration expression.
To answer your question with comments: As you can see from the stack trace, the exception does not fall into any client code, but expands to the stream itself. This is the breakpoint for exclusion and where it stops. If you are going to catch it, you will have to have code in the call stack (which you do not do, because when a thread is created by Axis, a new call stack is created for the new thread that Axis starts).
More details here . The only difference in your case is that since the exception is not thrown into the main thread, the program does not exit, but the thread in which the exception occurs is terminated.
To summarize: you do not have code in the call stack and therefore cannot catch the exception. The only other option is to rotate the INFO instructions for Axis.
source share