Closed jeaye closed 7 years ago
Hi there, sorry - not familiar with Google App Engine so can't make a recommendation offhand.
It looks like nippy is using LZ4Factory to compress, which uses getClassLoader
. Is there a way to use nippy which doesn't compress, or compresses using something which doesn't use getClassLoader
?
It is possible to use different compressors and/or no compression, please see the docs for details.
Not sure if this'll help in your case though assuming it's a compile-time dependency error?
On Aug 30, 2016 00:05, "jeaye" notifications@github.com wrote:
It looks like nippy is using LZ4Factory to compress, which uses
getClassLoader
. Is there a way to use nippy which doesn't compress, or compresses using something which doesn't usegetClassLoader
?— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ptaoussanis/nippy/issues/85#issuecomment-243186458, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJxC2T8RVHnPFKidxv76ibAK04vbY0Hks5qkxFTgaJpZM4JvC8v .
Not sure if this'll help in your case though assuming it's a compile-time dependency error?
No, this is a run-time error which happens when I try to freeze data using nippy's default configuration. Google App Engine prevents the usage of getClassLoader
, among other things, at run-time. Disabling compression would likely do the trick.
Great, then disabling compression should do the trick.
On Aug 30, 2016 10:33, "jeaye" notifications@github.com wrote:
Not sure if this'll help in your case though assuming it's a compile-time dependency error?
No, this is a run-time error which happens when I try to freeze data using nippy's default configuration. Google App Engine prevents the usage of
getClassLoader
, among other things, at run-time. Disabling compression would likely do the trick.— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ptaoussanis/nippy/issues/85#issuecomment-243323634, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJxCxdS5skEwVCUs698VQzony1wnA0Wks5qk6R4gaJpZM4JvC8v .
Bah, after further inspection this happens on load, at run-time, because of this: https://github.com/ptaoussanis/nippy/blob/master/src/taoensso/nippy/compression.clj#L101 Even if I don't enable encryption or compression, this def is evaluated on load. Ideally, there's a compile-time flag for this or the LZ4Factory isn't created until it's needed.
Can you see a way in which you'd be willing to support this?
Happy to consider a PR, otherwise will need a few weeks to be able to look at this myself.
First step will be confirming that this is the only thing stopping use on GAE.
Cheers
On Aug 30, 2016 11:37 AM, "jeaye" notifications@github.com wrote:
Bah, after further inspection this happens on load, at run-time, because of this: https://github.com/ptaoussanis/nippy/blob/master/ src/taoensso/nippy/compression.clj#L101 Even if I don't enable encryption or compression, this def is evaluated on load. Ideally, there's a compile-time flag for this or the LZ4Factory isn't created until it's needed.
Can you see a way in which you'd be willing to support this?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ptaoussanis/nippy/issues/85#issuecomment-243330931, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJxC1mGyTZ3yMfhPhny8s7tZAv3Va3gks5qk7OYgaJpZM4JvC8v .
Just wrapping this global in a c.c/delay should fix that, no?
Should do, just have my hands full with other priorities atm- PR welcome with confirmation that that's the only sticking issue for GAE.
On Tue, Aug 30, 2016 at 03:05:06AM -0700, Max Penet wrote:
Just wrapping this global in a c.c/delay should fix that, no?
delay does the trick, for sure; that, combined with some workarounds for tufte and I'm running on GAE now. I'll follow up with a PR.
Fix merged, thanks.
Can we get a new version of this on clojars so I can stop using my fork? Thanks very much. 🙇
Sure, just pushed [com.taoensso/nippy "2.12.3-alpha1"]
to Clojars.
Thanks!
No problem :-)
getClassLoader
is apparently not allowed on Google App Engine, where I'd love to run nippy to interface with my datastore. Unfortunately, I get run-time permission errors along the lines of:Thanks for the awesome Clojure projects.