Results 1 to 2 of 2
  1. #1
    taille50 is offline Member
    Join Date
    Oct 2009
    Posts
    1
    Rep Power
    0

    Default catching uncaught exceptions using Spring / WebApp

    Hi,
    I use SimpleMappingExceptionResolver to catch uncaught runtime exceptions.
    In my app-servlet.xml I have this
    Java Code:
    <bean id="exceptionResolver" class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver">    
    	<property name="exceptionMappings">		
    		<props>	
    			<prop key="java.lang.Exception">errorView</prop>		
    		</props>   
    	</property>
    </bean>
    My problem is that my errorView is rendered but I nothing is logged. Like logs would be swallowed. Making things tough to fix.
    I'm a beginner in writing xml files, do you have any advice?

  2. #2
    tck
    tck is offline Member
    Join Date
    Oct 2009
    Posts
    1
    Rep Power
    0

    Default

    yeah, you have to set the warnLogCategory if you want the SMER to log. the default is to not log, so you have to set this if you want logging. set the value to whatever you want for the logger name.

    <property name="warnLogCategory" value="whatever" />

Similar Threads

  1. Uncaught error fetching image
    By Manfizy in forum New To Java
    Replies: 9
    Last Post: 12-03-2011, 05:16 PM
  2. Replies: 2
    Last Post: 09-19-2009, 12:22 AM
  3. Do uncaught errors appear in the PrintStream?
    By arnab321 in forum New To Java
    Replies: 1
    Last Post: 02-26-2009, 09:56 AM
  4. Replies: 2
    Last Post: 07-13-2008, 06:46 PM
  5. AWT - catching click button event
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 03-12-2008, 12:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •