Comments (5)
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.
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.
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.
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.
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)
- route-matches Doesn't Match from Servlet Root HOT 2
- Path segment URL decoding causes problems HOT 1
- Routes Throwing 500 in API, fixed after cycling HOT 3
- Missing optional parameters support HOT 3
- Support encoded path components HOT 1
- clout incorrectly excludes ',' from allowed path characters HOT 3
- Upgrade to instaparse 1.3.6 for Clojure 1.7.0 compatibility
- Captured groups in patterns clobber following path parameters HOT 2
- Old instaparse dependency HOT 4
- Routes with negative lookahead regex always return nil HOT 3
- Recipe for matching query strings? HOT 6
- [SOLVED] java.lang.IllegalArgumentException: No implementation of method: :route-matches of protocol: #'clout.core/Route found for class: clout.core.CompiledRoute HOT 16
- Clojure 1.3? HOT 3
- + sign in uri path is getting converted to space
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clout.