When did this start? java.lang.IllegalAccessError cond* does not exist nippy

275 views
Skip to first unread message

Laws

unread,
Feb 7, 2017, 4:31:38 PM2/7/17
to Clojure
Two months ago I could run "lein uberjar" and my project compiled. Then I had to focus on other things for 2 months. Then today I come back to it, change one line of code, and run "lein uberjar". I get:

java.lang.IllegalAccessError: cond* does not exist, compiling:(nippy.clj:1:1)
Exception in thread "main" java.lang.IllegalAccessError: cond* does not exist, compiling:(nippy.clj:1:1)
at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3628)
at clojure.lang.Compiler.compile1(Compiler.java:7323)
at clojure.lang.Compiler.compile1(Compiler.java:7313)
at clojure.lang.Compiler.compile(Compiler.java:7390)
at clojure.lang.RT.compile(RT.java:399)
at clojure.lang.RT.load(RT.java:444)

Uh, what? Did something with Nippy change? Clojars? 


Sean Corfield

unread,
Feb 7, 2017, 4:47:10 PM2/7/17
to Clojure Mailing List

You’ll need to provide a bit more detail than that – what are your project’s dependencies, for example?

 

(if you’re depending on any snapshots or generic “RELEASE” / “LATEST” versions, those could give you different versions)

 

Sean

--

Laws

unread,
Feb 7, 2017, 5:32:36 PM2/7/17
to Clojure
Sorry about that. Here is the whole of my project.clj. It is a fairly small app. 

(defproject csv-to-dynamodb "1.0"
  :description "Takes a Super company import file, of CSV format, and stores the data in DynamoDB, using the company_name as the sharding key"
  :license {:name "Copyright Super 2016"
            :url "http://www.super.com/"}
  :dependencies [
                 [org.clojure/clojure "1.7.0"]
                 [org.clojure/test.check "0.9.0"]
                 [org.clojure/data.json "0.2.6"]
                 [defun "0.3.0-RC1"]
                 [http-kit "2.2.0"]
                 [com.taoensso/timbre "4.3.1"]
                 [dire "0.5.4"]
                 [slingshot "0.12.2"]
                 [me.raynes/fs "1.4.4"]
                 [clj-stacktrace "0.2.7"]                 
                 [overtone/at-at "1.2.0"]
                 [com.taoensso/faraday "1.9.0"]
                 ]
  :disable-implicit-clean true
  :warn-on-reflection true
  :source-paths      ["src/clojure"]
  :java-source-paths ["src/java"]
  :main csv-to-dynamodb.core
  :aot :all
  :jvm-opts ["-Xms50m" "-Xmx50m" "-XX:-UseCompressedOops"])



And this:

lein deps :tree

shows me: 

[com.taoensso/faraday "1.9.0"] -> [com.taoensso/nippy "2.12.0"] -> [com.taoensso/encore "2.67.1"]


The full output: 

lein deps :tree

Possibly confusing dependencies found:

[lein-checkall "0.1.1"] -> [jonase/eastwood "0.0.2"] -> [org.clojure/tools.namespace "0.1.2"]
 overrides
[lein-checkall "0.1.1"] -> [lein-kibit "0.0.8"] -> [jonase/kibit "0.0.8"] -> [org.clojure/tools.namespace "0.2.1"]
 and
[lein-checkall "0.1.1"] -> [lein-bikeshed "0.1.3"] -> [org.clojure/tools.namespace "0.2.3"]

Consider using these exclusions:
[lein-checkall "0.1.1" :exclusions [org.clojure/tools.namespace]]
[lein-checkall "0.1.1" :exclusions [org.clojure/tools.namespace]]

Possibly confusing dependencies found:
[org.clojure/clojure "1.7.0"]
 overrides
[defun "0.3.0-RC1"] -> [org.clojure/clojure "1.8.0"]

Consider using these exclusions:
[defun "0.3.0-RC1" :exclusions [org.clojure/clojure]]

[com.taoensso/timbre "4.3.1"] -> [com.taoensso/encore "2.36.2"]
 overrides
[com.taoensso/faraday "1.9.0"] -> [com.taoensso/nippy "2.12.0"] -> [com.taoensso/encore "2.67.1"]
 and
