[SOLVED] AssetLoadException: No loader registered for type "mesh.xml"

I’m following the tutorial from
https://wiki.jmonkeyengine.org/jme3/beginner/hello_asset.html
but it fails with the following error:
AssetLoadException: No loader registered for type "mesh.xml"

The line causing the problem is:

Spatial ninja = assetManager.loadModel(“Models/Ninja/Ninja.mesh.xml”);

I am working with maven and importing the dependency “jme3-plugins”, which should have fixed the issue. The version of jmonkeyengine is “3.2.3-stable”.

<dependency>
      <groupId>org.jmonkeyengine</groupId>
      <artifactId>jme3-plugins</artifactId>
      <version>${jmonkey.version}</version>
      <type>pom</type>
</dependency>

I have used the code exactly as it is written in the tutorial, so I am at a loss of what the problem might be.

I don’t know much about Maven. However, you can explicitly register the required loader using:

    assetManager.registerLoader(com.jme3.scene.plugins.ogre.MeshLoader.class, "meshxml", "mesh.xml");

In a typical desktop configuration, this registration is performed automatically when the AssetManager is created, while reading the General.cfg asset.

The com.jme3.scene.plugins.ogre package is not on my classpath. Is there a specific jar i must import for it?

1 Like

The artifact you want is jme3-plugins:
Version jme3-plugins/3.2.3-stable - jmonkeyengine

just a note, if you dont need to use ogre loader, blender/jme gltf exporter workflow seems to be stable now.(at least i seen only one serious animation issue that will be solved on days/weeks)

ogre is nice, but gltf is kind of future.

I’m no maven expert, but I think a pom dependency is probably not what you want. Just remove the <type> section and see what happens.

1 Like

@pspeed: Thank you, that was the issue. I can’t believe I did that mistake.

1 Like