3

I have a soap @webservice, and a client sending requests as below:

try { // any webservice confniguration here webservice.call(); } catch (Exception e) { System.out.println("ERROR"); } 

Now if the connections time out, I'm getting a java.net.socketTimtoutException with stacktrace, plus my error sysouts above. How can I prevent the stacktrace from being printed to console? I don't understand why I ever get it as I'm catching any occuring exception, aren't I?

4
  • 1
    Somewhere, a try/catch catches the exception, prints it, and then rethrows it. You will have to investigate deeper. Commented Oct 2, 2012 at 9:59
  • Try writing other instructions after your try/catch block to see if they are reached like System.out Commented Oct 2, 2012 at 10:15
  • Yes they are. The code continues, somehow the ex is thrown in between, but without me specifiying this... Commented Oct 2, 2012 at 10:17
  • It might be the framework printing the exception before throwing it... which class prints the exception? Maybe you can post the whole stacktrace... Commented Oct 2, 2012 at 10:39

1 Answer 1

1

Then it's clearly obvious that somewhere in between, a try/catch block catches the exception, prints the stack trace, and then rethrows it. As @WernerVesterås said.
I can advise you to debug the code.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.