puniverse / pulsar

Fibers, Channels and Actors for Clojure
http://docs.paralleluniverse.co/pulsar/
Other
911 stars 53 forks source link

Class JavaLaunchHelper is implemented in both .../java and .../libinstrument.dylib #49

Closed stig closed 8 years ago

stig commented 8 years ago

When adding the quasar-core Java agent to my project.clj I get this warning when running Leiningen:

% lein repl
objc[4600]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.

This is my project.clj:

(defproject pulsar-toy "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.7.0"]
                 [co.paralleluniverse/quasar-core "0.7.3"]
                 [co.paralleluniverse/pulsar "0.7.3"]
                 [org.clojure/tools.logging "0.3.1"]
                 [org.slf4j/slf4j-log4j12 "1.7.12"]
                 [log4j/log4j "1.2.17"]]

  :main ^:skip-aot pulsar-toy.core
  :target-path "target/%s"
  :java-agents [[co.paralleluniverse/quasar-core "0.7.3"]])
circlespainter commented 8 years ago

It seems to be an annoyance related to a JDK issue that not been fixed yet for 1.8: http://stackoverflow.com/questions/18794573/objc10012-class-javalaunchhelper-is-implemented-in-both-libinstrument-dyl

circlespainter commented 8 years ago

I'll close it as there's not much that can be done in Quasar/Pulsar.

davoVloom commented 7 years ago

You must go to Preferences/Build, Execution, Deployment/Debugger and disable the option: "Force Classic VM for JDK 1.3.x and earlier" This works for me

vryba commented 7 years ago

Proposed solution didn't work for me, still have "...One of the two will be used. Which one is undefined."

Rauk commented 7 years ago

Same for me as well, the solution is not working. Jdk version: jdk1.8.0_131.jdk Tried running both on Intellij Idea and Eclipse. Eclipse is not even showing error and closes the execution without any error.

chitraj8 commented 7 years ago

I hit the same error - none of the proposed solutions works for me

webit4me commented 7 years ago

Disabling "Force Classic VM for JDK 1.3.x and earlier" works fine as @davoVloom described, but only after restart the IDE

felipealvesgnu commented 7 years ago

@vryba It just works in Debug Mode, but in Run Mode it won't in IntelliJ !

Tsahao commented 7 years ago

The bug has been solved. Please update your JDK http://bugs.java.com/bugdatabase/view_bug.do?bug_id=8022291