Page 2 of 2

Re: Error configuring MATLAB to work with OpenSim 4.0

Posted: Fri Feb 08, 2019 9:17 am
by rodmateus
Hi there,

I am having the same situation, but I did not understand what you did to resolve this. Could you explain what you did in simpler terms please? It is the first time I am trying to connect Matlab with Opensim so everything is new and strange to me. I am using Matlab 2014

Thank you in advance!

Rodrigo Mateus

Re: Error configuring MATLAB to work with OpenSim 4.0

Posted: Sun Feb 10, 2019 12:27 pm
by lamerse
Hi,

I am also receiving this error message:

Java exception occurred:
java.lang.UnsatisfiedLinkError: org.opensim.modeling.opensimSimulationJNI.new_Model__SWIG_0()J

at org.opensim.modeling.opensimSimulationJNI.new_Model__SWIG_0(Native Method)

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

I've tried the suggested fixes (expect for the dependency walker - i'm not sure how to execute that), without success.

I am running MatLab 2018a

Thanks!

-Erik

Re: Error configuring MATLAB to work with OpenSim 4.0

Posted: Mon Feb 18, 2019 1:23 am
by saylee.p
Hi,
I am also facing the same problem but the fixes suggested by everyone does not solve the issue. I am still getting error as
Java exception occurred:
java.lang.UnsatisfiedLinkError: org.opensim.modeling.opensimCommonJNI.new_C3DFileAdapter__SWIG_0()J

at org.opensim.modeling.opensimCommonJNI.new_C3DFileAdapter__SWIG_0(Native Method)

at org.opensim.modeling.C3DFileAdapter.<init>(C3DFileAdapter.java:41)
I tried every suggestion except for dependency walker.
Please, suggest the solution.

I am using MATLAB 2018b

Re: Error configuring MATLAB to work with OpenSim 4.0

Posted: Mon Feb 18, 2019 9:56 am
by mfanton
Hi All,

The problem that I ran into was that I had already had Opensim 3.3 installed when I installed OpenSim 4.0, so my PATH variable was referencing the wrong OpenSim version. To edit your PATH variable (if you are using Windows 10), type "environment variables" into your search bar, and click "edit the system environment variables." Then click the "Environment Variables" button, and under the "System Variables" box you should see a variable called "Path." edit that variable so that OpenSim 4.0 is before OpenSim 3.0. Then make sure to restart matlab.

Hope this helps!
Michael

Re: Error configuring MATLAB to work with OpenSim 4.0

Posted: Tue Feb 19, 2019 5:46 am
by saylee.p
mfanton wrote:
Mon Feb 18, 2019 9:56 am
Hi All,

The problem that I ran into was that I had already had Opensim 3.3 installed when I installed OpenSim 4.0, so my PATH variable was referencing the wrong OpenSim version. To edit your PATH variable (if you are using Windows 10), type "environment variables" into your search bar, and click "edit the system environment variables." Then click the "Environment Variables" button, and under the "System Variables" box you should see a variable called "Path." edit that variable so that OpenSim 4.0 is before OpenSim 3.0. Then make sure to restart matlab.

Hope this helps!
Michael
Thank you sir. This suggestion solved my error and now I can see the expected output after testing configuration.
Also thanks to all who helped to solve the issue.

Re: Error configuring MATLAB to work with OpenSim 4.0

Posted: Tue Sep 03, 2019 5:28 am
by offseyram
aymanh wrote:
Fri Apr 13, 2018 10:10 am
Dear Michael,

Thanks for reporting.

The message suggests that the JNI library is actually found but that other libraries that it depends on are not found. Possible reasons:
1. Finding the wrong/mixed low level libraries (e.g. simbody) on your path first, or some 32 bit version somehow.
2. Redistributable that goes with VS 2017 (used to build OpenSim 4.0 Beta) was never run on your machine. We normally run this during installation but it's possible the current beta installer didn't. It can be downloaded/run separately from https://www.visualstudio.com/downloads/
if you go there, get the x64 version, download it and run it and let us know if it solves the problem. Official release will definitely run the redistributable for you.
3. You can use the "dependency walker" to drill into the JNI dll to find which dependencies it's missing but likely it's either 1 or 2 above.

Please let me know how it goes,
-Ayman
Hello Ayman,
I am having similar problems and having a really hard time solving it. I tried running the code and I got the exact same error. I finally chanced on this thread but unlike Michael OpenSim 4.0 is the first and only OpenSim i have installed. I tried running the dependency walker as suggested and found out that the RtlAddFunctionTable is missing, along with other things. I also noticed that line 65 which is where the error was according to Matlab had a "tables" function in there which then seems to add up. Can you advise me on how I can proceed from this point?
Thank you

Re: Error configuring MATLAB to work with OpenSim 4.0

Posted: Tue Sep 03, 2019 11:06 am
by aymanh
Hello Seyram,

The functions you refer to as missing are referenced in MicroSoft discussion forums as appearing in Universal Windows Platform (that allows applications to run on Desktop and Mobile). My guess is that your environment (either C++ or Matlab) is more recent than the environment used to develop/distribute OpenSim 4.0. Can you send the the output from dependency walker, and also describe if you have VS installed on this machine (if so which version/update), along with which version of Matlab you're using.

Best regards,
-Ayman