ClassCastException: com.jme3.asset.AssetKey cannot be cast to com.jme3.asset.TextureKey

I am using AssetManager to load an OBJ file (and its respective MTL) and am getting the following stacktrace:

SEVERE: Uncaught exception thrown in Thread[jME3 Main,5,main]
java.lang.ClassCastException: com.jme3.asset.AssetKey cannot be cast to com.jme3.asset.TextureKey
    at com.jme3.texture.Texture.setKey(Texture.java:425)
    at com.jme3.scene.plugins.MTLLoader.loadTexture(MTLLoader.java:186)
    at com.jme3.scene.plugins.MTLLoader.readLine(MTLLoader.java:232)
    at com.jme3.scene.plugins.MTLLoader.load(MTLLoader.java:304)
    <rest omitted for brevity>

My full repo and all source code can be found here (if interested) and to run it all you need to do is run ./gradlew run, however the code of interest is this snippet from SampleApp:

public class SampleApp extends SimpleApplication {
    public static void main(String[] args) {
        new SampleApp().start();
    }

    @Override
      public void simpleInitApp() {
        Spatial spatial = assetManager.loadModel("house-ext-front/corrected.obj");
        rootNode.attachChild(spatial);

        ...
    }
}

I created these OBJ/MTL files by loading a .blend file in Blender and exporting it as Wavefront/OBJ format. Any ideas as to what is happening here?

No ideas, anyone?!

Possible solution:
Using the SDK, convert the .obj file to a .j3o file. 30% that it works first try.

EDIT: It seems like you aren’t adding a light to your rootNode. Do you have one in the model or not at all? That can also be why you can’t see it.

Hello, I am currently getting the same error. Did you found out what the problem was?

Try to convert a .blend file directly to .j3o.