SQLite relative path doesn't work in windows in ignition 8.1.12

As the following image, the relative path jdbc:sqlite:${data} doesn’t work in ignition 8.1.12.
If I use a direct path it works correctly:
C:\Program Files\Inductive Automation\Ignition\data\projects

I wonder it is only valid for linux?

We definitely tested on other OSes. Your syntax looks correct, but I’ll look into this some more.

1 Like

The wildcard path worked for me. What was happening on your system - the DB connection was faulted? Any errors in the logs?

In my system the DB Connection is faulted and not valid until I change it to static path.

This is the error log for my configuration.
I just want simply access this folder:
C:\Program Files\Inductive Automation\Ignition 8.1.12\data\projects

Hm, you’re sure of the version? Can you start a support ticket? I would expect that path to look different if the substitution was working properly.

Yes, it is 8.1.12 and from 8.1.10 it should have worked correctly.
The only thing I did is when installing ignition I change the default folder name to “C:\Program Files\Inductive Automation\Ignition 8.1.12” because I have several instances of ignition on the same machine.
Did you check it with 8.1.12?
When I put direct path it works OK but both ${local} ${data} get error as you see.

The logic is fairly simple, and would always be used on 8.1.10 and up. I tested on ~8.1.15 in the IDE, but that shouldn’t matter (outside of file permissions, theoretically, but since you’re able to hardcode a path I don’t think it’s relevant here).

From the screenshots, it looks like you meet all these conditions:

                    if (field.equals(DatasourceRecord.ConnectURL)
                        && record.getDriver().getVendor().equals(DatabaseVendor.SQLITE)
                        && val != null && !val.contains(":memory:")) {

Unfortunately, I don’t think there’s any logging to use to confirm what’s happening. I’d start with support at this point.

Can you verify that the version is indeed 8.1.12 on the Status → Overview page? I’m just concerned that the Gateway wasn’t installed / upgraded properly and isn’t on 8.1.10+.

Also, what are the local.dir and the data.dir parameter values within C:\Program Files\Inductive Automation\Ignition 8.1.12\webserver\webapps\main\WEB-INF\web.xml?

Yes it is Version: 8.1.12 (b2021111810)
I just install it from scratch.

web.xml (4.9 KB)

Did you restore from a gateway backup? If so, what version is that backup from?

Can you verify that the SQLite driver type is set to SQLITE within Config -> Drivers?

1 Like

Yes it originally come form 8.1.4 and restore in 8.1.12 and then I try to check for this feature.

The driver type is set to Generic. I change it and now it is working thanks.

So it is because I import it from older version?

I don’t think it’s a problem with the restore or old version, it’s because you had it set to GENERIC instead of SQLITE.

edit: but your screenshot above shows SQLite… maybe that’s not it…

I think a sufficiently old version didn’t have a dedicated translator for SQLite, so you could have a SQLite driver but a ‘generic’ type. That’s the only real problem here. Fresh installs won’t have the issue.

1 Like