[com.taoensso/faraday "1.9.0"] -> [com.taoensso/encore "2.67.2"]

Consider using these exclusions:
[com.taoensso/faraday "1.9.0" :exclusions [com.taoensso/encore]]
[com.taoensso/faraday "1.9.0" :exclusions [com.taoensso/encore]]

[com.taoensso/timbre "4.3.1"] -> [com.taoensso/encore "2.36.2"] -> [com.taoensso/truss "1.1.1"]
 overrides
[com.taoensso/faraday "1.9.0"] -> [com.taoensso/nippy "2.12.0"] -> [com.taoensso/encore "2.67.1"] -> [com.taoensso/truss "1.3.3"]
 and
[com.taoensso/faraday "1.9.0"] -> [com.taoensso/encore "2.67.2"] -> [com.taoensso/truss "1.3.3"]

Consider using these exclusions:
[com.taoensso/faraday "1.9.0" :exclusions [com.taoensso/truss]]
[com.taoensso/faraday "1.9.0" :exclusions [com.taoensso/truss]]

[me.raynes/fs "1.4.4"] -> [org.apache.commons/commons-compress "1.4"] -> [org.tukaani/xz "1.0"]
 overrides
[com.taoensso/faraday "1.9.0"] -> [com.taoensso/nippy "2.12.0"] -> [org.tukaani/xz "1.5"]

Consider using these exclusions:
[com.taoensso/faraday "1.9.0" :exclusions [org.tukaani/xz]]

 [clj-stacktrace "0.2.7"]
 [clojure-complete "0.2.4" :exclusions [[org.clojure/clojure]]]
 [com.taoensso/faraday "1.9.0"]
   [com.amazonaws/aws-java-sdk-dynamodb "1.10.49" :exclusions [[joda-time]]]
     [com.amazonaws/aws-java-sdk-core "1.10.49"]
       [com.fasterxml.jackson.core/jackson-databind "2.5.3"]
         [com.fasterxml.jackson.core/jackson-annotations "2.5.0"]
         [com.fasterxml.jackson.core/jackson-core "2.5.3"]
       [commons-logging "1.1.3"]
       [org.apache.httpcomponents/httpclient "4.3.6"]
         [commons-codec "1.6"]
         [org.apache.httpcomponents/httpcore "4.3.3"]
     [com.amazonaws/aws-java-sdk-s3 "1.10.49"]
       [com.amazonaws/aws-java-sdk-kms "1.10.49"]
   [com.taoensso/nippy "2.12.0"]
     [net.jpountz.lz4/lz4 "1.3"]
     [org.iq80.snappy/snappy "0.4"]
   [joda-time "2.9.4"]
 [com.taoensso/timbre "4.3.1"]
   [com.taoensso/encore "2.36.2"]
     [com.taoensso/truss "1.1.1"]
     [org.clojure/tools.reader "0.10.0"]
   [io.aviso/pretty "0.1.23"]
 [defun "0.3.0-RC1"]
   [org.clojure/core.match "0.3.0-alpha4"]
     [org.clojure/tools.analyzer.jvm "0.6.5"]
       [org.clojure/core.memoize "0.5.6"]
         [org.clojure/core.cache "0.6.3"]
           [org.clojure/data.priority-map "0.0.2"]
       [org.clojure/tools.analyzer "0.6.4"]
       [org.ow2.asm/asm-all "4.2"]
   [org.clojure/tools.macro "0.1.2"]
 [dire "0.5.4"]
   [org.clojure/core.incubator "0.1.3"]
   [robert/hooke "1.3.0"]
 [expectations "2.0.9"]
   [junit "4.8.1"]
 [http-kit "2.2.0"]
 [me.raynes/fs "1.4.4"]
   [org.apache.commons/commons-compress "1.4"]
     [org.tukaani/xz "1.0"]
 [org.clojure/clojure "1.7.0"]
 [org.clojure/data.json "0.2.6"]
 [org.clojure/test.check "0.9.0"]
 [org.clojure/tools.nrepl "0.2.12" :exclusions [[org.clojure/clojure]]]
 [overtone/at-at "1.2.0"]
 [slamhound "1.3.1"]
 [slingshot "0.12.2"]

Kevin Downey

