Questions tagged [exceptionhandler]

186 questions
0
votes
2 answers

Spring ExceptionHandler Logging Not Working

I created ExcpetionHandler class which annotated with @ControllerAdivce annotation which working fine using eclipse tomcat server. While I build the project and deploy it to tomcat on some unix machine , the exceptionHandler not getting triggerd. I…
Amir_Af
  • 576
  • 6
  • 22
0
votes
1 answer

@SessionScoped managed bean recreated when exception is handled by PrimeExceptionHandler

I have a Session Scoped Bean: @SessionScoped public class UserSession { User user; } During my LoginView, I throw a SecurityException: throw new java.lang.SecurityException("You need to login!"); Which will be redirected by the web.xml to…
matthias
  • 1,938
  • 23
  • 51
0
votes
1 answer

spring boot timing of output @Requestbody and @Responsebody

@Before("within(control..*)") public void before(JoinPoint joinPoint) { // Set Process Start Time startTime = System.currentTimeMillis(); Object[] arguments = joinPoint.getArgs(); if (arguments != null && arguments.length > 0) { …
Yuu
  • 1
  • 1
  • 3
0
votes
2 answers

Multiple error pages from the same ExceptionHandler

In my current spring-boot project, I have this ExceptionHandler: @ControllerAdvice public class GlobalDefaultExceptionHandler { @ExceptionHandler(value = Exception.class) public ModelAndView defaultErrorHandler(HttpServletRequest request,…
Kleber Mota
  • 8,521
  • 31
  • 94
  • 188
0
votes
1 answer

java.lang.ClassNotFoundException: org.primefaces.application.exceptionhandler.PrimeExceptionHandlerFactory

I am trying to implement Primeface Exception Handler My faces-config.xml
Shahid Ghafoor
  • 2,991
  • 17
  • 68
  • 123
0
votes
1 answer

Why does @catch in main.m not catch UncaughtExceptions in iOS 8

The following code in main does a great job of catching UncaughtExceptions - at least until iOS 8, that is. int main(int argc, char * argv[]) { @try { @autoreleasepool { return UIApplicationMain(argc, argv, nil,…
ckibsen
  • 943
  • 1
  • 7
  • 9
0
votes
0 answers

Not getting javascript exception.stack in IE inside of angular controller

I am building an angular web application and I am wanting to send any javascript exceptions and callstacks from the client to the server for logging. In chrome and firefox I am able to get the callstack by looking at the exception.stack property,…
0
votes
1 answer

Is there a way to capture the stack trace of an error before redirecting to an error page (in Java)?

When an error occurs in my Spring MVC application, I would like to send an email with the stack trace of the code that caused the error. I am using the @ControllerAdvice and @ExceptionHandler annotations to redirect to a method that will output the…
0
votes
0 answers

ExceptionResolver in Spring MVC without annotations

How to catch all exceptions in spring-3.0 mvc application? I tried something like this: public class CustomExceptionResolver extends SimpleMappingExceptionResolver { ... } and
renz
  • 1,072
  • 3
  • 11
  • 21
0
votes
1 answer

How to handle Exceptions for a Custom Filter FORM_LOGIN_FILTER

I have a custom Filter that validates a Token, tokenLoginFilter my Spring Security xml
rince
  • 1,988
  • 1
  • 20
  • 24
0
votes
1 answer

ControllerAdvice with ExceptionHandler and ModelAndView not loading the correct view on screen

I need help on this, please take a look at my code: @ControllerAdvice @EnableWebMvc public class GlobalExceptionController { @ExceptionHandler(CustomGenericException.class) public ModelAndView handleCustomException(CustomGenericException…
Francisco Souza
  • 806
  • 15
  • 38
0
votes
2 answers

How to log specific exception if i am already using FullAjaxExceptionHandler

I am using FullAjaxExceptionHandler to handle timeout issue in ajax request. The problem that I am facing is to handle javax.faces.view.facelets.FaceletException. If i have an error in the xhtml page, i dont want to show the stack trace instead show…
Vineeth NG
  • 240
  • 3
  • 22
0
votes
1 answer

'ExceptionHandlerFactory was not configured properly' on Glassfish 3.1.2.2

I'm trying to handle uncaught exceptions through ExceptionHandler. Following the code in JSF2 complete reference, I've created the classes for my handler. But when I deploy my app, it throws the next stackTrace: SEVERE: Critical error during…
kavrosis
  • 169
  • 1
  • 4
  • 11
0
votes
1 answer

Customer JSF Exception Handler does not catch Exception in Converter

I have an own ExceptionHandler added to my jsf 2.2 project. web.xml package.exceptionhandler.MyExceptionHandlerFactory The exceptionHandlerFactory contains public…
h2mch
  • 521
  • 5
  • 23
0
votes
2 answers

How to create exception for database file not found in c#

I have to connect my code to the access database but mainly, have to provide clear exception if that database file is not located in given location (like file not found). For this code : string connStr =( @"Provider=Microsoft.ACE.OLEDB.12.0;Data…
userabc55478
  • 61
  • 1
  • 8
1 2 3
12
13