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

Using OpenML Java apiconnector in Matlab #1

Open
DraXus opened this issue Feb 19, 2015 · 2 comments
Open

Using OpenML Java apiconnector in Matlab #1

DraXus opened this issue Feb 19, 2015 · 2 comments

Comments

@DraXus
Copy link

DraXus commented Feb 19, 2015

I tried to use Java apiconnector in Matlab R2012a but got the following error:

Java exception occurred:
java.lang.NoSuchMethodError:
com.thoughtworks.xstream.io.xml.DomDriver.<init>(Ljava/lang/String;Lcom/thoughtworks/xstream/io/naming/NameCoder;)V
 at org.openml.apiconnector.xstream.XstreamXmlMapping.getInstance(XstreamXmlMapping.java:63)
 at org.openml.apiconnector.io.HttpConnector.doApiRequest(HttpConnector.java:30)
 at org.openml.apiconnector.io.ApiSessionHash.openmlAuthenticate(ApiSessionHash.java:162)
 at org.openml.apiconnector.io.ApiSessionHash.update(ApiSessionHash.java:84)
 at org.openml.apiconnector.io.ApiSessionHash.set(ApiSessionHash.java:71)
 at org.openml.apiconnector.io.OpenmlConnector.<init>(OpenmlConnector.java:89)

This problem occurs because an older version of xstream is loaded by Matlab in the static java class path and therefore it's not using the xstream library provided in the dynamic java class path. I've been googling and couldn't find any elegant solution. Apparently, the only workaround would be to replace the xstream.jar file in the "jarext" Matlab folder with the new version, but that could lead to internal Matlab problems.

So at the moment it's not possible to use the Java apiconnector in Matlab, but I would like to leave this comment here for future reference.

@joaquinvanschoren
Copy link
Contributor

I remember we had a similar issue with RapidMiner. Jan, do you remember how
you solved that?

On Thu Feb 19 2015 at 11:31:14 AM Manuel Martín [email protected]
wrote:

I tried to use Java apiconnector in Matlab R2012a but got the following
error:

Java exception occurred:
java.lang.NoSuchMethodError:
com.thoughtworks.xstream.io.xml.DomDriver.(Ljava/lang/String;Lcom/thoughtworks/xstream/io/naming/NameCoder;)V
at org.openml.apiconnector.xstream.XstreamXmlMapping.getInstance(XstreamXmlMapping.java:63)
at org.openml.apiconnector.io.HttpConnector.doApiRequest(HttpConnector.java:30)
at org.openml.apiconnector.io.ApiSessionHash.openmlAuthenticate(ApiSessionHash.java:162)
at org.openml.apiconnector.io.ApiSessionHash.update(ApiSessionHash.java:84)
at org.openml.apiconnector.io.ApiSessionHash.set(ApiSessionHash.java:71)
at org.openml.apiconnector.io.OpenmlConnector.(OpenmlConnector.java:89)

This problem occurs because an older version of xstream is loaded by
Matlab in the static java class path and therefore it's not using the
xstream library provided in the dynamic java class path. I've been googling
and couldn't find any elegant solution. Apparently, the only workaround
would be to replace the xstream.jar file in the "jarext" Matlab folder with
the new version, but that could lead to internal Matlab problems.

So at the moment it's not possible to use the Java apiconnector in Matlab,
but I would like to leave this comment here for future reference.


Reply to this email directly or view it on GitHub
#1.

@janvanrijn
Copy link
Member

I didn't solve that problem yet, as there was a second problem with
RapidMiner as well.

A solution would be to downgrade xstream version of the apiconnector,
but that isn't straightforward as we rely heavily on one of the new
features.

2015-02-20 0:57 GMT+13:00 Joaquin Vanschoren [email protected]:

I remember we had a similar issue with RapidMiner. Jan, do you remember how
you solved that?

On Thu Feb 19 2015 at 11:31:14 AM Manuel Martín [email protected]
wrote:

I tried to use Java apiconnector in Matlab R2012a but got the following
error:

Java exception occurred:
java.lang.NoSuchMethodError:

com.thoughtworks.xstream.io.xml.DomDriver.(Ljava/lang/String;Lcom/thoughtworks/xstream/io/naming/NameCoder;)V
at
org.openml.apiconnector.xstream.XstreamXmlMapping.getInstance(XstreamXmlMapping.java:63)
at
org.openml.apiconnector.io.HttpConnector.doApiRequest(HttpConnector.java:30)
at
org.openml.apiconnector.io.ApiSessionHash.openmlAuthenticate(ApiSessionHash.java:162)
at
org.openml.apiconnector.io.ApiSessionHash.update(ApiSessionHash.java:84)
at org.openml.apiconnector.io.ApiSessionHash.set(ApiSessionHash.java:71)
at
org.openml.apiconnector.io.OpenmlConnector.(OpenmlConnector.java:89)

This problem occurs because an older version of xstream is loaded by
Matlab in the static java class path and therefore it's not using the
xstream library provided in the dynamic java class path. I've been
googling
and couldn't find any elegant solution. Apparently, the only workaround
would be to replace the xstream.jar file in the "jarext" Matlab folder
with
the new version, but that could lead to internal Matlab problems.

So at the moment it's not possible to use the Java apiconnector in
Matlab,
but I would like to leave this comment here for future reference.


Reply to this email directly or view it on GitHub
#1.


Reply to this email directly or view it on GitHub
#1 (comment).

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

3 participants