Women in Technology

Hear us Roar



Article:
  Scheduling Jobs in a Java Web Application
Subject:   Problem with missing variables and classes
Date:   2009-04-06 12:49:29
From:   pflorin
Hi there,


I have the same problem as jorgesalido, and I really have to fix this problem. Did I had to import some JAR's into project so that variables (m_startOnLoad, m_startupDelayString ... and some clasess from init(...) method - such as DelayedSchedulerStarted) shoud not appear as not found.
Please give me a hint if you have any answer !


Best regards.

Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • Problem with missing variables and classes
    2009-05-04 20:46:07  Phyo Phyo [View]

    I need help.

    I'm new to struts application and also in scheduler.
    Like you said in the article, I've combined the struts with quartz.
    In my web.xml I have struts action servlet, my custom servelt and the quartz servlet.
    These are the following.

    <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
    <param-name>config</param-name>
    <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
    <param-name>chainConfig</param-name>
    <param-value>org/apache/struts/tiles/chain-config.xml</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet>
    <servlet-name>initServlet</servlet-name>
    <servlet-class>com.jit.igas3.servlet.SeInit</servlet-class>
    <init-param>
    <param-name>pathToConfig</param-name>
    <param-value>config</param-value>
    </init-param>
    <init-param>
    <param-name>pathToTemp</param-name>
    <param-value>temp</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>QuartzInitializer</servlet-name>
    <servlet-class>org.quartz.ee.servlet.QuartzInitializerServlet </servlet-class>
    <init-param>
    <param-name>shutdown-on-unload</param-name>
    <param-value>true</param-value>
    </init-param>
    <init-param>
    <param-name>start-scheduler-on-load</param-name>
    <param-value>false</param-value>
    </init-param>
    <load-on-startup>3</load-on-startup>
    </servlet>

    load-on-startup of action is 1.
    load-on-startup of initServlet is 2.
    load-on-startup of QuartzInitializer is 3.

    When I started the tomcat server, the value of factory is null.
    StdSchedulerFactory factory = (StdSchedulerFactory)
    ctx.getAttribute(QuartzInitializerServlet.QUARTZ_FACTORY_KEY);
    when i call this statement.

    So I change the load-on-startup of QuartzInitializer to 1, action to 2 and initServlet to 3.
    Than the action is not working although the plugin is working.
    It showing 404-Servlet action is not available.

    Could you please help me to find out that problem?
    and if possible I want to know the source of SchedulerPlugIn and DelayedSchedulerStarted.
    Thanks and best regards.