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

Upgraded Clojure to 1.8 and now I see this java.lang.NoClassDefFoundError for HeaderMap #335

Closed
JMacLulich opened this Issue Oct 5, 2016 · 9 comments

Comments

Projects
None yet
4 participants
@JMacLulich

JMacLulich commented Oct 5, 2016

Hi Guys,

I'm trying to figure out what the has caused this error to appear in my project after bumping up the version of Clojure from 1.7 to 1.8 in my project.

I now get this error whenever I try and require the clj-http package.

Caused by: java.lang.NoClassDefFoundError: IllegalName: compile__stub.clj_http.headers.clj-http.headers/HeaderMap

I think its got something to do with interactions with clj-oauth or some other OAuth library I'm using that is importing an older version of clj-http. clj-oauth for instance includes clj-http v2.0.2.

Has anyone seen this error before when updating their version of Clojure?

Thanks, Jason.

@JMacLulich

This comment has been minimized.

Show comment
Hide comment
@JMacLulich

JMacLulich Oct 6, 2016

Just to expand on the error above, I get this:

1. Caused by java.lang.NoClassDefFoundError
   IllegalName:
   compile__stub.clj_http.headers.clj-http.headers/HeaderMap

JMacLulich commented Oct 6, 2016

Just to expand on the error above, I get this:

1. Caused by java.lang.NoClassDefFoundError
   IllegalName:
   compile__stub.clj_http.headers.clj-http.headers/HeaderMap
@dakrone

This comment has been minimized.

Show comment
Hide comment
@dakrone

dakrone Oct 13, 2016

Owner

Sounds like it might be something that causing bad dependencies? What does lein deps :tree spit out?

Owner

dakrone commented Oct 13, 2016

Sounds like it might be something that causing bad dependencies? What does lein deps :tree spit out?

@s4s0l

This comment has been minimized.

Show comment
Hide comment
@s4s0l

s4s0l Feb 15, 2017

Same for me, using gradle not lein but effect as described above:

+--- org.clojure:clojure:1.8.0
\--- clj-http:clj-http:2.3.0
     +--- org.apache.httpcomponents:httpcore:4.4.5
     +--- org.apache.httpcomponents:httpclient:4.5.2
     |    +--- org.apache.httpcomponents:httpcore:4.4.4 -> 4.4.5
     |    +--- commons-logging:commons-logging:1.2
     |    \--- commons-codec:commons-codec:1.9 -> 1.10
     +--- org.apache.httpcomponents:httpmime:4.5.2
     |    \--- org.apache.httpcomponents:httpclient:4.5.2 (*)
     +--- commons-codec:commons-codec:1.10
     +--- commons-io:commons-io:2.5
     +--- slingshot:slingshot:0.12.2
     \--- potemkin:potemkin:0.4.3
          +--- clj-tuple:clj-tuple:0.2.2
          \--- riddley:riddley:0.1.12

s4s0l commented Feb 15, 2017

Same for me, using gradle not lein but effect as described above:

+--- org.clojure:clojure:1.8.0
\--- clj-http:clj-http:2.3.0
     +--- org.apache.httpcomponents:httpcore:4.4.5
     +--- org.apache.httpcomponents:httpclient:4.5.2
     |    +--- org.apache.httpcomponents:httpcore:4.4.4 -> 4.4.5
     |    +--- commons-logging:commons-logging:1.2
     |    \--- commons-codec:commons-codec:1.9 -> 1.10
     +--- org.apache.httpcomponents:httpmime:4.5.2
     |    \--- org.apache.httpcomponents:httpclient:4.5.2 (*)
     +--- commons-codec:commons-codec:1.10
     +--- commons-io:commons-io:2.5
     +--- slingshot:slingshot:0.12.2
     \--- potemkin:potemkin:0.4.3
          +--- clj-tuple:clj-tuple:0.2.2
          \--- riddley:riddley:0.1.12
