16:48:26 [http-bio-8080-exec-4] ERROR com.jniwrapper.win32.automation.types.SafeArray(69) - Failed to release SafeArray object by handle: 6308280' in Thread: http-bio-8080-exec-4
com.jniwrapper.FunctionExecutionException: c0000005
at com.jniwrapper.Function.invokeCFunc(Native Method) ~[jniwrap-3.11.jar:?]
at com.jniwrapper.FunctionCall.a(SourceFile:127) ~[jniwrap-3.11.jar:?]
at com.jniwrapper.FunctionCall.call(SourceFile:35) ~[jniwrap-3.11.jar:?]
at com.jniwrapper.Function.invoke(SourceFile:188) ~[jniwrap-3.11.jar:?]
at com.jniwrapper.Function.invoke(SourceFile:212) ~[jniwrap-3.11.jar:?]
at com.jniwrapper.win32.be.b(SourceFile:1270) [comfyj-2.13.jar:?]
at com.jniwrapper.win32.automation.types.SafeArray.release(SourceFile:958) [comfyj-2.13.jar:?]
at com.jniwrapper.win32.jexcel.Worksheet.fillWithArray(Unknown Source) [jexcel-1.8.jar:?]
List<Variant[]> al = new ArrayList<Variant[]>();
//Foreach row in db:
while (rsData.next()) {
Variant[] all = new Variant[5];
Variant variant = new Variant("Text");
variant.setAutoDelete(false);
all[0] = variant;
// same for all[1] to all[4]
al.add(all);
}
Variant tmpa[][] = new Variant[26280][5];
for (int c = 0; c < 26280; c++)
System.arraycopy(al.get(c), 0, tmpa[c], 0, 5);
//logging: filling-> A6:E26285
logger.trace("filling-> A6:" + Character.toString((char) (65 + 5 - 1)) + Integer.toString(alSize + 5));
sheet.fillWithArray("A6:" + Character.toString((char) (65 + 5 - 1)) + Integer.toString(alSize + 5), tmpa);
WARNING in native method: JNI call made with exception pending
at com.jniwrapper.Function.invokeCFunc(Native Method)
at com.jniwrapper.FunctionCall.a(SourceFile:127)
at com.jniwrapper.FunctionCall.call(SourceFile:35)
at com.jniwrapper.Function.invoke(SourceFile:188)
at com.jniwrapper.Function.invoke(SourceFile:212)
at com.jniwrapper.win32.be.b(SourceFile:1270)
at com.jniwrapper.win32.automation.types.SafeArray.release(SourceFile:958)
at com.jniwrapper.win32.jexcel.Worksheet.fillWithArray(Unknown Source)
The exceptions that you have provided are related to the automatic memory management in JExcel.
The Variant.setAutoDelete(false) method called in your code indicates that this Variant is not released automatically and should be released in your code when it is not necessary anymore.
It is possible that this is the cause of the memory management issue in your case.
Could you please try removing the variant.setAutoDelete(false)
call from your implementation and let me know if this resolves the issue?
If the issue persists, could you please provide a complete Java sample that can be used to reproduce it?
--
You received this message because you are subscribed to the Google Groups "JExcel Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jexcel-forum+unsubscribe@teamdev.com.
To view this discussion on the web visit https://groups.google.com/a/teamdev.com/d/msgid/jexcel-forum/5fe80409-52f2-461f-aede-73b59dbf6ac1%40teamdev.com.