jME Suddenly Not Working

Hi Folks!



I've been having a particularly weird issue and am wondering if anyone has any ideas.  For a while now (a month or more) I've been successfully using jME 1.0.  I got it from the CVS repository and followed the directions for integration with Eclipse.  It's all been good so far.



A couple of days ago I ran a CVS update and now I am getting an UnsatisfiedLinkError.  I verified that the natives were still in the right place and pointed to correctly and I'm still getting the problem.  Here's my total log dump:


Jul 7, 2008 11:00:03 PM com.jme.scene.Node <init>
INFO: Node created.
Jul 7, 2008 11:00:04 PM com.jme.app.BaseGame start
INFO: Application started.
Jul 7, 2008 11:00:04 PM com.jme.system.PropertiesIO <init>
INFO: PropertiesIO created
Jul 7, 2008 11:00:04 PM com.jme.system.PropertiesIO load
INFO: Read properties
Jul 7, 2008 11:00:04 PM class jmetest.renderer.TestShadowPass start()
SEVERE: Exception in game loop
java.lang.UnsatisfiedLinkError: /Users/mbastian/Documents/workspace/jme/lib/liblwjgl.jnilib:
   at java.lang.ClassLoader$NativeLibrary.load(Native Method)
   at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1822)
   at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1739)
   at java.lang.Runtime.loadLibrary0(Runtime.java:823)
   at java.lang.System.loadLibrary(System.java:1030)
   at org.lwjgl.Sys$1.run(Sys.java:75)
   at java.security.AccessController.doPrivileged(Native Method)
   at org.lwjgl.Sys.doLoadLibrary(Sys.java:68)
   at org.lwjgl.Sys.loadLibrary(Sys.java:84)
   at org.lwjgl.Sys.<clinit>(Sys.java:101)
   at org.lwjgl.opengl.Display.<clinit>(Display.java:111)
   at com.jme.system.lwjgl.LWJGLPropertiesDialog.<init>(LWJGLPropertiesDialog.java:153)
   at com.jme.app.AbstractGame.getAttributes(AbstractGame.java:192)
   at com.jme.app.BaseGame.start(BaseGame.java:62)
   at jmetest.renderer.TestShadowPass.main(TestShadowPass.java:92)
Jul 7, 2008 11:00:04 PM com.jme.app.BaseSimpleGame cleanup
INFO: Cleaning up resources.
Jul 7, 2008 11:00:04 PM com.jme.system.lwjgl.LWJGLDisplaySystem <init>
INFO: LWJGL Display System created.
Jul 7, 2008 11:00:04 PM com.jme.app.BaseGame start
INFO: Application ending.



To validate that I do have the natives on the path, I removed them from the path and got a different log dump:


Jul 7, 2008 11:02:35 PM com.jme.scene.Node <init>
INFO: Node created.
Jul 7, 2008 11:02:36 PM com.jme.app.BaseGame start
INFO: Application started.
Jul 7, 2008 11:02:36 PM com.jme.system.PropertiesIO <init>
INFO: PropertiesIO created
Jul 7, 2008 11:02:36 PM com.jme.system.PropertiesIO load
INFO: Read properties
Jul 7, 2008 11:02:36 PM class jmetest.renderer.TestShadowPass start()
SEVERE: Exception in game loop
java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
   at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1753)
   at java.lang.Runtime.loadLibrary0(Runtime.java:823)
   at java.lang.System.loadLibrary(System.java:1030)
   at org.lwjgl.Sys$1.run(Sys.java:75)
   at java.security.AccessController.doPrivileged(Native Method)
   at org.lwjgl.Sys.doLoadLibrary(Sys.java:68)
   at org.lwjgl.Sys.loadLibrary(Sys.java:84)
   at org.lwjgl.Sys.<clinit>(Sys.java:101)
   at org.lwjgl.opengl.Display.<clinit>(Display.java:111)
   at com.jme.system.lwjgl.LWJGLPropertiesDialog.<init>(LWJGLPropertiesDialog.java:153)
   at com.jme.app.AbstractGame.getAttributes(AbstractGame.java:192)
   at com.jme.app.BaseGame.start(BaseGame.java:62)
   at jmetest.renderer.TestShadowPass.main(TestShadowPass.java:92)
