Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

s3 example from the README throws Execution error (IllegalStateException) #474

Open
mikan-sour opened this issue May 14, 2023 · 0 comments

Comments

@mikan-sour
Copy link

mikan-sour commented May 14, 2023

Hi there,
I'm following the example you made in the README for S3 - I'm just trying to put a file.

When I run my webserver, it throws the below error:

Execution error (IllegalStateException) at roller-ball.storage.s3-ops/eval4652$loading (s3_ops.clj:1).
download already refers to: #'amazonica.aws.s3/download in namespace: roller-ball.storage.s3-ops

I don't have any functions called "download" in my app. The source code is here. The specific file where I use the amazonica lib is here. I ran below grep from the root of the project and confirmed no output, so I don't understand where the error is coming from

grep -r "download" .

Thank you in advance!

h2. Additional info
When I remove the [amazonica.aws.s3transfer] from the

(:use [amazonica.aws.s3]
[amazonica.aws.s3transfer])

the app runs, but then I get a java.lang.ClassNotFoundException exception - I guess thats required. All that said, I can't seem to find any function called put-object in the repo, whether in s3 or s3transfer... I'm kinda new to clojure and jvm languages in general, so apologies if this is a basic thing I'm not getting.

h2. Additional output

{:clojure.main/message
"Execution error (IllegalStateException) at roller-ball.storage.s3-ops/eval4652$loading (s3_ops.clj:1).\ndownload already refers to: #'amazonica.aws.s3/download in namespace: roller-ball.storage.s3-ops\n",
:clojure.main/triage
{:clojure.error/class java.lang.IllegalStateException,
:clojure.error/line 1,
:clojure.error/cause
"download already refers to: #'amazonica.aws.s3/download in namespace: roller-ball.storage.s3-ops",
:clojure.error/symbol roller-ball.storage.s3-ops/eval4652$loading,
:clojure.error/source "s3_ops.clj",
:clojure.error/phase :execution},
:clojure.main/trace
{:via
[{:type clojure.lang.Compiler$CompilerException,
:message
"Syntax error macroexpanding at (roller_ball/storage/s3_ops.clj:1:1).",
:data
{:clojure.error/phase :execution,
:clojure.error/line 1,
:clojure.error/column 1,
:clojure.error/source "roller_ball/storage/s3_ops.clj"},
:at [clojure.lang.Compiler load "Compiler.java" 7665]}
{:type java.lang.IllegalStateException,
:message
"download already refers to: #'amazonica.aws.s3/download in namespace: roller-ball.storage.s3-ops",
:at
[clojure.lang.Namespace warnOrFailOnReplace "Namespace.java" 88]}],
:trace
[[clojure.lang.Namespace warnOrFailOnReplace "Namespace.java" 88]
[clojure.lang.Namespace reference "Namespace.java" 110]
[clojure.lang.Namespace refer "Namespace.java" 168]
[clojure.core$refer invokeStatic "core.clj" 4253]
[clojure.core$refer doInvoke "core.clj" 4218]
[clojure.lang.RestFn invoke "RestFn.java" 410]
[clojure.lang.AFn applyToHelper "AFn.java" 154]
[clojure.lang.RestFn applyTo "RestFn.java" 132]
[clojure.core$apply invokeStatic "core.clj" 669]
[clojure.core$load_lib invokeStatic "core.clj" 5997]
[clojure.core$load_lib doInvoke "core.clj" 5953]
[clojure.lang.RestFn applyTo "RestFn.java" 142]
[clojure.core$apply invokeStatic "core.clj" 669]
[clojure.core$load_libs invokeStatic "core.clj" 6016]
[clojure.core$load_libs doInvoke "core.clj" 6000]
[clojure.lang.RestFn applyTo "RestFn.java" 137]
[clojure.core$apply invokeStatic "core.clj" 671]
[clojure.core$use invokeStatic "core.clj" 6128]
[clojure.core$use doInvoke "core.clj" 6128]
[clojure.lang.RestFn invoke "RestFn.java" 421]
[roller_ball.storage.s3_ops$eval4652$loading__6789__auto____4653
invoke
"s3_ops.clj"
1]
[roller_ball.storage.s3_ops$eval4652 invokeStatic "s3_ops.clj" 1]
[roller_ball.storage.s3_ops$eval4652 invoke "s3_ops.clj" 1]
[clojure.lang.Compiler eval "Compiler.java" 7194]
[clojure.lang.Compiler eval "Compiler.java" 7183]
[clojure.lang.Compiler load "Compiler.java" 7653]
[clojure.lang.RT loadResourceScript "RT.java" 381]
[clojure.lang.RT loadResourceScript "RT.java" 372]
[clojure.lang.RT load "RT.java" 459]
[clojure.lang.RT load "RT.java" 424]
[clojure.core$load$fn__6908 invoke "core.clj" 6161]
[clojure.core$load invokeStatic "core.clj" 6160]
[clojure.core$load doInvoke "core.clj" 6144]
[clojure.lang.RestFn invoke "RestFn.java" 408]
[clojure.core$load_one invokeStatic "core.clj" 5933]
[clojure.core$load_one invoke "core.clj" 5928]
[clojure.core$load_lib$fn__6850 invoke "core.clj" 5975]
[clojure.core$load_lib invokeStatic "core.clj" 5974]
[clojure.core$load_lib doInvoke "core.clj" 5953]
[clojure.lang.RestFn applyTo "RestFn.java" 142]
[clojure.core$apply invokeStatic "core.clj" 669]
[clojure.core$load_libs invokeStatic "core.clj" 6016]
[clojure.core$load_libs doInvoke "core.clj" 6000]
[clojure.lang.RestFn applyTo "RestFn.java" 137]
[clojure.core$apply invokeStatic "core.clj" 669]
[clojure.core$require invokeStatic "core.clj" 6038]
[clojure.core$require doInvoke "core.clj" 6038]
[clojure.lang.RestFn invoke "RestFn.java" 408]
[roller_ball.api.POST_upload_object$eval4646$loading__6789__auto____4647
invoke
"POST_upload_object.clj"
1]
[roller_ball.api.POST_upload_object$eval4646
invokeStatic
"POST_upload_object.clj"
1]
[roller_ball.api.POST_upload_object$eval4646
invoke
"POST_upload_object.clj"
1]
[clojure.lang.Compiler eval "Compiler.java" 7194]
[clojure.lang.Compiler eval "Compiler.java" 7183]
[clojure.lang.Compiler load "Compiler.java" 7653]
[clojure.lang.RT loadResourceScript "RT.java" 381]
[clojure.lang.RT loadResourceScript "RT.java" 372]
[clojure.lang.RT load "RT.java" 459]
[clojure.lang.RT load "RT.java" 424]
[clojure.core$load$fn__6908 invoke "core.clj" 6161]
[clojure.core$load invokeStatic "core.clj" 6160]
[clojure.core$load doInvoke "core.clj" 6144]
[clojure.lang.RestFn invoke "RestFn.java" 408]
[clojure.core$load_one invokeStatic "core.clj" 5933]
[clojure.core$load_one invoke "core.clj" 5928]
[clojure.core$load_lib$fn__6850 invoke "core.clj" 5975]
[clojure.core$load_lib invokeStatic "core.clj" 5974]
[clojure.core$load_lib doInvoke "core.clj" 5953]
[clojure.lang.RestFn applyTo "RestFn.java" 142]
[clojure.core$apply invokeStatic "core.clj" 669]
[clojure.core$load_libs invokeStatic "core.clj" 6016]
[clojure.core$load_libs doInvoke "core.clj" 6000]
[clojure.lang.RestFn applyTo "RestFn.java" 137]
[clojure.core$apply invokeStatic "core.clj" 669]
[clojure.core$require invokeStatic "core.clj" 6038]
[clojure.core$require doInvoke "core.clj" 6038]
[clojure.lang.RestFn invoke "RestFn.java" 408]
[roller_ball.api.router$eval2756$loading__6789__auto____2757
invoke
"router.clj"
1]
[roller_ball.api.router$eval2756 invokeStatic "router.clj" 1]
[roller_ball.api.router$eval2756 invoke "router.clj" 1]
[clojure.lang.Compiler eval "Compiler.java" 7194]
[clojure.lang.Compiler eval "Compiler.java" 7183]
[clojure.lang.Compiler load "Compiler.java" 7653]
[clojure.lang.RT loadResourceScript "RT.java" 381]
[clojure.lang.RT loadResourceScript "RT.java" 372]
[clojure.lang.RT load "RT.java" 459]
[clojure.lang.RT load "RT.java" 424]
[clojure.core$load$fn__6908 invoke "core.clj" 6161]
[clojure.core$load invokeStatic "core.clj" 6160]
[clojure.core$load doInvoke "core.clj" 6144]
[clojure.lang.RestFn invoke "RestFn.java" 408]
[clojure.core$load_one invokeStatic "core.clj" 5933]
[clojure.core$load_one invoke "core.clj" 5928]
[clojure.core$load_lib$fn__6850 invoke "core.clj" 5975]
[clojure.core$load_lib invokeStatic "core.clj" 5974]
[clojure.core$load_lib doInvoke "core.clj" 5953]
[clojure.lang.RestFn applyTo "RestFn.java" 142]
[clojure.core$apply invokeStatic "core.clj" 669]
[clojure.core$load_libs invokeStatic "core.clj" 6016]
[clojure.core$load_libs doInvoke "core.clj" 6000]
[clojure.lang.RestFn applyTo "RestFn.java" 137]
[clojure.core$apply invokeStatic "core.clj" 669]
[clojure.core$require invokeStatic "core.clj" 6038]
[clojure.core$require doInvoke "core.clj" 6038]
[clojure.lang.RestFn invoke "RestFn.java" 408]
[roller_ball.core$eval157$loading__6789__auto____158
invoke
"core.clj"
1]
[roller_ball.core$eval157 invokeStatic "core.clj" 1]
[roller_ball.core$eval157 invoke "core.clj" 1]
[clojure.lang.Compiler eval "Compiler.java" 7194]
[clojure.lang.Compiler eval "Compiler.java" 7183]
[clojure.lang.Compiler load "Compiler.java" 7653]
[clojure.lang.RT loadResourceScript "RT.java" 381]
[clojure.lang.RT loadResourceScript "RT.java" 372]
[clojure.lang.RT load "RT.java" 459]
[clojure.lang.RT load "RT.java" 424]
[clojure.core$load$fn__6908 invoke "core.clj" 6161]
[clojure.core$load invokeStatic "core.clj" 6160]
[clojure.core$load doInvoke "core.clj" 6144]
[clojure.lang.RestFn invoke "RestFn.java" 408]
[clojure.core$load_one invokeStatic "core.clj" 5933]
[clojure.core$load_one invoke "core.clj" 5928]
[clojure.core$load_lib$fn__6850 invoke "core.clj" 5975]
[clojure.core$load_lib invokeStatic "core.clj" 5974]
[clojure.core$load_lib doInvoke "core.clj" 5953]
[clojure.lang.RestFn applyTo "RestFn.java" 142]
[clojure.core$apply invokeStatic "core.clj" 669]
[clojure.core$load_libs invokeStatic "core.clj" 6016]
[clojure.core$load_libs doInvoke "core.clj" 6000]
[clojure.lang.RestFn applyTo "RestFn.java" 137]
[clojure.core$apply invokeStatic "core.clj" 669]
[clojure.core$require invokeStatic "core.clj" 6038]
[clojure.core$require doInvoke "core.clj" 6038]
[clojure.lang.RestFn invoke "RestFn.java" 408]
[user$eval140$fn__144 invoke "form-init2272812208049848090.clj" 1]
[user$eval140 invokeStatic "form-init2272812208049848090.clj" 1]
[user$eval140 invoke "form-init2272812208049848090.clj" 1]
[clojure.lang.Compiler eval "Compiler.java" 7194]
[clojure.lang.Compiler eval "Compiler.java" 7184]
[clojure.lang.Compiler load "Compiler.java" 7653]
[clojure.lang.Compiler loadFile "Compiler.java" 7591]
[clojure.main$load_script invokeStatic "main.clj" 475]
[clojure.main$init_opt invokeStatic "main.clj" 477]
[clojure.main$init_opt invoke "main.clj" 477]
[clojure.main$initialize invokeStatic "main.clj" 508]
[clojure.main$null_opt invokeStatic "main.clj" 542]
[clojure.main$null_opt invoke "main.clj" 539]
[clojure.main$main invokeStatic "main.clj" 664]
[clojure.main$main doInvoke "main.clj" 616]
[clojure.lang.RestFn applyTo "RestFn.java" 137]
[clojure.lang.Var applyTo "Var.java" 705]
[clojure.main main "main.java" 40]],
:cause
"download already refers to: #'amazonica.aws.s3/download in namespace: roller-ball.storage.s3-ops",
:phase :execution}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant