We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Conversion .obj to .glb fails with an Exception

Hi,

I am trying to convert .obj files to .glb, but I am facing Exceptions:

Caused by: com.aspose.threed.ExportException at com.aspose.threed.c.a(SourceFile:19117) at com.aspose.threed.Scene.save(SourceFile:573) at com.aspose.threed.Scene.save(SourceFile:636) at com.aspose.threed.Scene.save(SourceFile:649)

After Debugging into Aspose, I was able to get the following Stacktrace inside the catch block, where the ExportException is thrown.

java.lang.NullPointerException at com.aspose.threed.dk.a(SourceFile:8315) at com.aspose.threed.dk.a(SourceFile:16742) at com.aspose.threed.dk.a(SourceFile:1167) at com.aspose.threed.dk.a(SourceFile:23120) at com.aspose.threed.dk.b(SourceFile:1210) at com.aspose.threed.dk.a(SourceFile:3237) at com.aspose.threed.c.a(SourceFile:19105) at com.aspose.threed.Scene.save(SourceFile:573) at com.aspose.threed.Scene.save(SourceFile:636) at com.aspose.threed.Scene.save(SourceFile:649)

Here is my Code:

`var filePath = “C:\develop\test\”;
var fileName = “al.obj”;

FileFormat fileFormat = FileFormat.detect(filePath + fileName);
Scene scene = new Scene();
scene.open(filePath + fileName, fileFormat);

GLTFSaveOptions gltfSaveOptions = new GLTFSaveOptions(FileContentType.BINARY);
scene.save(filePath + FilenameUtils.getBaseName(fileName) + “.glb”,
gltfSaveOptions);`

I used the Maven artifact version 19.2 and took the al.obj file for testing from here: https://people.sc.fsu.edu/~jburkardt/data/obj/obj.html

What am I doing wrong? Thank you for your help.

1 Like

@mst-1

Thank you for contacting support.

We have worked with the data shared by you and have been able to reproduce the issue in our environment. A ticket with ID THREEDJAVA-43 has been logged in our issue management system for further investigation and resolution. The ticket ID has been linked with this thread so that you will receive notification as soon as the ticket is resolved.

We are sorry for the inconvenience.

1 Like

Hi,

are there any updates on this topic?

@daniel.lueckecrossme

We are glad to inform you that THREEDJAVA-43 has been resolved for Aspose.3D for Java 19.4 which will tentatively be released within this week. We will let you know as soon as it will be published. We appreciate your patience and cooperation in this regard.