This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-10-20
Channels
- # aws-lambda (7)
- # beginners (113)
- # boot (17)
- # cider (4)
- # cljs-dev (4)
- # clojure (65)
- # clojure-greece (3)
- # clojure-italy (7)
- # clojure-russia (10)
- # clojure-spec (37)
- # clojure-uk (20)
- # clojurescript (76)
- # community-development (2)
- # cursive (24)
- # data-science (9)
- # datomic (9)
- # emacs (1)
- # fulcro (2)
- # graphql (11)
- # hoplon (13)
- # juxt (15)
- # leiningen (1)
- # off-topic (36)
- # om (1)
- # onyx (59)
- # parinfer (41)
- # pedestal (7)
- # portkey (60)
- # protorepl (4)
- # re-frame (345)
- # reagent (7)
- # ring-swagger (16)
- # shadow-cljs (121)
- # spacemacs (30)
- # sql (6)
- # uncomplicate (2)
- # unrepl (9)
- # vim (13)
- # yada (2)
I just installed a portkey function via (pk/mount): I get error:
{"errorMessage":"Error loading class portkey.LambdaStub: clojure/lang/IFn","errorType":"java.lang.NoClassDefFoundError"}
my code is:
(defn flatter []
(str "hello world"))
(pk/mount! flatter "/hello")
Is there a wa I can manually inspect the zip/jar that was uploaded ?You can download it on the aws interface
But you won’t learn anything as it’s bytecode
Weird, on the AWs interface, I see a "clj-hello" (which is some other functikn I manually uploaded), but I don' see the "flatter / hello" function.
You sure you are in the right region ?
Not an idiot, this happen ;-)
Do you still mount it from boot ?
Because lambdastub call the handler that aws is waiting for, it should be present
I had some personnal stuff last week so I won’t be able to work on portkey for an other week but even if there are still bugs, your function is working for me
100% sure
Back from US ;-)?
@qqq that’s something that can be upgrade, how to shorten the error-message feedback loop
I downloaded my package (took a while to figure out the GUI). I run:
find . | grep Lambda
./com/amazonaws/services/lambda/runtime/LambdaLogger.class
./portkey/LambdaStub.class
so it appears that portkey/LambdaStub.class indeed is there.find clojure
clojure
clojure/java
clojure/java/api
clojure/java/api/Clojure.class
Hmm, is that supposed to happen ?Have you try to reboot your repl and re-mount it ?
@baptiste-from-paris: same issue; will now see if I can get mount to work via a lein repl
Ok, if it doesn’t pastebin your code and I’ll try
lein repl
nREPL server started on port 40198 on host 127.0.0.1 -
REPL-y 0.3.7, nREPL 0.2.12
Clojure 1.9.0-beta2
OpenJDK 64-Bit Server VM 1.8.0_131-8u131-b11-2ubuntu1.16.04.3-b11
Docs: (doc function-name-here)
(find-doc "part-of-name-here")
Source: (source function-name-here)
Javadoc: (javadoc java-object-or-class-here)
Exit: Control+D or (exit) or (quit)
Results: Stored in vars *1, *2, *3, an exception in *e
user=> (require '[portkey.core :as pk])
WARNING: get-method already refers to: #'clojure.core/get-method in namespace: portkey.aws.apigateway, being replaced by: #'portkey.aws.apigateway/get-method
nil
user=> (defn ltalk [] (str "hello world"))
#'user/ltalk
user=> (pk/mount! ltalk "/hi")
NullPointerException portkey.ouroboros/bytecode (ouroboros.clj:227)
user=> (ltalk)
"hello world"
user=> (pk/mount! ltalk "/")
NullPointerException portkey.ouroboros/bytecode (ouroboros.clj:227)
here is my project.clj:
cat project.clj
(defproject foobar "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url ""}
:dependencies [[org.clojure/clojure "1.9.0-beta2"]
[portkey "0.1.0-SNAPSHOT"] ])
Ok, let me try (and take a break from my bordeaux wine)
Oh nice !
personnaly I rarely have mounting problem, it’s more error once mounted
so it's apparently shaking the tree soo hard clojure function classes are being shaken off
@qqq does not sound satisfying, I think Clojure itself is around 3MB
find lein | grep -i clojure ; echo "==" ; find boot | grep -i clojure
lein/clojure
lein/clojure/java
lein/clojure/java/api
lein/clojure/java/api/Clojure.class
lein/lib/clojure-1.9.0-beta2.jar
==
boot/clojure
boot/clojure/java
boot/clojure/java/api
boot/clojure/java/api/Clojure.class
I downloaded the lein / boot versions.by copying over /lein-version/lib to /boot-version/lib , recreating the zip, and uploading it
@baptiste-from-paris: thanks for the tip on downloading from aws // could not have debugged this without that
Ah gréât !
By the way, I can’t verify right now but I am pretty sure that you can download it with the api
@cgrand @baptiste-from-paris: i realize portkey is open source software with no SLA and the volunterr devs have lives of their own -- is there some hack I can use to get around this in boot? This is on the critical path of my work.