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

Compatibility Problem with javafx-8.0.jar #60

Open
elkassar opened this issue Jun 28, 2016 · 5 comments
Open

Compatibility Problem with javafx-8.0.jar #60

elkassar opened this issue Jun 28, 2016 · 5 comments

Comments

@elkassar
Copy link

Val<T> extends javafx.beans.value.ObservableValue. However, "javafx-8.0.jar" is using another version of javafx.beans.value.ObservableValue. So, There is a conflict happens whenever we use both jars in the same project.

@TomasMikula
Copy link
Owner

Hi, what is "javafx-8.0.jar" and where does it come from?

@elkassar
Copy link
Author

It is required in my project to load the system library "jfxrt.jar" classes into my project.

groupId: com.oracle
artifactId: javafx
version: 8.0

@TomasMikula
Copy link
Owner

I still don't understand, does that jar define its own javafx.beans.value.ObservableValue? Does the error arise because you are trying to load a class with the same name twice? What is the error message you get? What JDK version do you use?

@elkassar
Copy link
Author

elkassar commented Jul 1, 2016

Yes, this jar defines its own javafx.beans.value.ObservableValue, and may be it is a wrapper of this class which is inside "jfxrt.jar" which is existing inside the JDK. Yes the problem arise because there are two different instances of this class inside both jars. I'm using jdk1.8.0_91 or jdk1.8.0_73. Both JDKs have the same problem. The error message is

"java.lang.LinkageError: loader constraint violation: when resolving method "MyClass.(LMyClass;Ljavafx/beans/value/ObservableValue;Z)V" the class loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader) of the current class, MyClass2, and the class loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader) for the method's defining class, MyClass3, have different Class objects for the type javafx/beans/value/ObservableValue used in the signature"

.

Whenever I remove the dependency of any of "javafx-8.0.jar" or "reactfx-2.0-M5.jar", the error disappear.

@TomasMikula
Copy link
Owner

Well, ReactFX doesn't define javafx.beans.value.ObservableValue, it just uses the one from JDK. I don't understand why you would need an extra jar file (javafx-8.0.jar) when JavaFX is part of the JDK already. You can try to compile ReactFX yourself with a dependency on that jar, to see if that resolves the problem.

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