Jul 7, 2008 11:02:36 PM com.jme.app.BaseSimpleGame cleanup
INFO: Cleaning up resources.
Jul 7, 2008 11:02:36 PM com.jme.system.lwjgl.LWJGLDisplaySystem <init>
INFO: LWJGL Display System created.
Jul 7, 2008 11:02:36 PM com.jme.app.BaseGame start
INFO: Application ending.



Finally, I tried rolling back the code base by a few days, a week, then several months.  I still get the same problems.  It seems as if all of a sudden something broke and I don't know what.

I pulled down jME 2 from Google and it works just fine.

Any ideas?  I am at a total loss.

Other items that may or may not make any difference:


  • I recently upgraded from Eclipse 3.3 to 3.4.  I fired up the old version, but that didn't make any difference.

  • The above included installation of several plugins, including CDT, Scala, and several others.

  • I'm running OS X 10.5.4 (been that way for a while).

  • I changed the compiler settings to Java 1.6, then back to 1.5, then back to 1.6.  No difference.

  • jME 2 works in all cases and jME 1 does not.



Thanks again for any ideas you may have.

Did you remember your VM Arguments? The second error is usually caused by a missing VM Argument.



-Djava.library.path="C:Documents and SettingsTylerMy DocumentsUnder-Development Softwarejmelib"

what trussel suggests is usually done in eclipse.

-> setting up eclipse step 10

I apologize if I wasn't clear in my first post.



Yes, I do have my VM arguments set up right (presumably).  At least, they all appear to the be the same as they were before back when things did work.



When I do set things up as Core-Dump or Trussell have suggested, I get the error "java.lang.UnsatisfiedLinkError: /Users/mbastian/Documents/workspace/jme/lib/liblwjgl.jnilib". 



When I remove the arguments (only doing it as a sanity check to see that something else happens) I get the error "java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path".  The latter is expected behavior; the former is not. 



The bad behavior has only been happening a few days and jME 1.0 has been working just fine for me in the past.  jME 2.0 builds do work for me.



Any other ideas?

I just did an update of the jme sources on another machine (similar to, but not the same as, the first one) and the problem does not show up.  Grrrr.  Unless anyone has any other ideas or has seen this before, I think my next course of action is to blow away the entire jme project, redownload it, and reconfigure it.

the issue is simple, the projects you have should all see the LWJGL sources on the build path.



Also, make sure you havent done anything daft like putting dll's in your windows directory or adding anything into your java runtime folders





Go through the tutorial for setting up eclipse. make sure that you are not crossing user libraries for jme1.0 and jme2.0.

Found it.  One of my recent upgrades was to use the 1.6 VM for OS X that was recently released.  It appears to not work with either jme or lwjgl.  As to why it doesn’t work, I’m not sure.  Perhaps the jnilibs for lwjgl need to be recompiled for a 64-bit VM.  Just guessing, though.  As I stated in an earlier posting, it appears that the jme1.0 + Java 1.6 is the combo that has a problem, and jme2.0 + Java 1.6 seems to be OK.  They both use different versions of lwjgl, which might explain the problem.  One of my experiments was to try to put the newer lwjgl libs in the older jme, but the APIs are incompatible.



Would anyone else with OS X Leopard out there like to try running some of the jme examples using the 1.6 VM to see if they get the same behavior?  If so, I think a bug report should be filed with either the jme or lwjgl guys.

hi jeeky, just wanted to confirm that I have the same problems as you with leopard + jvm1.6 + jme1.0.

i also suspect the older lwjgl… any ideas? how much work is making jme1.0 compatible with a newer lwjgl?



Regards,

Alex

JDK 1.6 for OS X is 64 bit only. Therefore, it only works with 64 bit jnilib files. Any native libs that are 32 bit (the ones that you are referencing, cannot be loaded, and thus, can't be found). You can get 64 bit LWJGL files as needed.