3 Replies Latest reply on Oct 1, 2003 8:28 AM by Mick Knutson

    Error using QuartzPlugIn with JBoss 3.0.7

    Mick Knutson Newbie

      I have been trying to use the Quartz scheduler, with the struts QuartzPlugin with JBoss.
      I have pounded the struts group about this, and there are many people, not using JBoss, but using the plugin successfully. But with JBoss, I keep getting the following errors:

      21:30:28,495 INFO [TilesPlugin] Tiles definition factory loaded for module ''.
      21:30:28,511 ERROR [MainDeployer] could not start deployment: file:/C:/usr/local/jboss-3.0.7/server/default/tmp/deploy/server/default/deploy/your
      sos-app.ear/35.yoursos-app.ear-contents/yoursos-web-application.war
      java.lang.NoClassDefFoundError: org/apache/struts/action/PlugIn

      The quartz.jar, and quartzplugin.jar are both in my WAR.

      Can anyone please help me figure out what the error is here?

        • 1. Re: Error using QuartzPlugIn with JBoss 3.0.7
          Mick Knutson Newbie

          I am still having issues with this, but I am at least getting more data
          collected so hopefully someone can enlighten me as to my errors:

          When I use the example1.bat file, the Quartz example works fine.
          Now, when I use the quartz, jgl-quartz lib or the jgl-struts plugin I get
          the NPE.

          Here is the DIR layout of my entire EAR file:

          EAR:
          -->meta-inf/application.xml
          commons-dbcp.jar
          commons-discovery.jar
          commons-httpclient.jar
          commons-logging.jar
          commons-logging-api.jar
          commons-pool.jar
          commons-resources.jar
          jdbc2_0-stdext.jar
          quartz.jar
          quartz.properties
          app-ejbs.jar
          app-web.war
          |--->meta-inf/jboss-web.xml
          |--->meta-inf/quartz-config.xml
          |--->meta-inf/struts*.tld
          |--->meta-inf/tiles-defs.xml
          |--->meta-inf/validation.xml
          |--->meta-inf/web.xml
          |--->web-inf/classes/quartz.properties
          |--->web-inf/classes/com.baselogic.**.class's
          |--->web-inf/**.jsp's
          |--->web-inf/lib/commons-beanutils.jar
          |--->web-inf/lib/commons-collections.jar
          |--->web-inf/lib/commons-digester.jar
          |--->web-inf/lib/commons-fileupload.jar
          |--->web-inf/lib/commons-lang.jar
          |--->web-inf/lib/commons-logging.jar
          |--->web-inf/lib/commons-validator.jar
          |--->web-inf/lib/jakarta-oro.jar
          |--->web-inf/lib/jgs-quartz-0.2-dev.jar
          |--->web-inf/lib/jgs-struts-0.2-dev.jar
          |--->web-inf/lib/sslext.jar
          |--->web-inf/lib/struts.jar
          |--->web-inf/lib/struts-legacy.jar



          I am in a serious pickle here, as I have to get this running by Wednesday. I
          am very sorry to be sending this again, but I have busted my head against a
          wall on this all last week, and the weekend with no success.
          You help is very much appreciated.

          Here are the pertinant pieces:

          I have an EAR, with a common.jar, ejb.jar and app.WAR inside
          all the quartz, and jgs jars _all_ live in my WAR.

          struts-config.xml:

          <plug-in className="com.jgsullivan.struts.plugins.QuartzPlugIn" >
          <set-property property="configPath"
          value="/WEB-INF/quartz-config.xml" />
          </plug-in>


          WEB-INF/classes/quartz.properties:

          org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
          org.quartz.threadPool.threadCount = 5
          org.quartz.threadPool.threadPriority = 4
          org.quartz.jobStore.misfireThreshold = 5000
          org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore


          WEB-INF/quartz-config.xml:

          <?xml version="1.0" encoding="ISO-8859-1" ?>
          <quartz-config>
          <!-- Create a Trigger -->
          <trigger-group name="alertSenderTriggerGroup">

          <set-property property="repeatCount" value="25"/>
          <set-property property="repeatInterval" value="5000"/>

          </trigger-group>


          <!-- Create a Job -->
          <job-group name="alertSenderJobGroup">
          <!--
          -->


          </job-group>

          <!-- Schedule the Job/Trigger -->




          </quartz-config>


          WEB-INF/classes/com.baselogic.yoursos.scheduler.jobs.AlertSenderJob:

          package com.baselogic.yoursos.scheduler.jobs;

          import org.apache.commons.logging.Log;
          import org.apache.commons.logging.LogFactory;

          import org.quartz.JobExecutionContext;
          import org.quartz.JobExecutionException;
          import org.quartz.Job;

          import org.apache.commons.logging.Log;
          import org.apache.commons.logging.LogFactory;


          /**
          * Class AlertSenderJob
          *
          * @author Mick Knutson
          */
          public class AlertSenderJob implements Job
          {
          /** The Log instance for this application. */
          private Log log = LogFactory.getLog( getClass().getName() );

          /**
          * Constructor AlertSenderJob
          *
          *
          */
          public AlertSenderJob()
          {
          log.info( "initialize AlertSenderJob" );
          }

          /**
          * Method execute
          *
          * @param jobExecCtx
          * @throws org.quartz.JobExecutionException
          */
          public void execute( JobExecutionContext jobExecCtx )
          throws org.quartz.JobExecutionException
          {
          log.info( "Executing AlertSenderJob. This is the only operation this
          job performs." );
          }

          }


          • 2. Re: Error using QuartzPlugIn with JBoss 3.0.7
            Jon Barnett Master

            Not sure about the exact problem but have you tried putting the struts and associated struts libraries in the server/default/lib or whatever run-time instance of JBoss you are using? Also, just check there aren't any existing copies of the commons libraries already distributed with JBoss. These commons libraries are necessary, but using the standard classloader configuration, the JBoss ones will have precedence for Java 2 compliant classloading.

            • 3. Re: Error using QuartzPlugIn with JBoss 3.0.7
              Mick Knutson Newbie

              I tried to move all the libs into that DIR, but that did not help. I still get the NPE.
              This is very strange, as there are others on the Struts group using this and not having an issue.

              The only difference I seem to be having, is the Ear/WAR/JAr packaging.