I receive java core, when I try to load document into library(file is attached).
I understand that it is not directly related to library, rather it is some kind of problem of environment.
I have posted it hear hoping that you’ve faced with similar problems and may suggest what can possibly be causing these cores.
The strange thing about this situation is that we have environment with the same OS and the same set of fonts, which doesn’t have any problems.
Below is relevant snippet taken from core log:
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j sun.font.FontManager.getFontPath(Z)Ljava/lang/String;+0
v ~StubRoutines::call_stub
J sun.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
J sun.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
J java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
j com.aspose.cells.a.d.co.o()V+60
j com.aspose.cells.a.d.co.
(Z)V+41
j com.aspose.cells.WorkbookSettings.(Lcom/aspose/cells/Workbook;I)V+291
j com.aspose.cells.Workbook.a(Lcom/aspose/cells/b/a/d/m;Lcom/aspose/cells/LoadOptions;Z)V+14
j com.aspose.cells.Workbook.(Ljava/io/InputStream;)V+116
Environment information with core:
# uname -a
Linux stg-ui3.aws 2.6.18-348.3.1.el5xen #1 SMP Mon Mar 11 20:28:48 EDT 2013 x86_64 x86_64 x86_64 GNU/Linux
# lsb_release -a
LSB Version: :core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 5.9 (Final)
Release: 5.9
Codename: Final
Environment information, which doesn’t experience problems:
# uname -a
Linux bamboo.aws 2.6.21.7-2.fc8xen #1 SMP Fri Feb 15 12:34:28 EST 2008 x86_64 x86_64 x86_64 GNU/Linux
# lsb_release -a
LSB Version: :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 5.9 (Final)
Release: 5.9
Codename: Final
Hi,
-DAspose.Cells.Disable=SunFontManager
It is not working. Doesn’t disable sun.font.FontManager.
I have added it and still have the same java core.
Debugged it on local machine and see that library with this flag still access sun.font.FontManager.
Using aspose-cells-7.4.3.
Tried upgrade/downgrade library version and see if this flag works there.
7.4.3.5 /7.3.5 - doesn’t work there as well.
Listed environment properties just before the passing InputStream to library and can see that parameter is not filtered somewhere and indeed present:
– listing properties –
java.runtime.name=Java™ SE Runtime Environment
sun.boot.library.path=C:\Program Files (x86)\Java\jdk1.6.0_…
java.vm.version=20.4-b02
Aspose.Cells.Disable=SunFontManager
java.vm.vendor=Sun Microsystems Inc.
java.vendor.url=http://java.sun.com/
path.separator=;
java.vm.name=Java HotSpot™ Client VMfile.encoding.pkg=sun.io
user.country=US
sun.java.launcher=SUN_STANDARD
…
Hi,
It should take effect if you add the correct property and value pair to JVM option. Or please use the following code in your application before referring to any class/API of Aspose.Cells:
System.setProperty("Aspose.Cells.Disable", "SunFontManager");
Or please try another jvm option:
-Djava.awt.headless=true
to check whether they can work on your end.
Thank you.
JVM option is set and present, but library still make calls to to sun.font.FontManager.
Please see the video.
I cast it from run on my machine.
Thanks for cooperation
Thanks for your posting and using Aspose.Cells for Java.
It is very strange that those options take no effect for your application. All other users with the same problem can solve it by adding those options. Would you please print out the version of aspose.cells in your code to make sure you have been using the right one? Such as add one line like following:
System.getProperties().list(System.out);
Sure. See attached.
Hi,
Could you tell me how exactly do you log additional information?
We use log4j in project. Just in case turned on debug logging for log4j, but nothing there as well (also I did not recall Aspose.Cells documentation stating usage of this library).
I don’t see anything new in logs, except for the fact that FontManager is called only one time, when document is loaded into file.
– listing properties –
java.runtime.name=Java™ SE Runtime Environment
sun.boot.library.path=C:\Program Files (x86)\Java\jdk1.6.0_…
java.vm.version=20.4-b02
Aspose.Cells.Disable=SunFontManager
java.vm.vendor=Sun Microsystems Inc.
java.vendor.url=http://java.sun.com/
path.separator=;
java.vm.name=Java HotSpot™ Client VMfile.encoding.pkg=sun.io
user.country=US
sun.java.launcher=SUN_STANDARD
sun.os.patch.level=Service Pack 1
java.vm.specification.name=Java Virtual Machine Specification
user.dir=C:\Projects\SmartLling\SVN\branch\web…
java.runtime.version=1.6.0_29-b11
java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment
java.endorsed.dirs=C:\Program Files (x86)\Java\jdk1.6.0_…
os.arch=x86
java.io.tmpdir=C:\Users\User\AppData\Local\Temp<br>line.separator=
java.vm.specification.vendor=Sun Microsystems Inc.
user.variant=
os.name=Windows 7
sun.jnu.encoding=Cp1251
java.library.path=C:\Program Files (x86)\Java\jdk1.6.0_…
java.specification.name=Java Platform API Specification
java.class.version=50.0
sun.management.compiler=HotSpot Client Compiler
os.version=6.1
user.home=C:\Users\User
user.timezone=Europe/Helsinki
java.awt.printerjob=sun.awt.windows.WPrinterJob
file.encoding=UTF-8
java.specification.version=1.6
user.name=User
java.class.path=C:\Program Files (x86)\JetBrains\Inte…
java.vm.specification.version=1.0
sun.arch.data.model=32
java.home=C:\Program Files (x86)\Java\jdk1.6.0_…
sun.java.command=com.intellij.rt.execution.junit.JUnit…
java.specification.vendor=Sun Microsystems Inc.
user.language=en
awt.toolkit=sun.awt.windows.WToolkit
java.vm.info=mixed mode
java.version=1.6.0_29
java.ext.dirs=C:\Program Files (x86)\Java\jdk1.6.0_…
sun.boot.class.path=C:\Program Files (x86)\Java\jdk1.6.0_…
java.vendor=Sun Microsystems Inc.
java.awt.headless=true
file.separator=<br>java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport…
sun.cpu.endian=little
sun.io.unicode.encoding=UnicodeLittle
sun.desktop=windows
sun.cpu.isalist=pentium_pro+mmx pentium_pro pentium+m…
7.5.0.0D
Method ‘sun.font.FontManager.getFontPath()’ entered at sun.font.FontManager.getFontPath(FontManager.java:-1)
Method breakpoint reached. Method ‘sun.font.FontManager.getFontPath()’ is about to exit at sun.font.FontManager.getFontPath(FontManager.java:-1)
Let me know if I can help somehow and thank you for persisting with this investigation.
Hi,
Guys, I am willing to chat with someone directly, lets say in Skype and can arrange remote desktop connection via join-me.
Let me know if that is an option for you.
Because I have no idea why debug version of library is not printing anything.
I did not see any additional log string, because options were present.
I just removed -DAspose.Cells.Disable=SunFontManager -Djava.awt.headless=true from VM options and can see now:
No property value found for Aspose.Cells.Disable. Try it again and result is: null
No property value found for java.awt.headless. Try it again and result is: null
When I put them back messages disappear, but there is still one invocation to
FontManager.getFontPath()
Hi,
Hi,
Unfortunately it did not resolve the issue - I still have java core on the machine and can see that sun.font.FontManager is used on my machine.
Attached video.
Is there anything else you could advise to do?
We have set up all the machines with equal set of fonts, but that didn’t resolve the problem. Still having java cores on some of them.
At the moment I am stuck. We can’t release code into production with library which might cause java-cores. I would really appreciate help.
Thanks
Hi,
Hi,
It seems that switching to library version of Jdk14 helped.
I can still see calls to FontManager on my local environment, but java cores from other machines disappeared.
Thanks for the help.