[Solved] Cannot load Ogre model in the tutorial

Hello!

I can’t load any Ogre (mesh.xml) models in the jme3-testdata library. I’m currently reading the Hello Animation and Hello Picking tutorials and I need to be able to load the given models. See Hello Animation. My JME version is 3.10 stable, I use Eclipse Neon with maven and the JDK 1.8.

I get the following error : com.jme3.asset.AssetLoadException: No loader registered for type “mesh.xml”

Is it still possible to load Ogre models or it is absolutely mandatory to convert models into the j3o format?

2 Likes

Can you check the jme3-plugins is listed under libraries or w/e it is in Eclipse. I seem to remember a long time ago I had somehow removed this and ended up with this error.

3 Likes

I concur. If no loader is registered, it’s probably because your build lacks the “jme3-plugins” library.

And no, you shouldn’t need to convert models to .j3o format before loading them. The Ogre loader is included in the engine, just not in its core library. Of course, it’s more efficient to do the conversion once, rather than every time you start up your game.

2 Likes

Thanks you two! :slight_smile: I didn’t know I had to include the jme3-plugins dependency to the maven pom.xml

2 Likes

Doubtless the project could be more supportive of Eclipse/Maven users.

1 Like

All it takes for this to happen is someone who knows Eclipse/Maven to contribute to the wiki.

2 Likes

Hi,

this is Michael from germany. Please use easy english to answer.
We use Maven and Eclipse with M2clipse-Plugin in Eclipse.

I am doing first steps in JME using the Tutorials at
https://jmonkeyengine.github.io/wiki/jme3.html#tutorials-for-beginners

Right now i am on Tutorial c. Hello Assets
I think as i am not using the JM SDK i have some trouble to execute this Code Sample.

Right now we did not find a solution to include the jME3-testdata.jar as a dependency in Maven-POM

How to include and load the assets with Eclipse / Maven?

Workaround:

We downloaded jME3-testdata-3.0.0.20130526.jar from the internet and included it manually to /bin in our project and added the library manually in eclipse.

This makes us to be able to execute but it immediatly gives us an exception:

Uncaught exception thrown in Thread[jME3 Main,5,main]
com.jme3.asset.AssetLoadException: No loader registered for type "mesh.xml"
	at com.jme3.asset.ImplHandler.aquireLoader(ImplHandler.java:199)
	at com.jme3.asset.DesktopAssetManager.loadLocatedAsset(DesktopAssetManager.java:255)
	at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:373)
	at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:416)
	at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:420)
	at de.gattinger.jmonkey.examples.helloassets.HelloAssets.simpleInitApp(HelloAssets.java:51)
	at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:220)
	at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:130)
	at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:211)
	at java.lang.Thread.run(Unknown Source)

HelloAssets.java:51:

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

Howto fix this mesh.xml-Loading problem?

Thanks - Enomine

1 Like

The Ogre XML importer is in the “jme3-plugins” library.
The “jme3-plugins” library is available from

<dependency>
  <groupId>org.jmonkeyengine</groupId>
  <artifactId>jme3-plugins</artifactId>
  <version>3.1.0-stable</version>
  <type>pom</type>
</dependency>

The test data is available from

<dependency>
  <groupId>org.jmonkeyengine</groupId>
  <artifactId>jme3-testdata</artifactId>
  <version>3.1.0-stable</version>
  <type>pom</type>
</dependency>

In the future, please start a new forum topic for your troubleshooting requests, rather than tagging onto an existing one.

1 Like

Hey sgold,

thank you for your help =)
Well it was exactly the SAME Problem and only 14 days old, so i was to write in it. In other forums they say “please search for old threads for get answers on questions already asked”

Thanks - Enomine

1 Like

Hey sgold,

<dependency>
  <groupId>org.jmonkeyengine</groupId>
  <artifactId>jme3-plugins</artifactId>
  <version>3.1.0-stable</version>
  <type>pom</type>
</dependency>

This was not a solution for the problem. The line pom has to be deleted as my understanding. Deleting it causes that the plugins.jar is downloaded automatically from maven. This causes the error "com.jme3.asset.AssetLoadException: No loader registered for type “mesh.xml” to be fixed. But a new error will appear:

<dependency>
  <groupId>org.jmonkeyengine</groupId>
  <artifactId>jme3-testdata</artifactId>
  <version>3.1.0-stable</version>
  <type>pom</type>
</dependency>

The teapot.obj can not be loaded because it is not found. Here the pom has to deleted and the manual downloaded testdata.jar has to copied to m2\repository\org\jmonkeyengine\jme3-testdata\3.1.0-stable and renamed from 3.0.0xxxxxx.jar to 3.1.0-stable.jar.
After this changes the example was executed succesfully.

BUT:

I there a online repository i can get the artefact testdata3.1.0-stable automatically downloaded with maven?

Thanks - Enomine

1 Like

The URL of the repository containing jme3-testdata is:

https://dl.bintray.com/stephengold/org.jmonkeyengine