HelloAssets tutorial doesn't work

Hello, I’m following along with the tutorials but hit a busted one pretty quickly. I saw another post on here for a problem with the same tutorial, but his fix doesn’t work for me.



I’m getting a NPE when initializing the HelloAssets class:



Jun 7, 2011 5:09:38 PM com.jme3.asset.DesktopAssetManager loadAsset

WARNING: Cannot locate resource: Models/Teapot/Teapot.obj

Jun 7, 2011 5:09:38 PM com.jme3.material.MaterialDef

INFO: Loaded material definition: Debug Normals

Jun 7, 2011 5:09:38 PM com.jme3.app.Application handleError

SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]

java.lang.NullPointerException

at jme3test.helloworld.HelloAssets.simpleInitApp(HelloAssets.java:31)

at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:218)

at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:138)

at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:206)

at java.lang.Thread.run(Thread.java:619)



I’m using the code verbatim from https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:beginner:hello_asset



It can’t find the teapot model, I guess. I can’t either, anywhere in the project tree (or any other models). Maybe it didn’t unpack or load the models properly when I created the project. I created the project as a JME3->BasicGame project. I’m assuming the Teapot.obj file should be in Project Assets → Models, but I don’t know where it comes from. I haven’t been able to find it in JAR files so far…



This is using JME3 alpha 4 on Windows 7



Thanks,

Josh

http://i.imgur.com/oMj8s.png

Oops, sorry, not sure how I missed that… Thanks.

Hi,

I know I should let the dead rest, but I didn’t want to open a new Topic for my question ^^.

I am just facing the same problem and I have done as instructed and imported the jme3-test-data library. Is there anything else I have to do?



reg



Victor



Sysinfo:

Product Version: jMonkeyPlatform Alpha-4

Java: 1.7.0; Java HotSpot™ 64-Bit Server VM 21.0-b17

System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (jmonkeyplatform)

you might have to update to the nightly version of jme. Go to tools > plugins > settings > update to nightly, click check everyday, then restart jme, and update everything, see if that helps

Not really, the test data should be in alpha-4 as well, only some tests might be outdated.

maybe, but it seems to fix any problems i have :stuck_out_tongue:

Nope, still won’t work. But now the exception thrown is a little bit longer:



SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]

com.jme3.asset.AssetNotFoundException: Models/Teapod/Teapod.obj

at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:239)

at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:376)

at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:386)

at jme3test.helloworld.HelloAssets.simpleInitApp(HelloAssets.java:28)

at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:230)

at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:129)

at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:205)

at java.lang.Thread.run(Thread.java:722)




I also noticed this warning when performing a clean-build.



warning: [options] bootstrap class path not set in conjunction with -source 1.5

1 warning

Are you sure you add the right jar file?



The jar file is named: jME3-testdata.jar



Which IDE do you use?

I use the NetBeans-IDE provided together with the jme (downloaded it from jmonkeyengine.com).

I’ve added the jme3-test-data to the libraries just as described in the tutorial.

Additionaly I added the com-jme3-gde-project-testdata.jar from …/…/modules and the

jme3testdata.jar from …/…/libs directly, but this didn’t help either.

Edit:

I’ve found the jME3-testdata.jar somewhere deep inside my home-directory. After adding the application runs properly. Its funny that adding the library doesn’t work (cause if I just add the jme3-test-data library it won’t work again).

Anyway, thank you very much for your help^^

Oh monkey,

I feel sorry but I am using eclipse in connection with java :frowning:

How does look your Project Assets in the IDE on the left side, there are some folder

are they empty? May you have to add the teapot mesh by your own?

Give it a try

If it won’t work we have to wait until normen give you the solution



In my eye’s he is king kong and solves every problem^^

“Models/Teapod/Teapod.obj”

Teapod? iTea?

Oh boy…I just go and stand in the corner… :expressionless:

Now that you metion it, I just pasted the code from the wiki before adding the .jar. No wonder it worked then…



Again, thank you very much.

July 2018 → The asset is missing…

https://imgur.com/a/7kePNyw

It’s on GitHub. There is no test data on maven. You have to pull it and build it or just download whatever you want.

1 Like

What am I missing here?

Hes using the SDK, the test-data library is there and the code completion shows the asset exists?

The image shows no updates dialog.

I see whats up. The teapot folder in test-data does not have the .j3o.

There is no material file for this model. The .mtl file shows up as gray when converting obj to j3o. The tutorial shows a physcedelic material is used.

A quick fix for the poster is to drag and drop the Teapot.obj and Teapot.mtl files from the test-data library to your asset folder “Models”. Then convert it to j3o by RMB selecting the obj and choosing convert to j3o or just change the file extension for loadModel from j3o to obj and load it from test-data.

Edit: The tutorial already says use “Models/Teapot/Teapot.obj” so I still don’t get why this was posted.

For my part, I’m going to stop using this. It will be because it is a free project, but I have already noticed several inconsistencies that leave me with a bad learning experience.

Greetings to all.