Page 1 of 1

Error setting up matlab API

Posted: Thu Oct 08, 2015 10:26 pm
by ericabg
Dear Opensim Team,

I have been trying to set up the scripting environment in Matlab with the OpenSim 3.3 (64 bits) and Matlab 2015 (64 bits). I managed to run the automated script after a few errors that were coming up. Once the script has run it says that all the paths have been set properly. I also tried setting it up manually as indicated online. I tested it with typing import org.opensim.modeling.* and no error came up. However, when I test it with Model=org.opensim.modeling.Model(), the following error come up:

Java exception occurred:
java.lang.UnsatisfiedLinkError: org.opensim.modeling.opensimModelJNI.swig_module_init()V

at org.opensim.modeling.opensimModelJNI.swig_module_init(Native Method)

at org.opensim.modeling.opensimModelJNI.<clinit>(opensimModelJNI.java:10698)

at org.opensim.modeling.Model.<init>(Model.java:119)

or

Model=org.opensim.modeling.Model()
Java exception occurred:
java.lang.NoClassDefFoundError: Could not initialize class org.opensim.modeling.opensimModelJNI

at org.opensim.modeling.Model.<init>(Model.java:119)

I looked at the different posts on the forum dealing with these issues and tried the different suggested solutions by changing the authorization for Matlab to run as an administrator but it did not solve the problem. I am unsure of what to do at this point to get it to work? Your help is much appreciated.

Thank you,

Erica Beaucage-Gauvreau

Re: Error setting up matlab API

Posted: Mon Oct 12, 2015 1:39 am
by mitkof6
Hi Erica,

Just a suggestion. Check if the OpenSim3.3/bin is included in the path variable. You can open a cmd and run checkEnvironment.

Regards

Re: Error setting up matlab API

Posted: Wed Oct 14, 2015 11:38 pm
by ericabg
Hi Jim,

Thank you for your suggestion...it actually led us to solve the problem! I uninstalled OpenSim 3.3 and re-installed it in trying to solve the problem. When trying to re-install it, this error came up : https://simtk.org/forums/viewtopic.php?f=91&t=4775 related to the path being too long.

In checking the PATH variable environment (as described in the link above), we noticed that the path to OpenSim 3.3\bin was not there. We added it manually, re-configured the Matlab for OpenSim and this seemed to solve the problem as no more error came up.

THank you again for your help!

Erica

Re: Error setting up matlab API

Posted: Thu Nov 26, 2015 9:10 am
by clarabalust
Hello,

I am getting the same error when I check "model=org.opensim.modeling.Model()"
I am using Matlab 2015(32 bit) and Opensim 3.2 (32bit).
The \OpenSim\bin folder is already added to the path.

Any suggestions?

Thanks in advance.

Clara