datomic / ion-starter Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
Sorry! I know this repo doesn't represent Ion itself, but I couldn't find any other issue tracker.
I have a Datomic Ion project that depends on Cheshire (and therefore Jackson). When I deploy my Ions and try to run them, I get the following exception:
{
"Msg": "Uncaught Exception: java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/async/ByteArrayFeeder, compiling:(cheshire/factory.clj:53:11)",
"Ex": {
"Cause": "com.fasterxml.jackson.core.async.ByteArrayFeeder",
"Via": [
{
"Type": "clojure.lang.Compiler$CompilerException",
"Message": "java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/async/ByteArrayFeeder, compiling:(cheshire/factory.clj:53:11)",
"At": [
"clojure.lang.Compiler",
"analyzeSeq",
"Compiler.java",
7010
]
},
{
"Type": "java.lang.NoClassDefFoundError",
"Message": "com/fasterxml/jackson/core/async/ByteArrayFeeder",
"At": [
"java.lang.ClassLoader",
"defineClass1",
"ClassLoader.java",
-2
]
},
{
"Type": "java.lang.ClassNotFoundException",
"Message": "com.fasterxml.jackson.core.async.ByteArrayFeeder",
"At": [
"java.net.URLClassLoader",
"findClass",
"URLClassLoader.java",
381
]
}
],
"Trace": [
[
"java.net.URLClassLoader",
"findClass",
"URLClassLoader.java",
381
],
[...]
]
},
"Type": "Alert",
"Tid": 53,
"Timestamp": 1530657546639
}
To reproduce this error, I forked ion-starter and switched out the org.clojure/data.json dependency for cheshire. You can find it here. After deploying, running the following invoke command from the tutorial will yield an exception complaining that the "cheshire.factory" namespace wasn't found.
aws lambda invoke --function-name $(GROUP)-add-item --payload '["SKU-12345", "small", "red", "hat"]' /dev/stdout
If you dig into the logs, you'll find my earlier exception occurs first.
com.fasterxml.jackson.core.async.ByteArrayFeeder
was introduced in Jackson 2.9 which leads me to believe that the Datomic Cloud node has already loaded an older version on jackson-core.
My current work-around is to pin the versions of com.fasterxml.jackson.core/jackson-core
, com.fasterxml.jackson.dataformat/jackson-dataformat-smile
, and com.fasterxml.jackson.dataformat/jackson-dataformat-cbor
to "2.8.11". I'd prefer not to downgrade transitive dependencies, but it seems to work for now.
Allowing users to change the versions of dependencies that the Datomic Node uses is probably off the table. However, I would at least like to have a list of the Datomic Node's dependencies documented somewhere in order to avoid running into this issue in the future.
Again, sorry for the noise in this repository; let me know if there's somewhere else I should post this!
Following the tutorial but can't get past the deploy step.
Any ideas why this might be happening?
https://gist.github.com/brancusi/86779e50607baf44a4295ed52376cb10
Thanks for putting the tutorial together
https://github.com/Datomic/ion-starter/blob/master/examples/.clojure/deps.edn has unbalanced braces.
I assume the intention was to have :mvn/repos
at the top level, like so:
{:aliases
{:ion-dev
{:deps {com.datomic/ion-dev {:mvn/version "0.9.243"}}
:main-opts ["-m" "datomic.ion.dev"]}}
:mvn/repos {"datomic-cloud" {:url "s3://datomic-releases-1fc2183a/maven/releases"}}}
Status:
clojure -A:dev -m datomic.ion.dev '{:op :deploy-status :execution-arn arn:aws:states:us-east-2:101416954809:execution:datomic-dev-Compute-784GREJAJTLX:dev-Compute-784GREJAJTLX-bd6deb15afeee59dd2dd16943cf3c0313f534c34-1565755664290}'
{:deploy-status "FAILED", :code-deploy-status "FAILED"}
Logs:
START RequestId: a012efad-3c01-4a75-8b08-615978c5f177 Version: $LATEST
2019-08-14T04:11:53.124Z a012efad-3c01-4a75-8b08-615978c5f177 { event:
{ codeDeploy: { deployment: [Object] },
lambda: { cI: 4, c: [Array], uI: -1, u: [], dI: -1, d: [], common: [Object] } } }
END RequestId: a012efad-3c01-4a75-8b08-615978c5f177
Error Message:
{...
"status": "Failed",
"errorInformation": {
"code": "HEALTH_CONSTRAINTS",
"message": "The overall deployment failed because too many individual instances failed deployment, too few healthy instances are available for deployment, or some instances in your deployment group are experiencing problems."
}
}
How should I troubleshoot this?
It would be nice to start with a quick example for structured tests with code that interacts with Datomic Cloud.
datomic/q
, datomic/pull
datomic/transact
Related discussion: https://forum.datomic.com/t/unit-testing/879
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.