views:

38

answers:

1

Hi,

We have an axis2 webservice that scehdules a job using Timer. The class that gets executed when the jobs kicks off handles complex data types defined in the webservice package. We I deploy it and run it, I get class not found exception so I tested by packaging the datatype class file and putting it in the $tomcat_home/lib directory and that resolved the error.

Is there anyway to execute the scheduled job without having to put the datatype in the lib folder? Somehow indicate the Timer object where to find that datatype...?

Thanks, PJ

A: 

Under Tomcat, each webapp has its own classloader. Sounds like your Timer is not started from the same webapp.

If you start the timer from your own webapp, like init() or contextInitialized(), you should be able to put the class in your own war.

ZZ Coder