Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9201785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:06:08+00:00 2026-06-17T23:06:08+00:00

My technology stack is Tomcat (servlet 3.0), Jersey for JAX-RS, Spring and Hibernate. When

  • 0

My technology stack is Tomcat (servlet 3.0), Jersey for JAX-RS, Spring and Hibernate. When something unexpect goes wrong like some data conversion error in Hibernate, I do not want the clients to see my stacktrace for those exceptions that the Tomcat tries to print by default. However I would like to log those exceptions so I can find what is wrong and fix things.

My first try was using ExceptionMapper from JAX-RS and naively thinking that would solve my problems. But then I noticed that Jersey throws it’s own exceptions for example urls that are not mapped are com.sun.jersey.api.NotFoundExceptions. This causes 404 exceptions to be logged which I don’t want. Worse, the client no longer gets 404 but a status code 500.

I could just create exception mappers for the exceptions that jersey throws but I could miss something. Is there a best practice for something like this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T23:06:10+00:00Added an answer on June 17, 2026 at 11:06 pm

    All exceptions thrown directly by Jersey are subclasses of WebApplicationException, so if you want to catch them all just create an ExceptionMapper for that class and you’ll be good.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What does the technology stack for mobile applications (native and HTML5) look like for
Until now I was mainly using Struts 2 , Spring , JQuery technology stack
I really like Elastic Beanstalk and managed to get my webapp (Spring MVC, Hibernate,
I've been evaluating technology stack for developing a social network based application. Below are
I am trying to learn the technology stack behind StupeFlix and Animoto. I find
JavaFX is a new technology introduced by Sun. I would like to know what
Let's say I asked Microsoft to describe the perfect, modern, Microsoft-based technology stack to
Which technology stack do you recommend for developing native windows executable (has GUI), other
We've recently upgraded our services technology stack. We opted for the WSIT implementation of
There is an technology stack: Java EE (WebSpere), JPA, EJB3, JMS (MDB), JSF. Architecture:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.