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
ClassNotFoundException when using Java 9 #41
Comments
Thanks for this. Will look into it soon-ish... |
Hi, I had the same issue, here's a working project.clj under: ;; CIDER 0.17.0snapshot (package: 20180219.1846), nREPL 0.2.12
Disregard the Xmx1g, but the other jvm-options is what was required to make use of pdfboxing. Hope it's of use for you (and thanks for your lib) |
I have added JDK9 to travis CI and fixed the error by replacing Preflight parser with PDF parser but I am not sure if there are any edge cases and the rationale behind using PreFlight parser. This passes the tests on JDK 9. But I don't any other cases that are handled but don't have tests. |
This PR #21 would also remove this JDK9 specific error since it removes preflight as a dependency that uses javax components. |
Hi @jhemann and @agumonkey can you confirm that this change by @tirkarthi which I just merged solves the issue for you? Thanks |
I'd gladly try but where do I get the latest build jar ? |
I think you can do a clone and do |
Hey @agumonkey you can do what @tirkarthi suggested, but if you haven't already, I just pushed: 0.1.14.1-SNAPSHOT for you to try. Let me know how you get on. |
I just tried it with Java 9 & Clojure 1.9.0. I created deps.edn with this content: {:deps
{pdfboxing {:mvn/version "0.1.14.1-SNAPSHOT"}}} And then I ran: $ clj
Downloading: pdfboxing/pdfboxing/0.1.14.1-SNAPSHOT/maven-metadata.xml from https://clojars.org/repo/
Downloading: pdfboxing/pdfboxing/0.1.14.1-SNAPSHOT/pdfboxing-0.1.14.1-20180224.071331-1.pom from https://clojars.org/repo/
Downloading: pdfboxing/pdfboxing/0.1.14.1-SNAPSHOT/pdfboxing-0.1.14.1-20180224.071331-1.jar from https://clojars.org/repo/
Clojure 1.9.0
user=> (require '[pdfboxing.text :as text] :verbose)
(clojure.core/load "/pdfboxing/text")
(clojure.core/in-ns 'clojure.core.specs.alpha)
(clojure.core/alias 's 'clojure.spec.alpha)
(clojure.core/load "/pdfboxing/common")
(clojure.core/in-ns 'pdfboxing.common)
(clojure.core/alias 'io 'clojure.java.io)
(clojure.core/in-ns 'pdfboxing.text)
(clojure.core/alias 'common 'pdfboxing.common)
(clojure.core/in-ns 'user)
(clojure.core/alias 'text 'pdfboxing.text)
nil
user=> (text/extract "/Users/alex/dev/clojure/pdfboxing/test/pdfs/hello.pdf")
"Hello, this is pdfboxing.text\n" |
i couldn't use deps.edn on my laptop right now; but using your latest 0.1.14.1-SNAPSHOT I could use you code without an issue on two random PDFs. Thanks a lot |
Thank you @jhemann @agumonkey for bringing this up and @tirkarthi for solving it. I'll close this issue now. |
OS: Linux Mint (Sarah)
Using this project.clj
I get the following error under Java 9:
The issue seems to be that
java.activation
is deprecated in Java 9, see this issue.I briefly tried downloading the JavaBeans Activation Framework and using the
--add-modules
argument to:jvm-opts
in my profile, but gave up. Instead, when usingpdfboxing
I reverted to Java 8 viaNow, starting a REPL and bringing in pdfboxing works:
The text was updated successfully, but these errors were encountered: