Hi,
This error happens sometimes, don’t know to define the differentiating circumstance.
Are you familiar with this error? What is the reason?
The error is generated when this line is called:
<span style=“font-family: “Courier New”; font-size: 10.8pt; color: rgb(102, 14, 122); font-weight: bold;”>workbook <span style=“font-family: “Courier New”; font-size: 10.8pt; background-color: rgb(255, 255, 255);”>= <span style=“font-family: “Courier New”; font-size: 10.8pt; color: rgb(0, 0, 128); font-weight: bold;”>new <span style=“font-family: “Courier New”; font-size: 10.8pt; background-color: rgb(255, 255, 255);”>Workbook(getClass().getResourceAsStream(<span style=“font-family: “Courier New”; font-size: 10.8pt; color: rgb(102, 14, 122); font-weight: bold; font-style: italic;”>EXCEL_TEMPLATE<span style=“font-family: “Courier New”; font-size: 10.8pt; background-color: rgb(255, 255, 255);”>));
workbook is a class member of type <span style=“font-family: “Courier New”; font-size: 10.8pt; background-color: rgb(228, 228, 255);”>Workbook. <span style=“color: rgb(102, 14, 122); font-style: italic; font-weight: bold; font-family: “Courier New”; font-size: 10.8pt; background-color: rgb(255, 255, 255);”>EXCEL_TEMPLATE is a constant refering to an xlsx file in the jar.
Following is the top potion of the stack trace (starting with the failing CTOR call):
"java.lang.NoClassDefFoundError: Could not initialize class sun.java2d.Disposer sun.java2d.Disposer.addRecord(Disposer.java:110)
sun.awt.image.BufImgSurfaceData.initRaster(Native Method)
sun.awt.image.BufImgSurfaceData.createDataIC(BufImgSurfaceData.java:258)
sun.awt.image.BufImgSurfaceData.createData(BufImgSurfaceData.java:91)
sun.awt.image.BufImgSurfaceManager.(BufImgSurfaceManager.java:55)
sun.awt.image.SurfaceManager.getManager(SurfaceManager.java:79)
sun.java2d.SurfaceData.getPrimarySurfaceData(SurfaceData.java:273)
sun.java2d.SunGraphicsEnvironment.createGraphics(SunGraphicsEnvironment.java:185)
sun.java2d.HeadlessGraphicsEnvironment.createGraphics(HeadlessGraphicsEnvironment.java:89)
java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1182)
java.awt.image.BufferedImage.getGraphics(BufferedImage.java:1170)
com.aspose.cells.b.a.b.zi.a(Unknown Source)
com.aspose.cells.a.d.zfq.A(Unknown Source)
com.aspose.cells.a.d.zfq.a(Unknown Source)
com.aspose.cells.WorksheetCollection.(Unknown Source)
com.aspose.cells.Workbook.a(Unknown Source)
com.aspose.cells.Workbook.(Unknown Source)
…
Thanks, Neva