0

I have a problem with an application war, the application was not made by me, the application works, but when import to eclipse and export with attaching tomcat and java libraries 1.8.0_321, it does not work, I do not change anything in the application, such as import, export, the error is the following:

INFO main org.quartz.impl.StdSchedulerFactory - Using default implementation for ThreadExecutor ERROR main org.quartz.impl.StdSchedulerFactory - Couldn't generate instance Id! org.quartz.SchedulerException: No value for 'org.quartz.scheduler.instanceId' system property found, please configure your environment accordingly!

attached systemprops.jsp:

<div id="page" style="float:left;position:relative;left:60px; top:10px;font-size:1.0em;font-weight: 300; font-family:Helvetica, Arial, sans-serif;">
    <div id="javasys">

        <%
            out.println("<table width=600 border=0>");
            out.println("<tr>");
            out.println("<td width=150><b>PROPERTY</b></td>");
            out.println("<td width=450><b>VALUE</b></td>");
            out.println("</tr>");
            out.println("<tr>");
            Properties props = System.getProperties();
            Enumeration as = props.propertyNames();
            while (as.hasMoreElements()) {
                Object o = as.nextElement();
                String key = (String) o;
                out.println("<td width=150><b>" + key + "</b></td>");
                String val = props.getProperty(key);
                StringTokenizer st = new StringTokenizer(val, ":");
                out.println("<td width=450>");
                while (st.hasMoreTokens()) {
                    String valind = st.nextToken();
                    out.println(valind + "<BR>");
                }
                out.println("</td>");
                out.println("</tr>");
            }
            out.println("</table>");
        %>

    </div>

I'm not a programmer, but I think it can come from here: Enumeration as = props.propertyNames();

in eclipse it has a warning in Enumeration as = props.propertyNames(); with Enumeration is a raw type, References to generic type Enumeration should be parameterized, It is not the only part of the code that I have this error

4
  • This piece of code that you've shown seems to be just listing the current system properties on the web page. It's not what is causing the error. Are you sure the required system property is not missing?
    – k314159
    Commented Jan 20, 2023 at 15:18
  • i have in quartz.properties the org.quartz.scheduler.instanceId =, with one parameter
    – martuo
    Commented Jan 20, 2023 at 15:59
  • You say "with one parameter". Is this parameter "SYS_PROP" by any chance?
    – k314159
    Commented Jan 22, 2023 at 19:10
  • yes, it is that parameter
    – martuo
    Commented Jan 23, 2023 at 20:45

1 Answer 1

0

As the documentation says:

org.quartz.scheduler.instanceId

Can be any string, but must be unique for all schedulers working as if they are the same ‘logical’ Scheduler within a cluster. You may use the value “AUTO” as the instanceId if you wish the Id to be generated for you. Or the value “SYS_PROP” if you want the value to come from the system property “org.quartz.scheduler.instanceId”.

The problem is that in quartz.properties org.quartz.scheduler.instanceId is set to SYS_PROP, but you haven't defined this setting as a system property. This is obvious from the error message you show in your post:

No value for 'org.quartz.scheduler.instanceId' system property found, please configure your environment accordingly!

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.