Open cmiles74 opened 10 years ago
I've confirmed that this is an issue when deploying as a WAR on Tomcat7. I'm using "lein ring uberwar" and deploying to a Tomcat7 instance on my workstation. I'm seeing the same error, verbatim, in Tomcat7.
Related to #9 right? I think the solution is in https://github.com/circleci/clj-v8/pull/7.
Can you update to the latest version of clj-v8, and see if the problem goes away? (If you specify the clj-v8 version first in your project.clj, that should override the version depended on by stefon. Don't try to use a checkouts dir - that doesnt work with native AFAIK).
If so, a PR updating the version is probably the way to go forward.
CCing @magnars
The newest version of clj-v8 should be working bundled in an uberjar. It'll detect the correct binary based on your OS and archetype, write it out to a temporary directory, and read it from there. No need to set any JNA paths.
Are there instructions on how to fix this?
This is what I've done:
Checkout stefon, bump version of clj-v8 to 0.1.5. lein install -> uberjar -> running the standalone.
Results in the same error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load library 'v8wrapper': dlopen(libv8wrapper.dylib, 9): image not found
I'm using a copy of Stefon that I checked out from the master branch. It builds and installs without issue. It works great from within my REPL environment (Cider) or when launched with a REPL via lein (lein repl). However, when I bundle my application as an uberjar, I'm seeing the following error at the top of my stacktrace:
This seems especially odd since I don't have that path ("/usr/java/packages") on my system. I'm invoking my application with the following incantation:
When I comment out my uses of Stefon and set my application to simply write the value of the "jna.library.path" System property, it does show the value I passed in. I've also tried suppling the absolute path to the library, that doesn't work either. I'm using the "x86_64" path since I'm on a 64bit OS (Ubuntu).
I did find the issue where this is being worked on and it looks like the issue was resolved. Indeed, the fact that it works from "lein repl" and from Cider implies that this is an issue that can be resolved. I'm wondering if maybe I'm doing something very obviously wrong.
My end goal is to deploy this application as a WAR via Tomcat. This is currently the way we deploy all of our Java applications, the goal is to get our Clojure apps to deploy in the same manner.
Any help you can provide will be greatly appreciated! Thank you!