Apr 7th, 2011, 03:24 PM
[Help] Need to debug a spring batch app using quartz
Hello guys, this is my first post in spring forums.
I need to debug an application developed with spring batch that uses quartz to run some jobs.
The application starts running an ant script which is already configured to run in debug mode.
On the other hand, once the application is up and running I set in eclipse a couple of breakpoints to watch the application flow. The debugger is connected properly to the jvm in the port I already set and everything seem to be fine... but the problem is that the application finishes to run and never stops on a breakpoint.
So, my question is... how can I do to make the debugger work with spring batch and quartz? I have validated the debugger, ant configuration, jvm and everything is ok because I can debug other application part which doesn't run spring batch neither quartz.
Thanks a lot in advance!
Apr 7th, 2011, 04:12 PM
Spring batch and quartz don't do anything magically that would stop your debugger from working.
Try making a 3 line simple .java program with an infinite loop. Put in a breakpoint and confirm that you can attach.
if so, just do the same thing. If not, your server config is missing something.
Apr 8th, 2011, 02:50 AM
Why on earth debug like that?!...
Create a testcase that kicks off your batch job, run it from within eclipse and presto.. If you need to debug, try to make it as clean as possible.. If you really think it is something in your environment then that is the last thing to do...
Also if you simply start an application, load the app context nothing is going to happen... The scheduler simply shutsdown after startup b ecause there is nothing running anymore... So keep your main program alive...
Also again why on earth are you doing it like this, I would simply run it from within eclipse, a lot easier.
Tags for this Thread