hi,

I haven't used the vrml loader yet, but this looks like an error that
occured while parsing the vrml file or an invalid image url.
Have you made a syntax-check of the file with a vrml viewer
(cosmoworlds, vrml plug in,...) ?

Gernot

On Thu, 20 Jul 2000 13:35:26 +0200, Desiree Hilbring wrote:

>Hi,
>I downloaded the x3d.jar and included a vrml loader in my
>application. Then I tried to read some wrl files.
>It is quitting every time, the loader is trying to read an image with:
>
>E:/vrml/claddingpanel.wrl
>Error: in loading image
>Exception: java.lang.NullPointerException
>Last token was "}" at line 1786
>java.lang.NullPointerException
>        at
>com.sun.j3d.utils.image.TextureLoader.getTexture(TextureLoader.
java:4
>06)
>        at
>com.sun.j3d.loaders.vrml97.impl.ImageTexture.doChangeUrl(Imag
eTexture
>.java:138)
>        at
>com.sun.j3d.loaders.vrml97.impl.ImageTexture.initImpl(ImageText
ure.ja
>va:78)
>        at
com.sun.j3d.loaders.vrml97.impl.Parser.Node(Parser.java:527)
>...
>
>or sometimes with other errors
>
>What is the problem?
>
>Is there a tutorial how to use the x3d.jar package?
>
>I did manage to see some simple objects like a box.
>
>
>This is my class which is loading the wrl-file:
>
>public class VrmlViewer {
>    Layer3D layer3d;
>
>
>    public VrmlViewer(String urlName) {
>        layer3d = new Layer3D();
>        VrmlLoader vrml = new VrmlLoader();
>        try {
>            Scene sc = vrml.load(urlName);
>            layer3d.addVrmlScene(sc.getSceneGroup());
>        }
>        catch (FileNotFoundException ex) {
>            System.err.println("File not found: "+ ex.getMessage());
>        }
>    }
>
>    public Layer3D createLayer3D() {
>        return layer3d;
>    }
>
>}
>
>Here I am adding the BranchGroup from the VrmlScene in my
>Java3D-Scenegraph:
>
>  public void addVrmlScene(BranchGroup bg) {
>        layertrans.addChild(bg);
>    }
>
>Thanks for any help, Desiree
>
>
>
>
>
>o------------------------------------------------------------------------o
>| Desiree Hilbring      Institut fuer Photogrammetrie und
Fernerkundung  |
>|                       Universitaet Karlsruhe, Germany                  |
>|                                                                        |
>|                       email: [EMAIL PROTECTED]             |
>|                       # 0721 6083676                                   |
>o------------------------------------------------------------------------o
>
>==================================================
=========================
>To unsubscribe, send email to [EMAIL PROTECTED] and include
in the body
>of the message "signoff JAVA3D-INTEREST".  For general help,
send email to
>[EMAIL PROTECTED] and include in the body of the message
"help".

[EMAIL PROTECTED]

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to