unread,
Feb 7, 2017, 5:44:50 PM2/7/17
to clo...@googlegroups.com
definitely turn on
https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L81
:pedantic? :abort and resolve the issues lein deps :tree shows you.

given that you are aot compiling, but have implicit clean disabled, my
guess is you compiled the project once using a version of some library
where cond* was present and nippy could use it, made some changes to the
versions you were using, but didn't blow away the compiled class files,
so nippy was never compiled again, so there was never an error about the
missing cond* macro. So the error was never noticed when it was
introduced, and now some time later for whatever nippy is being compiled
again (fresh checkout, run lein clean, dunno) and versions conflict and
the macro is missing.

This is just a theory, could be all kinds of stuff.

I strongly recommend disabling aot compilation entirely, and if you are
going to aot compile, regularly delete target/. AOT compilation can be a
reliable source of bugs that break things at a large distance from the
cause. If you are aot compiling only to get a nice launcher for your
program, it is not worth it. I have a guide I am trying to contribute to
the official docs on how to launch a clojure program without using aot,
you can see it here
https://github.com/hiredman/clojure-site/blob/df56aef005d5d867213a51c2d3bbec5a86b0acad/content/guides/running_a_clojure_program.adoc,
https://github.com/clojure/clojure-site/pull/141 is the pr.
> On 2/7/17, 1:31 PM, "Laws" <clo...@googlegroups.com <javascript:> on
> behalf of smashco...@gmail.com <javascript:>> wrote:
>
>
>
> Two months ago I could run "lein uberjar" and my project compiled.
> Then I had to focus on other things for 2 months. Then today I come
> back to it, change one line of code, and run "lein uberjar". I get:
>
>
>
> java.lang.IllegalAccessError: cond* does not exist,
> compiling:(nippy.clj:1:1)
>
> Exception in thread "main" java.lang.IllegalAccessError: cond* does
> not exist, compiling:(nippy.clj:1:1)
>
> at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3628)
>
> at clojure.lang.Compiler.compile1(Compiler.java:7323)
>
> at clojure.lang.Compiler.compile1(Compiler.java:7313)
>
> at clojure.lang.Compiler.compile(Compiler.java:7390)
>
> at clojure.lang.RT.compile(RT.java:399)
>
> at clojure.lang.RT.load(RT.java:444)
>
>
>
> Uh, what? Did something with Nippy change? Clojars?
>
>
>
>
>
> --
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to clojure+u...@googlegroups.com
> <mailto:clojure+u...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.


--
And what is good, Phaedrus,
And what is not good—
Need we ask anyone to tell us these things?

Sean Corfield

unread,
Feb 7, 2017, 5:58:02 PM2/7/17
to Clojure Mailing List

Kevin’s provided some solid advice on the AOT stuff.

 

I’ll note that if you’re using the com.taoensso libraries, it pays to make sure you keep them all in sync because they change a lot (that’s both good and bad), and it’s definitely worth using :exclusions fairly liberally to avoid transient dependencies, so you have much more control over the actual versions you pull in. We tend to exclude nearly all of the com.taoensso libraries and then explicitly specify known compatible versions. At the very least, you’re likely to need a more up to date timbre version.

 

Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN
An Architect's View -- http://corfield.org/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

--

You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.

To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.

Laws

unread,
Feb 7, 2017, 6:07:30 PM2/7/17
to Clojure
> I’ll note that if you’re using the com.taoensso libraries, it pays to make sure you keep them 
> all in sync because they change a lot

Hmmmm. 

First of all, this worked, so you are right. Second of all, I am not sure I understand why this worked. 

I have run into this problem with Ruby and Bundler, when I have open-ended version ranges, such as: 

1.9 ~>

Meaning, any version over 1.9. That can lead to problems. 

But in my project.clj I have everything locked down to specific versions, so I don't see how version conflicts can arise. If it's the same versions now as a few months ago, I'm not clear how I got a version conflict. 

But it worked, so thank you. 

Laws

unread,
Feb 7, 2017, 6:09:09 PM2/7/17
to Clojure

> I strongly recommend disabling aot compilation entirely, and if you are 
> going to aot compile, regularly delete target/.

Thank you. I've done so and that seems to help.
Reply all
Reply to author
Forward
0 new messages