[SOLVED] Quartz.properties missing : "initializing scheduler thorws an exception"

In diving into my logs, I have found a problem that is leading to many other problems.

It is unable to find my quartz.properties file, and so is unable to do anything with the scheduler.

Launching the openHAB runtime...
osgi> 17:49:27.317 ERROR o.o.c.s.i.SchedulerActivator[:42] - initializing scheduler throws exception
org.quartz.SchedulerException: Properties file: './etc/quartz.properties' could not be found.
    at org.quartz.impl.StdSchedulerFactory.initialize(StdSchedulerFactory.java:412)
17:49:31.217 WARN  o.o.c.core.ConfigDispatcher[:305] - Could not check if job exists: Properties file: './etc/quartz.properties' could not be found.
17:49:31.287 INFO  o.o.c.internal.CoreActivator[:61] - openHAB runtime has been started (v1.7.1).
17:49:36.630 ERROR o.o.c.p.i.PersistenceManager[:101] - initializing scheduler throws exception
org.quartz.SchedulerException: Properties file: './etc/quartz.properties' could not be found.
    at org.quartz.impl.StdSchedulerFactory.initialize(StdSchedulerFactory.java:412)

So I went looking for the file myself, and here is what I found:

  • Its location is defined as a command line argument in the OpenHAB launch script, current directory being /usr/share/openhab
  • The file it wants is in /etc/openhab, and on Github it appears that it has been so for many years, having been moved there so that the runtime could find it !
  • ./etc/ is actually a link to /etc/openhab/jetty/etc/, however I am unable to find this folder structure on Github

What confuses me is that the start.sh was recently updated to the 1.7 branch version as I updated my system (using APT method) as it overwrote it and I needed to put back my additional serial ports. So why isn’t it working with the updated version?

I was thinking about just changing the start.sh to point to /etc/openhab, but I don’t want to break things, and am wondering if there is anything else going on here that I need to take care of.

Can anyone shed some light on this?

I figured this problem out… despite not fully understanding how exactly it came to be. I’m guessing my installation is somehow not updating properly, or files from older versions are left behind during upgrade.

So I typically run OpenHAB as a daemon, and this works fine. The property mentioned above is passed to the runtime from the launch script in /etc/init.d/openhab.

However, for debugging purposes, I had stopped the daemon, and restarted it using /usr/share/openhab/start_debug.sh. This script seems to be out of date however, and was passing in this bad quartz.properties file.

My solution has been to only use the daemon/service, and enable/disable debugging mode via the OpenHAB include script, by adding DEBUG=yes in /usr/share/openhab/bin/openhab.in.sh.

Quartz rule errors, the same, but different ? Errors on
’now.plusSeconds’, ‘now.toDateMidnight’, and anything else that seemed quartz related

I am brand new to openhab, so I might have this all wrong. Still trying to get 1.8.2 demo to run error free, on debian 8.

Bringing - org.openhab.binding.astro-1.8.2.jar - into configurations/addons cleared all the errors for me. I found I could also add it to rules, and it worked there, not ‘import’ but just dropping it in. The editor flagged it as an error, but it worked.

I tried to follow along with your suggestion, but I am also too new to linux to fully get it. Not sure I really solved anything, but it is another data point.