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

Free Support Forum - aspose.com

Error opening CAD times

class com.aspose.cad.cadexceptions.ImageLoadException: Image loading failed: —> java.lang.NullPointerException
— End of inner exception stack trace —
com.aspose.cad.Image.a(Unknown Source)
com.aspose.cad.Image.load_internalized(Unknown Source)
com.aspose.cad.Image.f(Unknown Source)
com.aspose.cad.Image.load(Unknown Source)
Caused by: java.lang.NullPointerException
at com.aspose.cad.internal.eT.d.a(Unknown Source)
at com.aspose.cad.internal.eR.f.a(Unknown Source)
at com.aspose.cad.internal.eS.q.a(Unknown Source)
at com.aspose.cad.internal.eS.q.a(Unknown Source)
at com.aspose.cad.internal.eR.f.b(Unknown Source)
at com.aspose.cad.internal.eR.j.a(Unknown Source)
at com.aspose.cad.internal.eR.j.(Unknown Source)
at com.aspose.cad.fileformats.cad.CadImage.updateSize(Unknown Source)
at com.aspose.cad.fileformats.cad.CadImage.i(Unknown Source)
at com.aspose.cad.internal.fD.bi.load(Unknown Source)
… 11 more

PDY-26,PJD-169~183W.zip (4.3 MB)

The DWG file is in the zip file

    Image load = CadImage.load(new FileInputStream(file.getAbsoluteFile()));

This is my error code


Can you please try using Aspose.CAD for Java 20.6 using following sample code. I have not been able to observe any issue while loading on my end.

    public static void TestDWGLoad()
        String path="C:\\Users\\mudas\\Downloads\\PDY-26,PJD-169_183W\\";
        Image load = CadImage.load(path+"PDY-26PJD169183W.dwg");