Tag Archives: Spring

Resolving java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract.. error


I was trying out the code available here – ‘Getting started with Spring MVC’ (http://blog.springsource.com/2011/01/04/green-beans-getting-started-with-spring-mvc/) – today and was facing an irritating error (see below) everytime when I deployed the code. Finally, found the reason and fixed the issue. Error Stack Trace java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in […]

Handling Task Rejections – Java’s Executor/Spring’s TaskExecutor


Are you seeing exceptions like TaskRejectedException(Spring Framework) or RejectedExecutionException(Java), and you want my few cents on how to handle it, go ahead plz. The easiest  way, though not the best way, is to use ThreadPoolExecutor.CallerRunsPolicy as a RejectionExecutionHandler for thread pool scenarios with BOUNDED queue. By default, the Executor uses the Abort Policy, which just […]

Spring Task Scheduler vs Quartz


Platform/Language: Java Components Versions: Spring 3.0, Quartz 1.8.4 Go for Spring’s light weight task scheduler implementation, if you’ve just SIMPLE requirements.. run tasks once after specified time schedule tasks to run repeatedly (fixed-rate as well as fixed delay) scheduling tasks based on simple cron expressions, etc. On the other hand, if you’ve COMPLEX requirements – […]