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

System does not start from uberjar with clojure-1.7.0 #32

Closed
mbuczko opened this issue May 27, 2015 · 13 comments
Closed

System does not start from uberjar with clojure-1.7.0 #32

mbuczko opened this issue May 27, 2015 · 13 comments

Comments

@mbuczko
Copy link

mbuczko commented May 27, 2015

I have a problem starting my components (a whole system actually) aot-ed and packed to uberjar with clojure 1.7.0 (beta3 and latest RC1). Switching clojure back to 1.6.0 and repackaging uberjar again solves the problem, so I guess there might be something wrong with component library itself :)

@ddossot
Copy link

ddossot commented May 27, 2015

Is there an exception being thrown?

@mbuczko
Copy link
Author

mbuczko commented May 27, 2015

nope, no exceptions. that's a bit mysterious because it looks like component/start simply does nothing.
I spent half a day disabling blocks of code trying to narrow this problem and when there was actually nothing more to remove I switched to clojure 1.6.0 in my dependencies and voila! system got initialized.

As mentioned, it's a bit tricky because this issue appears only when executing aot-ed uberjar.

@mbuczko
Copy link
Author

mbuczko commented May 28, 2015

I've created a simple project replicating this issue:

https://github.com/mbuczko/temp-component

it uses boot to create uberjar. if you use Mac, boot is available through Homebrew (brew install boot).
change clojure version in build.boot to see effect.

@stuartsierra
Copy link
Collaborator

I cannot reproduce this issue using Leiningen.

I was unable to build the project using boot. boot uberjar returned the error "boot: no boot.core dependency specified in build.boot"

I expect this is an AOT-compilation or uberjar issue and nothing to do with Component. Maybe your uberjar contains stale .class files compiled against the wrong version of Clojure.

@mbuczko
Copy link
Author

mbuczko commented May 28, 2015

Unfortunately, it's not the case. I was cleaning build dir (target/) each time before making new uberjar.
I'll take a look at boot problem that you mentioned in a second.

Edit: dependency added. please try again.

@stuartsierra
Copy link
Collaborator

I think it is very likely that this is an issue with your build configuration or environment, instead of a problem specifically with 'component'.

Since I cannot reproduce the behavior you are seeing, I suggest you ask about this problem on the Clojure mailing list, where a wider audience may have better suggestions on how to identify the cause.

If it does turn out to be a problem with 'component' I will do my best to fix it.

@mbuczko
Copy link
Author

mbuczko commented May 29, 2015

ok, thanks Stuart. I'll try to dig a bit deeper to see where the real problem is. I'm closing this issue now, and possibly will come back with more detailed investigation :)

@mbuczko mbuczko closed this as completed May 29, 2015
@robinheghan
Copy link

@mbuczko Did you figure this out? I'm having the exact same problem.

@dluksza
Copy link

dluksza commented Jul 19, 2015

@Skinney, same here.

@mbuczko did you found a workaround for this issue?

== update

For me downgrading clojure to 1.6 solved the issue

@stuartsierra
Copy link
Collaborator

I have been able to reproduce this issue using Boot. I have never reproduced it using Leiningen. I am fairly certain this is somehow related to the way Boot does AOT-compilation or builds uberJARs.

Similar issues have been reported for Boot: see boot-clj/boot#193 and boot-clj/boot#227. Some users report that the problem is resolved on the latest master branch of Boot.

@stuartsierra
Copy link
Collaborator

Possibly related to boot-clj/boot#211 or boot-clj/boot#217, both with fixes on Git master since Boot release 2.1.2.

Possibly also related to CLJ-979 or CLJ-1315

@robinheghan
Copy link

Thanks @stuartsierra. Awaiting new release of boot.

@dluksza
Copy link

dluksza commented Aug 3, 2015

Just tried boot 2.1.2-23-g516f186 with clojure 1.7.0 and component 0.2.3 and it works fine!

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

4 participants