Error setting up matlab API

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Erica Beaucage-Gauvreau
Posts: 49
Joined: Fri Apr 03, 2015 2:12 am

Error setting up matlab API

Post by Erica Beaucage-Gauvreau » Thu Oct 08, 2015 10:26 pm

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

User avatar
Dimitar Stanev
Posts: 1096
Joined: Fri Jan 31, 2014 5:14 am

Re: Error setting up matlab API

Post by Dimitar Stanev » Mon Oct 12, 2015 1:39 am

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

User avatar
Erica Beaucage-Gauvreau
Posts: 49
Joined: Fri Apr 03, 2015 2:12 am

Re: Error setting up matlab API

Post by Erica Beaucage-Gauvreau » Wed Oct 14, 2015 11:38 pm

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

User avatar
Clara Balust
Posts: 3
Joined: Mon Oct 05, 2015 10:21 am

Re: Error setting up matlab API

Post by Clara Balust » Thu Nov 26, 2015 9:10 am

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

POST REPLY