I am a novice engineer with experience writing PHP, python and ruby. I am trying to contribute to a project written in clojure. I am trying to add a library to the project, but after adding the library and running lein uberjar , I get an error. I would like to know what this means and if you can recommend a troubleshooting method. Thank you in advance for your help!
What I'm trying to achieve Include a uap-clj library in my project and compile the project in jarfile.
What I wrote I added the library as the second to the last item in the dependency list.
:dependencies [[lots-of-dependencies] [uap-clj "1.1.1"] ; user agent parser [another-dependency]]
What I ran in lein According to the github instructions, after saving the changes in project.clj, I run lein deps , then lein clean && lein uberjar .
What happened After updating and saving the file, running the command gives the following error before the long stacktrace:
java.lang.IllegalAccessError: tried to access method clojure.lang.RT.classForNameNonLoading(Ljava/lang/String;)Ljava/lang/Class; from class clj_yaml.core$loading__5340__auto____29, compiling:(flexmaster.clj:1:1)
What else I tried I wanted to check if I made a mistake by adding a library. I created a new clojure project from scratch and created a jarfile using lein deps and then lein uberjar . Then I added uap-clj to the dependencies: in my new project, saved project.clj and lein deps and lein uberjar . I managed to create a jarfile, so I believe that I am adding the library correctly.
I canβt think of another reason why the act of including another dependency did not stop me from creating a jarfile. If you can think of something that I should check based on the information I provided, that would help me a lot. Thanks!
source share