Closed aviflax closed 3 years ago
Ah, the runtime is Java 11 (Corretto)
Thanks for reporting this!
I'm not super familiar with Lambda. Are you using a tool to create an uberjar? If so, which tool? Can you reproduce by running the uberjar locally?
The reason I ask is that the error message matches these bugs in various tools:
https://github.com/healthfinch/depstar/issues/10 https://github.com/cursive-ide/gradle-clojure/issues/7 https://github.com/cursive-ide/gradle-clojure/issues/8 https://github.com/ptaoussanis/timbre/issues/254
If you can reproduce locally, I wonder if it's possible to shrink the repro by just using clojure.pprint
directly in your code and invoking it.
Ah, yes, I’m using depstar. I’ll try to reproduce locally. Thanks!
Did you have any luck tracking down a repro for this locally?
@bhb I just spent an hour trying to reproduce, but so far I have been unsuccessful. If you have any suggestions, please share. Thanks!
🤔 I guess the next thing would be to try to run the repro code in an actual Lambda “function” on the actual Lambda service. I don’t have time for that right now… maybe later this week…
In case it helps, I see lambdainternal.CustomerClassLoader
as part of the stacktrace. Perhaps it's worth understanding how that classloader and Clojure's own interact.
As this piqued my curiosity I asked around in #aws-lambda:
You might have luck disabling AOT and/or choosing a specific lambda runtime. Of course that might affect cold starts etc - would depend on the use case.
@aviflax I'm going to close this, since it appears to be an issue with the classloader.
I’m using Expound in an AWS Lambda function to provide useful error messages when the invocation payload is invalid. This works when I test it locally using a vanilla JRE, but fails when running in AWS Lambda.
I don’t understand the error message, so I don’t think I can be any more helpful than just providing it as a bug report and asking: is there something we can do about this?
The error: