Hi,

I have a web application that allows users to schedule a group of Emails to be sent out. I am using Quartz to do this. I've set up the quartz.properties file, coded all the back end java business logic, but I believe to get this to work on a web application, I need to start the quartz service as a Servlet with my application.

I copied the xml to put into my web.xml file straight from the API (as told to by various tutorials):
http://www.opensymphony.com/quartz/api/org/quartz/ee/servlet/QuartzInitializerServlet.html

I am using Glassfish Sun Application Server 9.1 and Netbeans 6.5 to deploy. This is the error I am getting:

Exception occured in J2EEC Phaseorg.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'display-name'. One of '"http://java.sun.com/xml/ns/javaee":servlet-class, "http://java.sun.com/xml/ns/javaee":jsp-file' is expected.
com.sun.enterprise.deployment.backend.IASDeploymentException: Error loading deployment descriptors for module [SMSScheduler] Line 60 Column 24 -- Deployment descriptor file WEB-INF/web.xml in archive [web]. cvc-complex-type.2.4.a: Invalid content was found starting with element 'display-name'. One of '"http://java.sun.com/xml/ns/javaee":servlet-class, "http://java.sun.com/xml/ns/javaee":jsp-file' is expected.

Here is the code in the web.xml file as it should be:

<servlet>
     <servlet-name>QuartzInitializer</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>
     <init-param>
         <param-name>config-file</param-name>
         <param-value>quartz.properties</param-value>
     </init-param>
     <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>true</param-value>
     </init-param>
</servlet>

Anyone with Quartz experience, please help! I have to get this working real fast!

Thanks in advance,
Jason

It looks like display-name looks for a token and not a string. It's better to remove that element and try re-compile it.
I mean take out the <display-name> attribute itself fro mthe web.xml and recompile

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.