Thanks for your help, and for the link to the "external-config.html" section. I am having a great deal of difficulty discerning what is relevant to my situation from this document!
I hope to use the same jar for my home/test Ubuntu OS and my remote server Ubuntu OS. I thought that by providing that absolute address via an environment variable I'd be able to locate the .jar and database in appropriate but different locations for the two system. If there is another, more appropriate way to do this...?
"environment of the service process is not the same as environment of your user"
The environment variable "PATH_TO_SHIFTSTARTSDB" is set in
/env/environment. This makes the variable visible for the entire system, yes? If so, the environment of the user should not matter, correct?
FWIW here is the
shiftstarts.service file. I probably should have posted it from the start of this thread.
[Unit]
Description=Service ShiftStartsUPS
After=syslog.target
[Service]
ExecStart=/usr/lib/jvm/java-17-openjdk-amd64/bin/java -jar /var/lib/shiftstarts-ups/shiftstarts-0.0.1.jar
SuccessExitStatus=143
User=phil
[Install]
WantedBy=multi-user.target
### End of file ###
And what is most puzzling to me, if I simply manually type in the java -jar command that is in the ExecStart, I don't get the error. The program runs as designed. In fact, one can see the point where the environment variable is expanded:
... com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Starting...
... com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection conn0: url=jdbc:h2:file:/var/lib/shiftstarts-ups/StartTimeDB user=UPSER
In the journalctl for the failed run, we have the following:
... com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Starting...
... o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 90011, SQLState: 90011
... o.h.engine.jdbc.spi.SqlExceptionHelper : A file path that is implicitly relative ... etc.
I will next see if I can locate documentation about "HikariPool".