I\'m new to java and I\'m not that familiar with the formatting rules used by an error stack trace when it is thrown and subsequently displayed to an end-user of my web appl
You should not show any information to your end users that they cannot understand, which includes all of the stack trace in its entirety. The error you should show when you catch an exception like that should read something like this, in the language of your end-users:
End users couldn't care less about your program's inner organization, databases, stacks, et cetera. All they know is that something that they thought should have work just failed, so they are looking for assistance.
Stack traces are for error logs: you can save them for yourself, or e-mail them to technical support, but you do not want to show them to the end users.