[英]GC overhead limit exceeded when reading large xls file
When I run my project in Netbeans IDE (compiling it and testing it), it works fine. 当我在Netbeans IDE中运行我的项目(对其进行编译和测试)时,它可以正常工作。 It enables me reading xls file with size of 25000 rows and extract all the infromation above, then save them into database.
它使我能够读取25000行大小的xls文件并提取上面的所有信息,然后将它们保存到数据库中。
The problem appears when I generate the installer and deliver it. 当我生成安装程序并将其交付时,会出现问题。 When I install my application and run it, I obtain that error:
当我安装应用程序并运行它时,出现该错误:
java.lang.OutOfMemoryError: GC overhead limit exceeded
at jxl.read.biff.File.read(File.java:217)
at jxl.read.biff.Record.getData(Record.java:117)
at jxl.read.biff.CellValue.<init>(CellValue.java:94)
at jxl.read.biff.LabelSSTRecord.<init>(LabelSSTRecord.java:53)
at jxl.read.biff.SheetReader.read(SheetReader.java:412)
at jxl.read.biff.SheetImpl.readSheet(SheetImpl.java:716)
at jxl.read.biff.WorkbookParser.getSheet(WorkbookParser.java:257)
at com.insy2s.importer.SemapExcelImporter.launchImport(SemapExcelImporter.java:82)
at//staff
I even user POI libraries but I got same scenario. 我什至使用了POI库,但情况相同。
UPDATE: 更新:
In messages.log file of my application, I found this strange values (I have changed them in netbeans.conf ) 在我的应用程序的messages.log文件中,我发现了这个奇怪的值(已在netbeans.conf中 更改了它们)
Input arguments:
-Xms24m
-Xmx64m
-XX:MaxPermSize=256m
-Dnetbeans.user.dir=C:\Program Files\insy2s_semap_app
-Djdk.home=C:\Program Files\Java\jdk1.8.0_05
-Dnetbeans.home=C:\Program Files\insy2s_semap_app\platform
OK, I got the answer... Let's begin from the beginning. 好,我得到了答案...让我们从头开始。
It is true that Microsoft documents hanlders' libraries need much resources but not so bad to cause application running failure as I thought at the beginning. 的确,Microsoft文档处理程序的库需要大量资源,但并不会像我一开始所认为的那样造成应用程序运行失败。 In fact, that probleme has revealed to me a weakness and a shortage.
实际上,这个问题向我揭示了一个弱点和不足。
Because of working with Netbeans 8.0.2, the new property 由于使用了Netbeans 8.0.2,因此新属性
app.conf
app.conf
should be taken into consideration. 应该考虑在内。 It has all what needed to configure our applications.
它具有配置我们的应用程序所需的全部内容。 But it is not possible to edit it directly so to increase the max permitted memory, we have to change the values in
但是无法直接对其进行编辑,因此要增加最大允许的内存,我们必须更改
harness/etc/app.conf
线束的/ etc / app.conf
in netbeans installation directory. 在netbeans安装目录中。 For more details look here .
有关更多详细信息,请单击此处 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.