Java error

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
User avatar
Adam Rozumalski
Posts: 3
Joined: Tue Sep 04, 2007 1:19 pm

Java error

Post by Adam Rozumalski » Thu Jan 12, 2012 12:19 pm

I get the following error when trying to run OpenSim 2.4.0 on a Windows XP machine:

Required library failed to load. Check that the dynamic library osimJavaJNI is in your PATH
java.lang.UnsatisfiedLinkError: C:\OpenSim2.4.0\bin\osimJavaJNI.dll: Can't find dependent libraries.

Java is up to date.
I have unistalled and reinstalled OpenSim.
C:\OpenSim2.4.0\bin is included in the PATH environmental variable.
The file osimJavaJNI.dll does exist in this folder.

Any ideas of what might be going on here?

User avatar
Ayman Habib
Posts: 2238
Joined: Fri Apr 01, 2005 12:24 pm

Re: Java error

Post by Ayman Habib » Thu Jan 12, 2012 12:51 pm

Hi Adam,

Considering that we had the software installed on hundreds of machines without problem, I'd think the issue may have to do with your environment. Possible sources:
1. Windows is not patched up so there are some missing dlls from your machine that are needed to run the application. Solution: Windows update or if you have some other Visual Studio installed, use the proper installer for it (VS8Pro, VS9Pro, VS10Express are available the Pro versions are supposed to be self contained and be more robust on locating these dlls).
2. Path is too long. I've seen this on a couple of machines where the path is too long and so the batch file that launches opensim fails to append to the front of the path and hence the dlls are not found. Solution: make the path shorter if possible or set it from a command prompt and make sure it gets appended.

There are potentially other reasons I can think of but please try these two and let me know how it goes.

Good luck,
-Ayman

User avatar
Adam Rozumalski
Posts: 3
Joined: Tue Sep 04, 2007 1:19 pm

Re: Java error

Post by Adam Rozumalski » Thu Jan 12, 2012 2:32 pm

Thanks for the quick response, Ayman!
Because I work at a large institution, I am not allowed access to Windows Updates. However, the computer is scheduled to check for updates daily and install them if found.
I do not have Visual Studio on this machine.
I have shortened the Path variable so that it is shorter than on other machines where OpenSim is working but I still get the same error.
What are your other ideas?
Thanks!

User avatar
Ayman Habib
Posts: 2238
Joined: Fri Apr 01, 2005 12:24 pm

Re: Java error

Post by Ayman Habib » Thu Jan 12, 2012 2:58 pm

Adam,

Which installer did you use? Have you tried the one ending in VC8P? You'll need to have the right privileges to run the redistributable program on your machine as that program installs the missing dlls if any. You can invoke it manually from the install directory/bin/vcredist_x86.exe

Please let me know how that goes.

If you have the dependency walker you can open the osimJavaJNI.dll and see what errors you get and then we can track that down but I'd try the approach above first.

Good luck
-Ayman

User avatar
Adam Rozumalski
Posts: 3
Joined: Tue Sep 04, 2007 1:19 pm

Re: Java error

Post by Adam Rozumalski » Mon Jan 16, 2012 11:30 am

Ayman,
Installing the VC8P version worked. Thank you very much for your help!
Adam

User avatar
David Graham
Posts: 2
Joined: Wed Mar 09, 2011 5:03 pm

Re: Java error

Post by David Graham » Mon Jun 18, 2012 7:14 pm

As an addition to this conversation, I had the same error when installing on my new machine running windows 7, the problem was resolved when I installed vcredist_x86.exe which can be found in Tim Dorn's OpenSim Utilities.

Hope that helps

David

User avatar
Jits Myron
Posts: 1
Joined: Tue Jul 30, 2013 8:09 pm

Re: Java error

Post by Jits Myron » Tue Jul 30, 2013 10:29 pm

Hey David,
You're solution worked.

Thanks,
Jits

User avatar
Ayman Habib
Posts: 2238
Joined: Fri Apr 01, 2005 12:24 pm

Re: Java error

Post by Ayman Habib » Wed Jul 31, 2013 9:41 am

Hi Jits,

What installer did you use and what problem did it exhibit? the redistributable vcredist_x86.exe is specific to the VisualStudio version used to build the distribution and is included in the bin directory of the install. If the one we ship didn't work and you had to go get it somewhere else then please let us know so we can fix the installer.

Thanks,
-Ayman

User avatar
Madeline McAuley
Posts: 1
Joined: Wed Nov 27, 2013 7:12 am

Re: Java error

Post by Madeline McAuley » Mon Dec 02, 2013 7:23 am

I also experienced this error with OpenSim 3.1 for 64bit Windows. Manually running C:\OpenSim 3.1\bin\vcredist_x64.exe fixed the problem.

Thanks!

User avatar
Daniela Albuquerque
Posts: 1
Joined: Tue Nov 26, 2013 3:12 pm

Re: Java error

Post by Daniela Albuquerque » Tue Dec 10, 2013 1:55 pm

Hi.Can you help me?
I have this error:

A java.lang.NullPointerException exception has occurred.

Click Show Details or see the messages.log file located in your C:\Documents and Settings\laughlin\Application Data\.opensim\2.0.0\var\log folder.

The details are as follows;

java.lang.NullPointerException
at org.opensim.view.pub.ViewDB.updateModelDisplay(ViewDB.java:1048)
at org.opensim.coordinateviewer.CoordinateViewerTopComponent.rebuild(CoordinateViewerTopComponent.java:579)
[catch] at org.opensim.coordinateviewer.Installer$1.run(Installer.java:23)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

Thanks for the help,

Daniela Albuquerque

POST REPLY