-
Notifications
You must be signed in to change notification settings - Fork 11
datomic pro uberjar error #6
Comments
There was mention of ~/.m2/settings.xml, but I haven't added any credentials there yet. Might that be my problem? |
That seems like we misconfigured something on our end. The pro build still isn't tested yet. We'll get to that eventually as we also need it. Since you're using pro I'm guessing you're using this professionally. Can I ask what company this is for? |
This is for www.homebay.com and we have a larger Datomic instance backed by Dynamo. |
I managed to spoof the issue above by populating my
I've verified I'm able to access the instance from my machine so I don't think security perms are an issue. Seems to be some ddb related class loader issue? Has anyone successfully connected to a pro Datomic out on AWS? Note: I can connect to a local Datomic instance using the same jar and see some data so that's promising! |
The fact that it's not finding the ddb classes probably means it's not actually using the pro library. You could try this as a hack/workaround
|
Ah, interesting. Ok, I'll keep poking at it. Thanks! |
I re-ran metabase with the following command: Still seeing the same classpath issue. The result of the find command is:
Also I had previously modified
Here's the result of a lein build:
Anything else seem amiss? |
I am using a pretty new version of the pro jar, maybe an older one would have the correct function? i.e. I'll try |
I reverted the change to The plugin was rebuilt with lein and copied to Not sure how to proceed. |
Maybe this is useful, but the uberjar seems to have the datomic classes baked, so maybe there's some other classloader issue going on?
The output matches what I see in the datomic-pro jar in ~/.m2:
|
A short update here, we've also ran into various issues, the approach as documented creates an uberjar which includes metabase and its dependencies, all of them AOT compiled, which seems to mess things up. And on top of that it seems that the way Metabase's plugin mechanism modifies the classpath isn't good to enough for it to find and load the datomic classes in the uberjar. Instead the best approach I've come up so far has been:
You need the slf4j exclusions or slf4j will complain and refuse to start. |
Well, this workaround is definitely not working. Is this project even alive still? |
PR welcome @zilti. Sorry not sorry that people who gave you something for free are not doing more work for free to cater to your every need. (Yes, this project is still "alive", whatever that means, I'll be pushing compatibility for the latest datomic soon) |
Apologies for closing this abruptly, for an overburdened open source maintainer it's easy to hit a sore spot. I'll improve the docs on this, what we are doing at the moment is patching project.clj to add datomic-pro in a profile, as well as putting the driver source on the classpath. We then use our own main function to start metabase and initialize the driver. This last bit is not necessary if you compile the driver with datomic-pro and put the jar on the classpath so metabase's plugin mechanism loads it, but I find it more reliable to bypass that plugin mechanism and to initialize the driver manually. It prevents issues with the driver being aot compiled against wrong dependencies (like the wrong datomic), and makes it easier when actually working on the driver. See In project.clj
|
Sorry as well. I didn't mean to come across rude. I actually got it to work with the Metabase version referred in the Dockerfile (v0.32.8), with datomic-pro. The issue with newer Metabase versions seem to be, among others, that the util.date namespace got replaced. (Seems like for whatever reason it is pretty much unusable for my Datomic structure, but I haven't quite figured out yet why. It seems it doesn't correctly handle to-many relationships in my case. But that is another issue.) |
Yeah, we're pinning to that version for now. IIRC there's also a big change in how metabase handles joins, and probably other stuff. They have zero interest in offering a stable API for drivers so upgrading is a PITA. I think eventually we will but it's not a priority for my client at the moment. |
@zilti hello, could you please share the Dockerfile with the working changes? 🙏 |
Probably related to #3, but I'm hitting the following error trying to build an uberjar for datomic pro
The text was updated successfully, but these errors were encountered: