Closed fredkingham closed 1 year ago
I receive exactly the same error message when attempting to test connection of White Rabbit to a postgreSQL database using MacOS MacOS version: 12.5 Chip: Apple M1 Pro Java version: Java 8 update 341 PostgreSQL version: 14.4 White Rabbit version: v0.10-2.7
Hi @fredkingham , @KeithWTomlin ,
I have looked into this, and unfortunately I cannot offer a quick solution. There are two things that stand out with this issue:
While I cannot offer a solution right now, maybe this information can help you to solve the problem, or obtain more information about the cause.
Is there any solution yet to connect White Rabbit with Postgres with a Macbook M1 machine?
When the problem was originally reported, we tested on an M1, and could not reproduce your issue, but that test was very likely not with Java 8 (probably with version 11 or 17)
We tested this again with an M1, but only with Java version 17. This way, we cannot reproduce the problem. As far as we know Java 8 for M1 runs in intel compatibility mode, so our first advice is to test with Java 11 or 17, if possible.
If you have no other option than Java 8, we can see if we can test that, but that will take some time, as we do not immediately have an M1 available where we are free to install Java 8. So if you could first test with 11 or 17, that would be great.
Other than the possible issue with the Java version on M1 macs: the reported stack trace (image) does suggest to us that somehow your Java installation has been configured to load the UcanAccessDriver class, as this is definitely not the default behaviour of WhiteRabbit. We aim to build a test version of WhiteRabbit that will log some extra info while loading the driver classes.
I have added a release marked v0.10.7a that logs a line to the console window when the system property 'jdbc.drivers' was set before trying to connect to the database (see the screen shot below for an example). Could you test the issue with this version and report any lines from the console window that look like the one in the example?
@fredkingham @KeithWTomlin have you been able to test with v0.10.7a, or otherwise been successful with resolving this issue?
While working on another issue I could finally reproduce this problem (on Linux/Ubuntu, using java 1.8). While I have not been able to determine exactly why an attempt is made to load the ucanaccess driver, resulting in the error mentioned, I could test and confirm 2 possible workarounds:
Describe the bug Unable to connect to a postgres (11.16) on a with java 1.8 using white rabbit v0.10.7
Whether running scan tables or test connection the error is the same
To Reproduce Steps to reproduce the behavior:
brew install postgresql@11
psql -c "CREATE DATABASE test
Expected behavior A successful connection to the database
Screenshots
Desktop (please complete the following information): Mac (OS X 12.0.1)