Hey there jME luminaries,
I'm running a copy of my scene graph within the server-side code so I can detect collisions and so forth.
I need to know the dimensions of things in the scene, naturally, so I'm loading my models with the XMLImporter – just like I do on the client side.
But there's no rendering thread, nor any visual expectations for these objects whatsoever.
I'm getting a bunch of these:
[java] java.lang.NullPointerException
[java] at com.jme.scene.state.lwjgl.LWJGLTextureState.<init>(LWJGLTextureState.java:123)
[java] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[java] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
[java] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
[java] at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
[java] at java.lang.Class.newInstance0(Class.java:355)
[java] at java.lang.Class.newInstance(Class.java:308)
[java] at com.jme.util.export.xml.DOMInputCapsule.readSavableFromCurrentElem(DOMInputCapsule.java:813)
[java] at com.jme.util.export.xml.DOMInputCapsule.readTextureStateFromCurrent(DOMInputCapsule.java:830)
[java] at com.jme.util.export.xml.DOMInputCapsule.readRenderStateList(DOMInputCapsule.java:861)
[java] at com.jme.util.export.xml.DOMInputCapsule.readSavableArray(DOMInputCapsule.java:887)
[java] at com.jme.scene.Spatial.read(Spatial.java:1067)
[java] at com.jme.scene.Geometry.read(Geometry.java:874)
[java] at com.jme.scene.TriMesh.read(TriMesh.java:628)
[java] at com.jme.util.export.xml.DOMInputCapsule.readSavableFromCurrentElem(DOMInputCapsule.java:819)
[java] at com.jme.util.export.xml.DOMInputCapsule.readSavableArrayList(DOMInputCapsule.java:955)
[java] at com.jme.scene.Node.read(Node.java:679)
[java] at com.jme.util.export.xml.DOMInputCapsule.readSavableFromCurrentElem(DOMInputCapsule.java:819)
[java] at com.jme.util.export.xml.DOMInputCapsule.readSavable(DOMInputCapsule.java:779)
[java] at com.jme.util.export.xml.XMLImporter.load(XMLImporter.java:75)
[java] at com.jme.util.export.xml.XMLImporter.load(XMLImporter.java:104)
[java] at org.danann.nimue.common.util.JmeEasyButton.createSpatial(JmeEasyButton.java:138)
...
I'd like to be able to get an instance of XMLImporter that will load the models without doing the rendering-related things that are giving me this error.
Cheers,
haruspex