Discussions

News: Featured Article: Using the Quartz Enterprise Scheduler in J2EE

  1. Debu Panda of Oracle has written about the Quartz Scheduler, which is the open source equivalent of cron for J2EE. Debu walks you through an example of scheduling a job using the Quartz API.
    Quartz is an open source enterprise job scheduler from Open Symphony project. For details and downloading Quartz please look at http://www.quartzscheduler.org/quartz/. You can use Quartz to schedule jobs in your J2EE applications such as EJBs. This article will describe Quartz can be used in your J2EE applications to schedule cron like jobs. This will include how to configure Quartz in J2EE containers taking Oracle Application Server 10g Containers for J2EE (OC4J 9.0.4) as an example.
    Read Debu Panda in Using Quartz Enterprise Scheduler in J2EE Applications

    Threaded Messages (45)

  2. Printer Friendly broke[ Go to top ]

    I wanted to print the article out in "Printer Friendly" format but it failed.

    Thanks,
    Tom
  3. Fixed[ Go to top ]

    Thanks Tom. It is fixed now.

    Cheers,

    Dion
  4. EJB-based[ Go to top ]

    What about us poor folk who dont' have an EJB container?
  5. EJB-based[ Go to top ]

    Quartz can be embedded in standalon app: http://www.quartzscheduler.org/quartz/features.html
  6. A couple of things:

    1) It would be helpful to show an example of how to configure Quartz to work without a custom servlet. It can be done and is probably the most likely way people will use it within a J2EE application. I recently implemented something like this, and had to figure it out for myself since the Quartz docs weren't very explicit. Basically, you
    -Configure your web app to use the Quartz initializer servlet, loading on startup. For example (from web.xml):
    <servlet>
    <servlet-name>quartz</servlet-name>
    <display-name>Quartz Initializer Servlet</display-name>
    <servlet-class>org.quartz.ee.servlet.QuartzInitializerServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    -Add a "quartz.properties" file to your classpath, indicating how jobs will be loaded (as well as the quartz system properties). For example (from quartz.properties):
    org.quartz.plugin.jobInitializer.class = org.quartz.plugins.xml.JobInitializationPlugin
    org.quartz.plugin.jobInitializer.fileName = quartz-jobs.xml
    org.quartz.plugin.jobInitializer.overWriteExistingJobs = true
    org.quartz.plugin.jobInitializer.failOnFileNotFound = true
    -Add an xml file configuring your jobs and triggers, using the file name specified under the "org.quartz.plugin.jobInitializer.fileName" property.
    For example (from quartz-jobs.xml, in this case):
     <job>
        <job-detail>
          <name>alertJob</name>
          <group>alertJobs</group>
          <job-class>com.somecompany.AlertJob</job-class>
          <volatility>false</volatility>
          <durability>false</durability>
          <recover>false</recover>
        </job-detail>
        <trigger>
          <cron>
            <name>dailyTrigger</name>
            <group>alertTriggers</group>
            <job-name>alertJob</job-name>
            <job-group>alertJobs</job-group>
            <!-- every night at 2:15AM, M-F -->
            <cron-expression>0 15 2 ? * MON-FRI</cron-expression>
          </cron>
        </trigger>
      </job>
    Again, I think this is the most flexible, easy to use way to implement quartz, and I'm surprised it's not documented better. In most systems I use, I don't want to hard-code something like a scheduled process that might be subject to frequent scheduling change.

    2) The author mentions the "userThreads" setting for application servers to allow Quartz to use user threads. Unfortunately, I'm kind of thread-dumb, so I don't exactly know what this means or why it's important. What happens if Quartz is deployed without this setting? What implications does this setting have to other aspects of server performance (will it cause a conflict with some other setting)? I actually am in the middle of deploying an app that uses Quartz on OC4J and would like to be aware of the implications and necessity of this setting.

    Thanks,

    Drew
  7. sorry, I tried to use HTML <code> tags to offset code in my examples. Ignore them.
  8. code -> blockquote[ Go to top ]

    Hi Drew -

    I took the liberty of changing the code tags to blockquote tags for you.

    Cheers,

    Dion
  9. Drew,
    Thanks for the example without having to use a Custom Servlet. I was creating this for very customers that wanted to use cron type triggers with EJBs. I tried to venture this way but could not make this work for an EJB methods. This works great for Java classes though.

    Quartz uses its own thread pools and are not container managed threads and it's cannot use the thread pooling from the container. Even I had problems firing Triggers/Jobs when I disabled User Threads.

    Please make sure that you do not set the max threads to very high in the quartz.properies file. According to Quartz doc:"A maximum of 5 should be fine for a typical application".

    Hope this helps..

    regards
    Debu
  10. Debu,

    Thanks for the info on EJBs. I've been using an EJB-less environment. As far as user threads are concerned, right now I only have one job running nightly. I've configured 2 threads. Should I be concerned?

    Also, in the deployment environment, the server is running a full 9iAS install, not just the oc4j container. So I can't just run the oc4j jar with a user threads switch. Any ideas on how to enable that setting in the 9iAS server? Perhaps there's a console setting? Also, I'm still unclear if this setting has any impact on any other parts of the system, or if there's any situation I should be aware of that this setting might cause.

    Thanks,

    Drew
  11. Drew: "So I can't just run the oc4j jar with a user threads switch. Any ideas on how to enable that setting in the 9iAS server? Perhaps there's a console setting?"

    >> You can set the -userThreads in the OC4J options in the Advanced Settings for your OC4J instance.

    Drew: Also, I'm still unclear if this setting has any impact on any other parts of the system, or if there's any situation I should be aware of that this setting might cause.

    >> this is on a per instance basis so you would not impact any other instance

    -Debu
  12. Hi Drew, did you get it working ? I use GlassFish and I'd like to know your solution if you found one. Thanks.
  13. Use Message-Driven Beans[ Go to top ]

    A technique I've seen used with Quartz and EJB Methods was to let the Quartz jobs simply send JMS messages that trigger message-bean driven beans. Works great, even if Quartz is embedded within an application server, either using the servlet or - what we did with WebLogic - custom-written startup-classes.
  14. Is there any particular reason why the "QuartzServlet" couldn't be replaced with a "QuartzServletContextListener" which performs the same tasks upon application deployment?
  15. Here's the code from the Quartz servlet that sets up the scheduler:
    public void init(ServletConfig cfg) throws javax.servlet.ServletException {
            super.init(cfg);

            log("Quartz Initializer Servlet loaded, initializing Scheduler...");

            try {

                StdSchedulerFactory.getDefaultScheduler().start();

            } catch (Exception e) {
                log("Quartz Scheduler failed to initialize: " + e.toString());
                throw new ServletException(e);
            }
        }

        public void destroy() {
            try {
                Scheduler sched = StdSchedulerFactory.getDefaultScheduler();

                if (sched != null) sched.shutdown();
            } catch (Exception e) {
                log("Quartz Scheduler failed to shutdown cleanly: " + e.toString());
                e.printStackTrace();
            }

            log("Quartz Scheduler successful shutdown.");
        }
    From what I can tell, there's no reason that can't be wrapped in a context listener. That's actually not a bad idea, because then your app is a little more portable. I've found that some servers handle the startup parameter on a servlet (in WEB-INF) differently. If I'm not mistaken, Tomcat treats it as a boolean, and I know that Orion and OC4J treat it as a number, to specify the order of load (I vaguely recall that the servlet spec doesn't force it one way or the other). Using a context listener avoids this issue altogether. Though of course then you'd to deal with the fact that it wouldn't run on older servlet specs.

    Thanks for the tip; I may go ahead and change my app to do this. I may even contribute the results back into Quartz.
  16. help please[ Go to top ]

    Hello everyone i just did what Drew McAuliffe post sad, but i get one big anoying error, cant parsing :|
    Im using the version 1.4!


    my xml file with jobs and trigers are:
    <quartz xmlns="http://www.quartzscheduler.org/ns/quartz"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.quartzscheduler.org/ns/quartz http://www.quartzscheduler.org/ns/quartz/job_scheduling_data_1_1.xsd"
                   version="1.1">

        <job-detail>
          <name>testJob1</name>
          <group>testJobs</group>
          <job-class>com.quatrosi.bb.sin.service.DummyService</job-class>
          <volatility>false</volatility>
          <durability>false</durability>
          <recover>false</recover>
          </job-detail>
        <trigger>
          <cron>
            <name>testTrigger1</name>
            <group>testJobs</group>
            <job-name>testJob1</job-name>
            <job-group>testJobs</job-group>
            <cron-expression>0/15 * * ? * *</cron-expression>
          </cron>
        </trigger>
      </job>
    </quartz>



    the error is:

    15/Jun/2004 17:02:57 org.quartz.impl.StdSchedulerFactory instantiate
    INFO: Quartz scheduler 'SINScheduler' initialized from the specified file : 'C:\
    \jakarta-tomcat-5.0.14\\webapps\\sin\\WEB-INF
    quartz.properties'
    15/Jun/2004 17:02:57 org.quartz.impl.StdSchedulerFactory instantiate
    INFO: Quartz scheduler version: 1.4.0
    15/Jun/2004 17:02:57 org.quartz.xml.JobSchedulingDataProcessor processFile
    INFO: Parsing XML file: C:\jakarta-tomcat-5.0.14\webapps\sin\WEB-INF\data\my_job
    _data.xml with systemId: null validating: true validating schema: file:/C:/jakar
    ta-tomcat-5.0.14/work/Catalina/localhost/sin/loader/org/quartz/xml/job_schedulin
    g_data_1_1.xsd
    15/Jun/2004 17:02:57 org.quartz.plugins.xml.JobInitializationPlugin processFile
    SEVERE: Error scheduling jobs: null
    java.net.MalformedURLException
            at java.net.URL.<init>(URL.java:571)
            at java.net.URL.<init>(URL.java:434)
            at java.net.URL.<init>(URL.java:383)
            at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown So
    urce)
            at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
            at org.apache.xerces.impl.XMLEntityManager.startDocumentEntity(Unknown S
    ource)
            at org.apache.xerces.impl.XMLDocumentScannerImpl.setInputSource(Unknown
    Source)
            at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
            at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
            at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
            at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
            at org.apache.commons.digester.Digester.parse(Digester.java:1548)
            at org.quartz.xml.JobSchedulingDataProcessor.processFile(JobSchedulingDa
    taProcessor.java:369)
            at org.quartz.xml.JobSchedulingDataProcessor.processFileAndScheduleJobs(
    JobSchedulingDataProcessor.java:394)
            at org.quartz.plugins.xml.JobInitializationPlugin.processFile(JobInitial
    izationPlugin.java:342)
            at org.quartz.plugins.xml.JobInitializationPlugin.start(JobInitializatio
    nPlugin.java:316)
            at org.quartz.core.QuartzScheduler.startPlugins(QuartzScheduler.java:180
    0)
            at org.quartz.core.QuartzScheduler.start(QuartzScheduler.java:367)
            at org.quartz.impl.StdScheduler.start(StdScheduler.java:149)
            at org.quartz.ee.servlet.QuartzInitializerServlet.init(QuartzInitializer
    Servlet.java:126)
            at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
    java:1044)
            at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:88
    7)

    Can someone help me here?
    Many thanks
  17. help please[ Go to top ]

    I came across the exact same error-
    What does this stack indicate ?

    SEVERE: Error scheduling jobs: null
    java.net.MalformedURLException
            at java.net.URL.<init>(URL.java:571)
            at java.net.URL.<init>(URL.java:434)
            at java.net.URL.<init>(URL.java:383)
            at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown So
    urce)
            at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown
     Source)
            at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
            at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
            at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
            at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
            at org.apache.commons.digester.Digester.parse(Digester.java:1548)
            at org.quartz.xml.JobSchedulingDataProcessor.processFile(JobSchedulingDa
    taProcessor.java:369)
            at org.quartz.xml.JobSchedulingDataProcessor.processFileAndScheduleJobs(
    JobSchedulingDataProcessor.java:394)

    Thanks
  18. help please[ Go to top ]

    OK if quartz.properties and jobs.xml are kept in /WEB-INF/classes then quartz is able to see it. In web.xml then just define the quartz init servlet as

    <servlet>
    <servlet-name>quartz</servlet-name>
    <display-name>Quartz Initializer Servlet</display-name>
    <servlet-class>org.quartz.ee.servlet.QuartzInitializerServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>

    That should do it.
  19. Drew,
    Do you have a sample code that u implemented on OC4J.
    EAR/WAR file

    Regards
    Mehroz
  20. avax.servlet.ServletException: ThreadPool class not specified.
    at org.quartz.ee.servlet.QuartzInitializerServlet.init(Unknown Source)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1029)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4013)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4357)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
    at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:903)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:252)
    at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
    at org.apache.commons.digester.Rule.end(Rule.java:276)
    at org.apache.commons.digester.Digester.endElement(Digester.java:1058)
    at org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.java:76)
    at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.commons.digester.Digester.parse(Digester.java:1567)
    at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:488)
    at org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
    at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:483)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
    at org.apache.catalina.core.StandardService.start(StandardService.java:480)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
    ----- Root Cause -----
    org.quartz.SchedulerException: ThreadPool class not specified.
    at org.quartz.impl.StdSchedulerFactory.instantiate(Unknown Source)
    at org.quartz.impl.StdSchedulerFactory.getScheduler(Unknown Source)
    at org.quartz.ee.servlet.QuartzInitializerServlet.init(Unknown Source)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1029)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4013)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4357)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
    at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:903)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:252)
    at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
    at org.apache.commons.digester.Rule.end(Rule.java:276)
    at org.apache.commons.digester.Digester.endElement(Digester.java:1058)
    at org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.java:76)
    at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.commons.digester.Digester.parse(Digester.java:1567)
    at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:488)
    at org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
    at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:483)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
    at org.apache.catalina.core.StandardService.start(StandardService.java:480)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)

    2005-03-21 09:42:05 StandardContext[/jsp-examples]ContextListener: contextInitialized()
    2005-03-21 09:42:05 StandardContext[/jsp-examples]SessionListener: contextInitialized()
    2005-03-21 09:42:06 StandardContext[/servlets-examples]ContextListener: contextInitialized()
    2005-03-21 09:42:06 StandardContext[/servlets-examples]SessionListener: contextInitialized()
    2005-03-21 09:42:06 StandardContext[/dashboard]quartz: Quartz Initializer Servlet loaded, initializing Scheduler...
    2005-03-21 09:42:06 StandardContext[/dashboard]quartz: configFile ------->> null
    2005-03-21 09:42:06 StandardContext[/dashboard]quartz: Quartz Scheduler failed to initialize: org.quartz.SchedulerException: ThreadPool class not specified.
    2005-03-21 09:42:06 StandardContext[/dashboard]Servlet /dashboard threw load() exception
    javax.servlet.ServletException: ThreadPool class not specified.
    at org.quartz.ee.servlet.QuartzInitializerServlet.init(Unknown Source)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1029)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4013)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4357)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
    at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:903)
    at sun.reflect.GeneratedMethodAccessor54.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:252)
    at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
    at org.apache.commons.digester.Rule.end(Rule.java:276)
    at org.apache.commons.digester.Digester.endElement(Digester.java:1058)
    at org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.java:76)
    at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.commons.digester.Digester.parse(Digester.java:1567)
    at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:488)
    at org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
    at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:483)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
    at org.apache.catalina.core.StandardService.start(StandardService.java:480)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
    ----- Root Cause -----
    org.quartz.SchedulerException: ThreadPool class not specified.
    at org.quartz.impl.StdSchedulerFactory.instantiate(Unknown Source)
    at org.quartz.impl.StdSchedulerFactory.getScheduler(Unknown Source)
    at org.quartz.ee.servlet.QuartzInitializerServlet.init(Unknown Source)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1029)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4013)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4357)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
    at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:903)
    at sun.reflect.GeneratedMethodAccessor54.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:252)
    at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
    at org.apache.commons.digester.Rule.end(Rule.java:276)
    at org.apache.commons.digester.Digester.endElement(Digester.java:1058)
    at org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.java:76)
    at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.commons.digester.Digester.parse(Digester.java:1567)
    at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:488)
    at org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
    at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:483)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
    at org.apache.catalina.core.StandardService.start(StandardService.java:480)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
  21. Drew,
    I have not tried your method..but sounds promising for what I have to do.
    I am EXTREMELY confused after reading all the quartz documentations out there(ranging from the opensymphony tutorial, Debu's article, Bosanac's o'reilly article, JLG plugin documentation at http://demo.jgsullivan.com/struts/QuartzPlugIn.html and your input:-)..My brain hurts:) Ignorance is a bliss, ain't it?:)

    In my case I have a Struts action class which implements the StatefulJob interface (why struts? Because my whacky customer wants to run the job at his whim and fancy..grrr!-where do these people come from ?? - Well not as a chron job..but just to run it at any point in time). So I did the struts action class implementing the StatefulJob interface. Two birds in one shot..same action file can be used as just a job and also as a chron job (this is what prompted me to look at the sketchy documentation of the JLG plugin mentioned above, but that confused me more..as they mention nothing about how to use the JDBCJobStore in there)

    My question is this:- if I use the "quartz-jobs.xml" and set it in the quartz.properties like you(Drew) have suggested...AND if I ALSO use the JDBCJobStore, which settings take precedence...Is that the ones in the "quartz-jobs.xml" or the JDBCJobStore table..

    Also what takes precedence if I use the "quartz-jobs.xml" and a RAMJobDataStore?
  22. Hi Drew McAuliffe , I am very new to Quartz.I have downloaded quartz-1.6.0.zip(latest) and quartz-1.4.3.zip.I dont know how to use it,not even a single step of installation of quartz. can u plz help me how to use quartz from the begining step by step.i tried by mapping quartz.jar to classpath. i tried by running the examples given in that Zip .. but no use of it.. now am in the beginning stage. i dnt know what to do further and to proceed any more. plz help me in time,, i am under pressure in my company.. so plz help me as soon as possible.. Cheers and Regards, siva
  23. Quartz in WebSphere 5.0.2[ Go to top ]

    Hi,

    I have tried to get it running on WebSphere 5.0.2 but I get problems by looking up the EJB. I get:

    [2004-04-14 09:30:00:287 CEST] 759ba2be JobRunShell I org.quartz.core.JobRunShell Job SystemStatus Trigger Job.SystemStatus Trigger threw a JobExecutionException:
    [2004-04-14 09:30:00:287 CEST] 759ba2be JobRunShell I org.quartz.core.JobRunShell TRAS0014I: The following exception was logged org.quartz.JobExecutionException: javax.naming.NameNotFoundException: Name comp/env/ejb not found in context "java:". [See nested exception: javax.naming.NameNotFoundException: Name comp/env/ejb not found in context "java:".]
    at org.quartz.jobs.ee.ejb.EJBInvokerJob.execute(EJBInvokerJob.java:137)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:178)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:487)
    * Nested Exception (Underlying Cause) ---------------
    javax.naming.NameNotFoundException: Name comp/env/ejb not found in context "java:".
    at com.ibm.ws.naming.ipbase.NameSpace.getParentCtxInternal(NameSpace.java:1638)
    at com.ibm.ws.naming.ipbase.NameSpace.lookupInternal(NameSpace.java:997)
    at com.ibm.ws.naming.ipbase.NameSpace.lookup(NameSpace.java:920)
    at com.ibm.ws.naming.urlbase.UrlContext.lookup(UrlContext.java:1211)
    at com.ibm.ws.naming.urlbase.UrlContext.lookup(UrlContext.java:1203)
    at com.ibm.ws.naming.urlbase.UrlContext.lookup(UrlContext.java:1257)
    at javax.naming.InitialContext.lookup(InitialContext.java:359)
    at org.quartz.jobs.ee.ejb.EJBInvokerJob.execute(EJBInvokerJob.java:135)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:178)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:487)

    Before I had a regular servlet doing the same thing but triggered by a crontab job. The EJB is there on that JNDI name.

    Any idea?

    BR Joacim
  24. Quartz in WebSphere 5.0.2[ Go to top ]

    I have removed the 'java:comp/env/' and just have the value from ejb-ref-name in web.xml.
    Now it can find the EJB but the method I want to use have both input argument and return value. I don't need the return value but I must use the argument. Therefore I have:

    JobDetail jd = new JobDetail("SystemStatus Trigger", "SystemStatus Trigger Job", EJBInvokerJob.class);
    jd.getJobDataMap().put("ejb", "ejb/vadis2004/integration/core/systempollerws");
    jd.getJobDataMap().put("method", "forcePollSystems");
    Object[] jdArgs = {new ForcePollSystemsRequest()};
    jd.getJobDataMap().put("args", jdArgs);

    now I get:

    java.lang.NoSuchMethodException: forcePollSystems
    at java.lang.Class.getMethod0(Native Method)
    at java.lang.Class.getDeclaredMethod(Class.java:1196)
    at org.quartz.jobs.ee.ejb.EJBInvokerJob.execute(EJBInvokerJob.java:198)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:178)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:487)

    / Joacim
  25. Quartz in WebSphere 5.0.2[ Go to top ]

    I think I got the solution. I changed where the method is fetched from the original:
    methodExecute = remoteClass.getDeclaredMethod(method, argTypes);

    To the new one:

    methodExecute = remoteClass.getMethod(method, argTypes);

    BR Joacim
  26. At this moment Quartz is quite unstable and buggy:
      v 1.3.3 does not execute all jobs which were scheduled to run at the same time, v 1.3.4 fixed the problem but CronTrigger does not work with day-of-week specs.

    Quartz bug database suddenly became empty and does not allow submitting new bugs now :((((
  27. Thanks for the great article, I am working on implementing a job scheduler within a J2EE container running on OC4J right now, so this really helps! :-)

    Since you're using OC4J over Oracle, I was hoping maybe you also used JDev, and if so, do you know where I can find a userThreads setting within JDev (for when I just run the server on my own computer for development).

    For example, I hit the "debug" button to start up the OC4J appserver and deploy the app and run it (on my local machine). Somewhere I must be able to configure it to send that userThreads command line parameter, I just can't find where.

    Thanks,
    Christopher Buchholz
    eStar Communications
  28. userThreads setting in JDEV[ Go to top ]

    Hello everybody:

    As Christopher, I am using JDev to develope an application which use Quartz to schedule jobs, and I am having some troubles with threads and deadlocks. After reading all documentation and trying all the reasonable combination of properties configuration, I think that my problems is related to the userThreads configuration that Debu mention in his useful article.

    So, If someone could help us (Christopher and me), I need to configure JDev to use user threads in debugging mode.

    Thanks in advance,
    Antonio Crespo.
  29. Configure userThreads in JDev[ Go to top ]

    Hello:

    I have found where to configure the '-useThreads' parameter in JDeveloper 10g for run/debug mode.
     - Select the project which you want to set with the above parameter.
     - Go to Tools > Project properties...
     - Select 'J2EE' in the tree of the left panel.
     - In the box labeled with 'Embedded OC4J Command Line' add at the end of the command the parameter '-useThreads'. The command after that should appear like this:
       ${java} ${jvm} -classpath ${oc4j.jar} ${java.options}
       ${memory.archive.flag} ${keep.alive.timeout.flag}
       ${oracle.dms.sensors.flag} ${oracle.jms.lock.flag}
       ${oc4j.main.class} -config ${server.xml} -userThreads

    Hope it will be useful for someone.
    Antonio.
  30. Will running Quartz in container work with clustering? Its's started by a servet when each node is started, with the web.xml tag - "load-on-startup" - so there's one quartz instance per node. Does this mean you'll get duplicate jobs?
    Also, quartz is multi-threaded, so running in a J2EE address space is dubious and requires running the app server with -useThreads to enable it.
  31. ithin a app server[ Go to top ]

    As Quartz spawns its own threads, is it ok to use Quartz

    within a app server like weblogic?As these threads will not be managed by app server but by quartz itself.
    Regds
    Ashutosh
  32. As Quartz spawns its own threads, is it ok to use Quartz
    within a app server like weblogic?As these threads will not be managed by app server but by quartz itself.
    Regds
    Ashutosh
  33. Any news for this ?

    original message was:
    As Quartz spawns its own threads, is it ok to use Quartzwithin a app server like weblogic?As these threads will not be managed by app server but by quartz itself.
  34. As far as I can tell, no[ Go to top ]

    The J2EE 1.4 spec makes it clear that the creation of threads from within an enterprise app is at the very least strongly discouraged. Section 6.2.1 makes it pretty clear:

    "...
    For example, if enterprise beans were allowed to manage threads, the J2EE platform could not manage the life cycle of the enterprise beans, and it could not properly manage transactions.
    ..."

    Section 4.2.1.1 opens the door to creating threads in a webapp, but makes it clear that problems could occur:

    "...
    If a web component creates a thread, the J2EE platform must ensure that the newly created thread is not associated with any JTA transaction.
    ..."

    So the idea of starting Quartz in a servlet, although it may work in some containers, goes against the intent of the J2EE spec designers, and could break your applications in unforseen ways. You may have to make changes to security policies to enable this, but then you have to be sure you know what you're doing.
  35. Hi, Is it possible to configure Quartz to use the ThreadManager of the J2EE Server? If not, do you plan to integrate this feature? If yes... when? Thanks a lot, Kind regards, Stephane Clinckart
  36. quartz and oc4j[ Go to top ]

    I found your article very interesting.
    And i use quartz for xml file creation scheduling.
    But i cannot use quartz with log4j !
    I have to put some jar file in the home/lib directory of the oc4j instance and reference them in the server.xml(init-library path=....) file.
    But the process can't write the log file.
    Thank you.
  37. Quartz in JBOSS[ Go to top ]

    I'm having problems using quartz in JBOSS. This problem is related to the user Threads.
    I want to know the similar command for enabling User Threads in JBOSS (like -userThreads in OC4J).

    Thanks in advance.
  38. Quartz and Spring[ Go to top ]

    I currently use Spring application framework and Quartz, the using them combined has made intergration very simple!

    grab a refrence to org.springframework.scheduling.quartz.SchedulerFactoryBean
    in a servelet like..
     WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext( servletContext );

         StdScheduler myScheduler = ( StdScheduler ) wac.getBean( "mySchedulere" );

    myScheduler, is a bean in the applicationContenxt.

    when you want to add trigger's,and jobs dynamitically, OR add the trigger and job information to the applicationContenxt.xml

    i've deleted tons of code using this.
    http://www.springframework.org/





    -Pharaoh
    http://pharaohofkush.blogspot.com/
  39. I have a class that is included in the jobs.xml file, whis is as follows

    <?xml version="1.0" encoding="UTF-8"?>
    <quartz xmlns="http://www.quartzscheduler.org/ns/quartz" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.quartzscheduler.org/ns/quartz http://www.quartzscheduler.org/ns/quartz/job_scheduling_data_1_1.xsd" version="1.1">
      <calendar class-name="org.quartz.impl.calendar.HolidayCalendar" replace="true">
        <name>holidayCalendar</name>
        <description>HolidayCalendar</description>
        <base-calendar class-name="org.quartz.impl.calendar.WeeklyCalendar">
          <name>weeklyCalendar</name>
          <description>WeeklyCalendar</description>
          <base-calendar class-name="org.quartz.impl.calendar.AnnualCalendar">
            <name>annualCalendar</name>
            <description>AnnualCalendar</description>
          </base-calendar>
        </base-calendar>
      </calendar>
      <job>
        <job-detail>
          <name>4</name>
          <group>testJobs</group>
          <job-class>com.company.ReportJob</job-class>
        </job-detail>
        <trigger>
          <simple>
            <name>testTrigger0</name>
            <group>testJobs</group>
            <job-name>testTrigger0</job-name>
            <job-group>testJobs</job-group>
            <start-time>2005-03-17T12:15:00</start-time>
            <repeat-interval>Every Day</repeat-interval>
          </simple>
        </trigger>
      </job>
    </quartz>

    and i want to include the jar containing ReportJob class in the jobInitExample.bat . when i edit this this batch file it is not running.
  40. I am deploying quartz scheduler as a mbean in jboss, and looking it up by jndi. The jboss server startup the quartz scheduler itself, but you must use database to maintain the state of all the jobs.

    I am just wondering if there are anyways to invoke a job there is in another machine, such as having Machine A invoke method in Machine B and its resource.
  41. Using Quartz for BIG jobs[ Go to top ]

    I am planning to use quartz in my next project to run BIG jobs. I mean these may take a bit of time to execute, say 5-10 minutes or so. These jobs do some data extractions and generate a huge data file, which might load up the system. Should there be a problem using quartz for this. The application is simple J2EE with hibernate + spring and no ejbs.

    Also, I read in the same message thread that there is a problem in scheduling weekly cron jobs. Is this still a problem. I plan to use quartz for mostly weekly jobs.
  42. Newbie in Quartz[ Go to top ]

    I read you comment containing Quartz in J2EE and you described the thing i am planning to do. I want to to use the TimerTask which is implemented in Quartz. My setting values should come from the database(JDBC) and my Bean should start automatically with my JBOSS Server. But I have no clue where i have to start. Maybe you can tell me some steps which may help a little bit. How can I make a Bean or how can I deploy this Bean to the JBoss Server. Those are some questions i delve with! It would be nice if you could answer some :-).

    Thanks
    Anna
  43. i have configured my quartz and running. my bean method which runs as a scheduled quartz job is as follows:: public void doJob() throws Exception{ TestLocalHome tl = null; TestLocal th = null; try{ InitialContext ic = new InitialContext(); tl = (TestLocalHome)ic.lookup("java:comp/env/ejb/Test"); th = tl.create("name"); }catch (Exception e){ System.out.println e.printStackTrace(); } } The method is trying to access another entity bean called Test within the application. I am getting the following exception when this method executes. i have tried looking up the bean like :: tl = (TestLocalHome)ic.lookup("ejb/Test"); and still it fails to work. Help me please i've been stuck for too long a time trying to solve this. 2/6/07 8:38:50:068 CAT] 00000078 SystemErr R javax.naming.NameNotFoundException: Name comp/env/ejb not found in context "java:". at com.ibm.ws.naming.ipbase.NameSpace.getParentCtxInternal(NameSpace.java(Compiled Code)) at com.ibm.ws.naming.ipbase.NameSpace.lookupInternal(NameSpace.java(Compiled Code)) at com.ibm.ws.naming.ipbase.NameSpace.lookup(NameSpace.java(Inlined Compiled Code)) at com.ibm.ws.naming.urlbase.UrlContextImpl.lookup(UrlContextImpl.java(Compiled Code)) at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java(Compiled Code)) at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java(Compiled Code)) at javax.naming.InitialContext.lookup(InitialContext.java(Inlined Compiled Code)) at zw.co.interlife.quartz.QuartzEJBBean.doJob(QuartzEJBBean.java(Compiled Code)) at zw.co.interlife.quartz.EJSRemoteStatelessQuartzEJB_6c8a0236.doJob(EJSRemoteStatelessQuartzEJB_6c8a0236.java(Compiled Code)) at zw.co.interlife.quartz._QuartzEJB_Stub.doJob(_QuartzEJB_Stub.java(Compiled Code)) at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code)) at java.lang.reflect.Method.invoke(Method.java(Compiled Code)) at org.quartz.jobs.ee.ejb.EJBInvokerJob.execute(EJBInvokerJob.java(Compiled Code)) at org.quartz.core.JobRunShell.run(JobRunShell.java(Compiled Code)) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java(Compiled Code))
  44. Hi Foster Akaketwa , I am very new to Quartz.I have downloaded quartz-1.6.0.zip(latest) and quartz-1.4.3.zip.I dont know how to use it,not even a single step of installation of quartz. can u plz help me how to use quartz from the begining step by step.i tried by mapping quartz.jar to classpath. i tried by running the examples given in that Zip .. but no use of it.. now am in the beginning stage. i dnt know what to do further and to proceed any more. plz help me in time,, plz help me as soon as possible.. Cheers and Regards, siva
  45. hello, i am using quartz jobscheduling using jobstoreTX, its working fine. i need small example for quartz jdbc transaction using JobstoreTX. pls any one help me. Thanks sambath
  46. Quartz invoking an EJB method[ Go to top ]

    Hello, I got an exception (see below) while trying to invoke an EJB method which I try to schedule from within a servlet via EJBInvokerJob.class. I use GlassFish v2ur2 and Quartz 1.6.4 and there are no security restrictions on that EJB. The security manager in GlassFish is turned off. It seems that Quartz is not allowed to invoke it due to the following reading: java.rmi.AccessException: Client is not authorized for this invocation. Did anybody face a similar problem and found a solution ? Thanks for your help. 2009-01-20 08:06:10,231: {INFO} core.JobRunShell Job Report Generation.Income Report threw a JobExecutionException: org.quartz.JobExecutionException: java.rmi.AccessException: CORBA NO_PERMISSION 9998 Maybe; nested exception is: org.omg.CORBA.NO_PERMISSION: vmcid: 0x2000 minor code: 1806 completed: Maybe [See nested exception: java.rmi.AccessException: CORBA NO_PERMISSION 9998 Maybe; nested exception is: org.omg.CORBA.NO_PERMISSION: vmcid: 0x2000 minor code: 1806 completed: Maybe] at org.quartz.jobs.ee.ejb.EJBInvokerJob.execute(EJBInvokerJob.java:175) at org.quartz.core.JobRunShell.run(JobRunShell.java:202) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525) Caused by: java.rmi.AccessException: CORBA NO_PERMISSION 9998 Maybe; nested exception is: org.omg.CORBA.NO_PERMISSION: vmcid: 0x2000 minor code: 1806 completed: Maybe at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:277) at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.wrapException(Util.java:741) at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:243) at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:152) at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:225) at org.omg.stub.javax.ejb._EJBHome_DynamicStub.getEJBMetaData(org/omg/stub/javax/ejb/_EJBHome_DynamicStub.java) at org.quartz.jobs.ee.ejb.EJBInvokerJob.execute(EJBInvokerJob.java:173) ... 2 more Caused by: org.omg.CORBA.NO_PERMISSION: vmcid: 0x2000 minor code: 1806 completed: Maybe Caused by: java.rmi.AccessException: Client is not authorized for this invocation. 2009-01-20 08:06:15,232: {DEBUG} simpl.SimpleJobFactory Producing instance of Job 'Report Generation.Income Report', class=org.quartz.jobs.ee.ejb.EJBInvokerJob 2009-01-20 08:06:15,232: {DEBUG} core.JobRunShell Calling execute on job Report Generation.Income Report JACC Policy Provider: PolicyWrapper.implies, context(TimerEJB/TimerEJB)- permission((javax.security.jacc.EJBMethodPermission TimerSessionBean getEJBMetaData,Home,)) domain that failed(ProtectionDomain (file:/TimerEJB/TimerEJB ) null java.security.Permissions@a901f8 ( (java.lang.RuntimePermission getClassLoader) (java.lang.RuntimePermission loadLibrary.*) (java.lang.RuntimePermission accessDeclaredMembers) (java.lang.RuntimePermission getProtectionDomain) (java.lang.RuntimePermission modifyThreadGroup) (java.lang.RuntimePermission stopThread) (java.lang.RuntimePermission setContextClassLoader) (java.lang.RuntimePermission queuePrintJob) (javax.management.MBeanTrustPermission register) (unresolved com.sun.corba.ee.impl.presentation.rmi.DynamicAccessPermission access null) (unresolved javax.security.jacc.EJBMethodPermission TimerSessionBean quartzTestMethod,Remote,) (unresolved javax.security.jacc.EJBMethodPermission TimerSessionBean setTimer,Remote,long) (unresolved javax.security.jacc.EJBMethodPermission TimerSessionBean giveItBack,Local,) (unresolved javax.security.jacc.EJBMethodPermission TimerSessionBean giveItBack,Remote,) (unresolved javax.security.jacc.EJBMethodPermission TimerSessionBean quartzTestMethod,Local,) (unresolved javax.security.jacc.EJBMethodPermission TimerSessionBean timeout,Remote,javax.ejb.Timer) (unresolved com.sun.enterprise.security.CORBAObjectPermission * *) (java.util.PropertyPermission line.separator read) (java.util.PropertyPermission java.vm.version read) (java.util.PropertyPermission java.vm.specification.version read) (java.util.PropertyPermission java.vm.specification.vendor read) (java.util.PropertyPermission java.vendor.url read) (java.util.PropertyPermission java.vm.name read) (java.util.PropertyPermission * read,write) (java.util.PropertyPermission os.name read) (java.util.PropertyPermission java.vm.vendor read) (java.util.PropertyPermission path.separator read) (java.util.PropertyPermission java.specification.name read) (java.util.PropertyPermission os.version read) (java.util.PropertyPermission os.arch read) (java.util.PropertyPermission java.class.version read) (java.util.PropertyPermission java.version read) (java.util.PropertyPermission file.separator read) (java.util.PropertyPermission java.vendor read) (java.util.PropertyPermission java.vm.specification.name read) (java.util.PropertyPermission java.specification.version read) (java.util.PropertyPermission java.specification.vendor read) (javax.security.auth.PrivateCredentialPermission javax.resource.spi.security.PasswordCredential * "*" read) (javax.management.MBeanPermission [com.sun.messaging.jms.*:*] *) (java.net.SocketPermission localhost:1024- listen,resolve) (java.net.SocketPermission * connect,resolve) (java.io.FilePermission C:\DOCUME~1\e01a14b2\LOCALS~1\Temp
    - delete) (java.io.FilePermission C:/glassfish/domains/domain1\lib\databases\- delete) (java.io.FilePermission > read,write) ) )