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

Zip File is Empty #68

Closed
Quasaur opened this issue Apr 26, 2014 · 11 comments
Closed

Zip File is Empty #68

Quasaur opened this issue Apr 26, 2014 · 11 comments

Comments

@Quasaur
Copy link

Quasaur commented Apr 26, 2014

This is probably something stupid, so i apologize ahead of time...

Using oracle java 1.7.0_55

I ran lein new luminus myapp
i then cd'd to the myapp subdirectory and ran lein ring server

it gave me the following:

java.util.zip.ZipException: zip file is empty
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:215)
at java.util.zip.ZipFile.(ZipFile.java:145)
at java.util.jar.JarFile.(JarFile.java:153)
at java.util.jar.JarFile.(JarFile.java:117)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at clojure.lang.Reflector.invokeConstructor(Reflector.java:180)
at leiningen.core.classpath$extract_native_deps.invoke(classpath.clj:43)
at clojure.lang.AFn.applyToHelper(AFn.java:167)
at clojure.lang.AFn.applyTo(AFn.java:151)
at clojure.core$apply.invoke(core.clj:617)
at leiningen.core.classpath$when_stale.doInvoke(classpath.clj:66)
at clojure.lang.RestFn.invoke(RestFn.java:580)
at leiningen.core.classpath$resolve_dependencies.doInvoke(classpath.clj:231)
at clojure.lang.RestFn.invoke(RestFn.java:425)
at leiningen.core.classpath$get_classpath.invoke(classpath.clj:274)
at leiningen.ring.server$classpath_dirs.invoke(server.clj:13)
at leiningen.ring.server$reload_paths.invoke(server.clj:27)
at leiningen.ring.server$server_task.invoke(server.clj:61)
at leiningen.ring.server$server.invoke(server.clj:78)
at clojure.lang.AFn.applyToHelper(AFn.java:161)
at clojure.lang.AFn.applyTo(AFn.java:151)
at clojure.core$apply.invoke(core.clj:619)
at leiningen.ring$ring.doInvoke(ring.clj:23)
at clojure.lang.RestFn.invoke(RestFn.java:425)
at clojure.lang.Var.invoke(Var.java:419)
at clojure.lang.AFn.applyToHelper(AFn.java:163)
at clojure.lang.Var.applyTo(Var.java:532)
at clojure.core$apply.invoke(core.clj:619)
at leiningen.core.main$resolve_task$fn__2171.doInvoke(main.clj:149)
at clojure.lang.RestFn.applyTo(RestFn.java:139)
at clojure.lang.AFunction$1.doInvoke(AFunction.java:29)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:619)
at leiningen.core.main$apply_task.invoke(main.clj:189)
at lein_environ.plugin$write_env_to_file.invoke(plugin.clj:11)
at clojure.lang.Var.invoke(Var.java:427)
at clojure.lang.AFn.applyToHelper(AFn.java:172)
at clojure.lang.Var.applyTo(Var.java:532)
at clojure.core$apply.invoke(core.clj:619)
at robert.hooke$compose_hooks$fn__29.doInvoke(hooke.clj:40)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:617)
at robert.hooke$run_hooks.invoke(hooke.clj:46)
at robert.hooke$prepare_for_hooks$fn__34$fn__35.doInvoke(hooke.clj:54)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.lang.AFunction$1.doInvoke(AFunction.java:29)
at clojure.lang.RestFn.invoke(RestFn.java:436)
at leiningen.core.main$_main$fn__2232.invoke(main.clj:253)
at leiningen.core.main$_main.doInvoke(main.clj:243)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:419)
at clojure.lang.AFn.applyToHelper(AFn.java:163)
at clojure.lang.Var.applyTo(Var.java:532)
at clojure.core$apply.invoke(core.clj:617)
at clojure.main$main_opt.invoke(main.clj:335)
at clojure.main$main.doInvoke(main.clj:440)
at clojure.lang.RestFn.invoke(RestFn.java:457)
at clojure.lang.Var.invoke(Var.java:427)
at clojure.lang.AFn.applyToHelper(AFn.java:172)
at clojure.lang.Var.applyTo(Var.java:532)
at clojure.main.main(main.java:37)

...please help...thanks!

@yogthos
Copy link
Member

yogthos commented Apr 26, 2014

I haven't seen this problem before and I can't reproduce the it locally. One thing to take a look at is that you're running the latest version of leiningen (2.3.4), by running lein version. Also, what operating system are you running on.

@yogthos
Copy link
Member

yogthos commented Apr 27, 2014

It appears the that the problem is caused by the fact that windows uses \ for path separators as opposed to / on *nix. The current workaround would be to use \ in the templates.

@Quasaur
Copy link
Author

Quasaur commented Apr 27, 2014

I told you it was something stupid...i'm using Lein 2.1.2 on debian (whezy testing)...ran lein upgrade to latest stable.
Now running Leiningen 2.3.4 on Java 1.7.0_55 Java HotSpot(TM) Client VM
...same error. Are "the templates" accessible by me or does the author have to correct it?

@yogthos
Copy link
Member

yogthos commented Apr 28, 2014

You should just be able to bump up the selmer dependency in project.clj to 0.6.6 for the fix. I've updated the template so new projects should work as expected out of the box.

@Quasaur
Copy link
Author

Quasaur commented Apr 28, 2014

Selmer is already 0.6.6 in project.clj for luminus...but i'll re-download tomorrow.

@Quasaur
Copy link
Author

Quasaur commented Apr 30, 2014

started over with lein 2.3.4...same error. Is there a certain way i would re-download luminus?

@yogthos
Copy link
Member

yogthos commented Apr 30, 2014

The exiting templates would be cached under ~/.m2/repository/luminus/, you could delete that folder and run lein new luminus myapp again to pull in the latest version of the template.

Unfortunately, I haven't seen this error before, so not really sure what's triggering it for you though.

@Quasaur
Copy link
Author

Quasaur commented May 1, 2014

Thanks, and sorry for being such a troublemaker (smile). Will try again tonight.

@yogthos
Copy link
Member

yogthos commented May 1, 2014

No worries, I'm kind of curious what's causing the problem as well. :)

@Quasaur
Copy link
Author

Quasaur commented May 2, 2014

deleted the .m2/repository/luminus folder...same problem:

...i then deleted the entire .m2/repository site and redid the project creation and lein ring server...

...AND IT WORKED!

@Quasaur Quasaur closed this as completed May 2, 2014
@yogthos
Copy link
Member

yogthos commented May 2, 2014

Good to hear

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

2 participants