@dakrone

This comment has been minimized.

Show comment
Hide comment
@dakrone

dakrone Feb 28, 2018

Owner

For the users still seeing this, do you still see it upon upgrading to clj-http in the 3.x series?

Owner

dakrone commented Feb 28, 2018

For the users still seeing this, do you still see it upon upgrading to clj-http in the 3.x series?

@jiacai2050

This comment has been minimized.

Show comment
Hide comment
@jiacai2050

jiacai2050 May 28, 2018

Contributor

3.9.0 still have this issue

Caused by: java.lang.NoClassDefFoundError: IllegalName: compile__stub.clj_http.headers.clj-http.headers/HeaderMap
	at java.lang.ClassLoader.preDefineClass(ClassLoader.java:654)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:761)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:642)
	at clojure.lang.DynamicClassLoader.defineClass(DynamicClassLoader.java:46)
	at clojure.lang.Compiler$NewInstanceExpr.compileStub(Compiler.java:7903)
	at clojure.lang.Compiler$NewInstanceExpr.build(Compiler.java:7768)
	at clojure.lang.Compiler$NewInstanceExpr$DeftypeParser.parse(Compiler.java:7678)
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:6868)
Contributor

jiacai2050 commented May 28, 2018

3.9.0 still have this issue

Caused by: java.lang.NoClassDefFoundError: IllegalName: compile__stub.clj_http.headers.clj-http.headers/HeaderMap
	at java.lang.ClassLoader.preDefineClass(ClassLoader.java:654)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:761)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:642)
	at clojure.lang.DynamicClassLoader.defineClass(DynamicClassLoader.java:46)
	at clojure.lang.Compiler$NewInstanceExpr.compileStub(Compiler.java:7903)
	at clojure.lang.Compiler$NewInstanceExpr.build(Compiler.java:7768)
	at clojure.lang.Compiler$NewInstanceExpr$DeftypeParser.parse(Compiler.java:7678)
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:6868)
@jiacai2050

This comment has been minimized.

Show comment
Hide comment
@jiacai2050

jiacai2050 May 29, 2018

Contributor

After digging into this issue, I have found the root cause:

Briefly speaking, clojure 1.8's change affect potemkin, and is already fixed in ztellman/potemkin#40.
clj-http(3.9.0) depends on potemkin 0.4.5, which contains the fix, but if your dependencies contains older version of potemkin, then you will probably see this issue.

I'm not sure which is the earliest version contains the fix, but 0.4.5 surely do.

Contributor

jiacai2050 commented May 29, 2018

After digging into this issue, I have found the root cause:

Briefly speaking, clojure 1.8's change affect potemkin, and is already fixed in ztellman/potemkin#40.
clj-http(3.9.0) depends on potemkin 0.4.5, which contains the fix, but if your dependencies contains older version of potemkin, then you will probably see this issue.

I'm not sure which is the earliest version contains the fix, but 0.4.5 surely do.

@JMacLulich

This comment has been minimized.

Show comment
Hide comment
@JMacLulich

JMacLulich May 29, 2018

Thanks for the update guys, I have to admit i did loose track of this ticket after filing it, but appreciate the continued updates over the years.

JMacLulich commented May 29, 2018

Thanks for the update guys, I have to admit i did loose track of this ticket after filing it, but appreciate the continued updates over the years.

@jiacai2050

This comment has been minimized.

Show comment
Hide comment
@jiacai2050

jiacai2050 May 30, 2018

Contributor

@JMacLulich Close now?

Contributor

jiacai2050 commented May 30, 2018

@JMacLulich Close now?

@dakrone

This comment has been minimized.

Show comment
Hide comment
@dakrone

dakrone May 30, 2018

Owner

Sounds like this is resolved, so I'm going to close this for now

Owner

dakrone commented May 30, 2018

Sounds like this is resolved, so I'm going to close this for now

@dakrone dakrone closed this May 30, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment