Code Monkey home page Code Monkey logo

Comments (5)

weavejester avatar weavejester commented on July 3, 2024 1

Errors of this type tend to be caused by outdated class files on the classpath. Sometimes you can solve it by cleaning the target directory, but sometimes it's caused by classfiles included in a dependency or plugin you're using.

This probably isn't going to be something I can fix in Clout, because the likelihood is that this is being caused by another dependency. You can try a lein clean and see if the problem persists, and if it does try posting your dependencies and plugins (including those in ~/.lein/profiles.clj).

from clout.

otwieracz avatar otwieracz commented on July 3, 2024

So right now I've got similar problem when trying to start uberjar. And I see no workaround for my case:

Exception in thread "main" java.lang.ExceptionInInitializerError
        at clojure.lang.Namespace.<init>(Namespace.java:34)
        at clojure.lang.Namespace.findOrCreate(Namespace.java:176)
        at clojure.lang.Var.internPrivate(Var.java:153)
        at mysoftwared.core.<clinit>(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: clout/core/CompiledRoute, compiling:(user.clj:1:1)
        at clojure.lang.Compiler.load(Compiler.java:7526)
        at clojure.lang.RT.loadResourceScript(RT.java:379)
        at clojure.lang.RT.loadResourceScript(RT.java:366)
        at clojure.lang.RT.maybeLoadResourceScript(RT.java:362)
        at clojure.lang.RT.doInit(RT.java:482)
        at clojure.lang.RT.<clinit>(RT.java:336)
        ... 4 more
Caused by: java.lang.NoClassDefFoundError: clout/core/CompiledRoute
        at mysoftwared.api__init.__init0(Unknown Source)
        at mysoftwared.api__init.<clinit>(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:348)
        at clojure.lang.RT.classForName(RT.java:2204)
        at clojure.lang.RT.classForName(RT.java:2213)
        at clojure.lang.RT.loadClassForName(RT.java:2232)
        at clojure.lang.RT.load(RT.java:450)
        at clojure.lang.RT.load(RT.java:426)
        at clojure.core$load$fn__6548.invoke(core.clj:6046)
        at clojure.core$load.invokeStatic(core.clj:6045)
        at clojure.core$load.doInvoke(core.clj:6029)
        at clojure.lang.RestFn.invoke(RestFn.java:408)
        at clojure.core$load_one.invokeStatic(core.clj:5848)
        at clojure.core$load_one.invoke(core.clj:5843)

My list of dependencies, if this helps in any way:

  :dependencies [[clj-systemd "0.1.0-SNAPSHOT"]
                 [com.cognitect/transit-clj "0.8.309"]
                 [compojure "1.6.1"]
                 [io.clojure/liberator-transit "0.3.1"]
                 [environ "1.1.0"]
                 [expound "0.7.1"]
                 [liberator "0.15.1"]
                 [me.raynes/fs "1.4.6"]
                 [org.clojure/clojure "1.9.0"]
                 [org.clojure/test.check "0.9.0"]
                 [org.clojure/tools.cli "0.3.7"]
                 [org.clojure/tools.logging "0.4.1"]
                 [org.danielsz/system "0.4.1"]
                 [ring/ring-core "1.6.3"]
                 [ring/ring-jetty-adapter "1.6.3"]]

from clout.

weavejester avatar weavejester commented on July 3, 2024

Have you tried performing a lein clean? Are you AOTing Clout? Do you have any AOTed libraries in your dependencies, or in your plugin dependencies?

from clout.

otwieracz avatar otwieracz commented on July 3, 2024

Yes, I've tried lein clean and as far as I know I am AOTing :all. See here: https://clojureverse.org/t/noclassdeffounderror-clout-core-compiledroute-with-compjure-liberator-and-ring-possibly/2682

from clout.

weavejester avatar weavejester commented on July 3, 2024

It looks like you're skipping a namespace in your project file, so you could try removing that. You also haven't said whether you've checked all dependencies and all dependencies pulled in via a plugin for compiled class files.

My advice would be to remove your target directory, remove any Leiningen plugins you are using (project specific and global), and make sure all your dependencies are up to date. Check lein deps :tree for dependency conflicts and resolve them. If it still fails check the jars in the .m2 directory for accidentally class files.

This is general advice and not specific to Clout. Since this issue seems to be an issue with Clojure rather than Clout itself, I'm closing this issue (though you may continue to reply).

from clout.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.