1

After I used migration tool from apache, to migrate from tomcat 8 to tomcat 10, I have a problem with my job scheduler servlet. The error i get org.quartz.ee.servlet.QuartzInitializerServlet' is not assignable to 'javax.servlet.Servlet,jakarta.servlet.Servlet

My web.xml config:

 <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>true</param-value>
    </init-param>

    <load-on-startup>1</load-on-startup>
</servlet>

Any idea would be helpful.

  • 2
    Does this answer your question? [Servlet 5.0 JAR throws compile error on javax.servlet.\* but Servlet 4.0 JAR does not](https://stackoverflow.com/questions/64387472/servlet-5-0-jar-throws-compile-error-on-javax-servlet-but-servlet-4-0-jar-does). In other words: There is no javax.servlet in Tomcat 10. If you can't use jakarta.servlet, Tomcat 9 is your max version – Olaf Kock Jul 07 '22 at 14:25
  • I'm not sure why this question was closed as a duplicate. The error message is not even present in the referenced question. Although it's related and has good technical explanation, it's not really helpful in resolving this particular issue. – Forketyfork Jul 07 '22 at 15:48
  • @Sergei, i dont know either.. – Vlad Dieaconu Jul 08 '22 at 14:14

1 Answers1

1

Quartz doesn't seem to be compatible with Tomcat 10, you can vote for this issue on GitHub if you need it: https://github.com/quartz-scheduler/quartz/issues/794

Until this is resolved, your only option seems to be staying on Tomcat 9.

The reason is, Tomcat 10 makes a breaking switch from javax to jakarta namespace for Servlet API.

Forketyfork
  • 7,416
  • 1
  • 26
  • 33