Page 1 of 1

Static Opt Java Error

Posted: Mon Aug 18, 2008 7:51 am
by reill111
After successfully running Scale,IK,ID, I get the following error upon attempting Static Optimization(all Java updates are installed, and this is using OpenSim 1.5.5):

java.lang.UnsatisfiedLinkError: new_StaticOptimization__SWIG_1
at org.opensim.modeling.opensimModelJNI.new_StaticOptimization__SWIG_1(Native Method)
at org.opensim.modeling.StaticOptimization.<init>(StaticOptimization.java:58)
at org.opensim.tracking.AnalyzeToolModel.adjustToolForMode(AnalyzeToolModel.java:259)
at org.opensim.tracking.AnalyzeToolModel.<init>(AnalyzeToolModel.java:188)
at org.opensim.tracking.AnalyzeAndForwardToolPanel.<init>(AnalyzeAndForwardToolPanel.java:91)
at org.opensim.tracking.tools.StaticOptimizationAction.performAction(StaticOptimizationAction.java:21)
at org.openide.util.actions.CallableSystemAction$1.run(CallableSystemAction.java:100)
at org.netbeans.modules.openide.util.ActionsBridge.doPerformAction(ActionsBridge.java:53)
at org.openide.util.actions.CallableSystemAction.actionPerformed(CallableSystemAction.java:96)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
at java.awt.Component.processMouseEvent(Component.java:5488)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Component.dispatchEvent(Component.java:3803)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
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)

A similar error appears for Forward Dynamics, CMC
Any suggestions?

RE: Static Opt Java Error

Posted: Mon Aug 18, 2008 10:11 am
by aymanh
Dear Kathleen,

The error you see is because OpenSim is trying to load a dll that contains the StaticOptimization "symbols" and not finding it. Since static optimization was introduced only in 1.5.5 you'll see this error if you're using old libraries (from a previous install) which would happen if you did NOT add OpenSim to your path during install.

Few solutions:
1. Install OpenSim 1.5.5 again and pick the radio button to add OpenSim to the path for all users (to be safe).
2. Launch OpenSim using the batch file provided under the install-directory/bin/start_opensim.bat (have to do that every time to set your path).
3. Just change your PATH environment variable to have install-directory/bin at the front of the path. (My Computer -> Properties->Advanced->Environment Variables->PATH) Do this only if you're familiar with PATHs, environment variables and how they work.

Good luck,
-Ayman