Free Support Forum - aspose.com

Upgrade to Aspose.Cells 20.7

Hi Aspose team.
We’ve been using aspose cells for java version. 19.2 and we’re trying to update to the latest version 20.7.
Since the Update we noticed that the class HTMLLoadOptions was removed, and replaced by the HtmlLoadOptions.
But in our project, we are not able to use the class HtmlLoadOptions.

Our project is a java 8 project, and we are using the foollowing dependecy on our pom.xml file:

com.aspose
aspose-cells
20.7

Are we doing something wrong?

Kind regads,
Paulo Pereira

@paulo_pereira,

I tested using the following sample code with a simple template file using latest version/fix, it works fine and I do not find any issue whatsoever:
e.g
Sample code:

HtmlLoadOptions opts = new HtmlLoadOptions(LoadFormat.HTML);
        opts.setAutoFitColsAndRows(true);
        Workbook workbook = new Workbook("f:\\files\\Book1.html", opts);
		workbook.save("f:\\files\\out1.xlsm", SaveFormat.XLSM); 

Could you paste your sample code and attach your input HTML file, we will check it soon.

Hi @Amjad_Sahi,
Thank you for your quick response.
Is this version compatible with jdk8?

Regards,
Paulo

@paulo_pereira,

Yes, the latest version is compatible with JDK >= 1.6 (e.g 1.6, 1.7, 1.8, 1.9, 10, etc. and so on…).

Hi @Amjad_Sahi,
Thank you for the feedback.

We are using Aspose Cells, Words and Pdf in our project. Our current working version of the 3 products is 19.2 and all are working without issues.

We are currently working on an update of the three products to the latest versions e.g. 20.7.
But unfortunately we can’t compile the project with this version.

Our project is under a JDK8 environment, and we find out that this issue started to happen after the Aspose 19.10, we are not able to compile the project after this version (between 19.10 and 20.7).

We are using maven.
Are you aware of this problem?

Kind regards,
Paulo Pereira

@paulo_pereira,

Yes, Aspose.Cells for Java v20.7 works fine on JDK1.8 without any issue. I now tested using our latest version/fix (e.g Aspose.Cells for Java v20.8.x) with JDK1.8 (exact Java version is: 1.8.0_191), it works fine. What is compile time error or exception you are getting? May be you could use fully qualified naming when defining the object(s) for HtmlLoadOptions in code, e.g you may try to define objects like following:
com.aspose.cells.HtmlLoadOptions opts = new com.aspose.cells.HtmlLoadOptions(com.aspose.cells.LoadFormat.HTML);

Also, to evaluate the issue precisely, we need simulation sample code (runnable) that could reproduce the issue on our end. Also, give us your exact JDK version. We also recommend if you could create a separate Java program (runnable) with minimum code to provide us that will demonstrate the issue.

Hi @Amjad_Sahi,
Thank you for the feedback.
The error related to the class HtmlLoadOptions was solved.

The problem now is that if we update on our pom.xml to the latest version of one of your products (Cells, Word, or PDF) the project fails to compile.

The exception is the following when we do mvn clean package:

SLF4J: Failed toString() invocation on an object of type [aQute.bnd.osgi.FileResource]

Reported exception:

[ INFO ] ------------------------------------------------------------------------

[ INFO ] BUILD FAILURE

[ INFO ] ------------------------------------------------------------------------

[ INFO ] Total time: 09:39 min

[ INFO ] Finished at: 2020-08-31T17:03:42+01:00

[ INFO ] ------------------------------------------------------------------------

[ ERROR ] Java heap space -> [Help 1]

java.lang.OutOfMemoryError : Java heap space

at java.util.Arrays.copyOfRange ( Arrays.java:3664 )

at java.lang.String. ( String.java:207 )

at java.lang.StringBuilder.toString ( StringBuilder.java:407 )

at java.lang.Throwable.toString ( Throwable.java:482 )

at java.lang.String.valueOf ( String.java:2994 )

at org.fusesource.jansi.FilterPrintStream.println ( FilterPrintStream.java:238 )

at java.lang.Throwable$WrappedPrintStream.println ( Throwable.java:749 )

at java.lang.Throwable.printStackTrace ( Throwable.java:656 )

at java.lang.Throwable.printStackTrace ( Throwable.java:644 )

at java.lang.Throwable.printStackTrace ( Throwable.java:635 )

at org.slf4j.helpers.Util.report ( Util.java:124 )

at org.slf4j.helpers.MessageFormatter.safeObjectAppend ( MessageFormatter.java:302 )

at org.slf4j.helpers.MessageFormatter.deeplyAppendParameter ( MessageFormatter.java:271 )

at org.slf4j.helpers.MessageFormatter.arrayFormat ( MessageFormatter.java:233 )

at org.slf4j.helpers.MessageFormatter.arrayFormat ( MessageFormatter.java:173 )

at org.slf4j.helpers.MessageFormatter.format ( MessageFormatter.java:151 )

at org.slf4j.impl.SimpleLogger.formatAndLog ( SimpleLogger.java:354 )

at org.slf4j.impl.SimpleLogger.debug ( SimpleLogger.java:454 )

at aQute.bnd.osgi.Clazz.parseClassFileData ( Clazz.java:516 )

at aQute.bnd.osgi.Clazz.parseClassFileData ( Clazz.java:509 )

at aQute.bnd.osgi.Clazz.parseClassFileWithCollector ( Clazz.java:494 )

at aQute.bnd.osgi.ClassDataCollectors.parse ( ClassDataCollectors.java:32 )

at aQute.bnd.osgi.Analyzer.analyze ( Analyzer.java:239 )

at aQute.bnd.osgi.Builder.analyze ( Builder.java:387 )

at aQute.bnd.osgi.Analyzer.calcManifest ( Analyzer.java:694 )

at org.apache.felix.bundleplugin.ManifestPlugin.getAnalyzer ( ManifestPlugin.java:296 )

at org.apache.felix.bundleplugin.ManifestPlugin.execute ( ManifestPlugin.java:98 )

at org.apache.felix.bundleplugin.BundlePlugin.execute ( BundlePlugin.java:384 )

at org.apache.felix.bundleplugin.BundlePlugin.execute ( BundlePlugin.java:375 )

at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo ( DefaultBuildPluginManager.java:137 )

at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojoImpl ( MojoExecutor.java:172 )

at org.twdata.maven.mojoexecutor.MojoExecutor$ExecutionEnvironmentM3.executeMojo ( MojoExecutor.java:476 )

[ ERROR ]

[ ERROR ]

[ ERROR ] For more information about the errors and possible solutions, please read the following articles:

[ ERROR ] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/OutOfMemoryError

Please note that the only difference is an update from aspose pdf/cells/word 19.2 to version 20.7, and this is happening with all versions since 19.10.

Kind regards,
Paulo Pereira

@paulo_pereira,
I have tried to add reference to the latest versions of multiple products i.e. Aspose.Cells, Aspose.Word and Aspose.PDF simultaneously in the pom.xml file but could not observe any issue. Could you please share a simplest project having the pom.xml file and sample code (if any)for our testing. We will reproduce the issue here and share the feedback.
For your reference here is my pom.xml file:
pom.zip (658 Bytes)

Hi @ahsaniqbalsidiqui and @Amjad_Sahi,
Thank you for the feedback.

We are using your products on a Jira project plugin. So this happens when we use the Atlassian SDK to compile the project.
We use the following command to build the project.
atlas-mvn clean package
Notice that if we compile the project without the Atlassian SDK “mvn clean package” the project compiles.
Please download the sample project from here : https://xpand-my.sharepoint.com/:u:/g/personal/paulo_pereira_xpand-it_com/ESzrWnn1c2tKkZf0qzIJ6VwBTCdrvYR5hbZiUCZe1-pHAQ?e=arLMcK

We are using Atlassian SDK 8.0.7.

Could you please help us understand why this is happening?
Note that this only happens when we update your products for versions higher that 19.10.

Kind regards,
Paulo Pereira

@paulo_pereira,
We have reviewed this information and need to analyze it in detail. It is logged in our database for further investigation and you will be notified here once any update is ready for sharing.

This issue is logged as:
CELLSJAVA-43312 - Exception raised while compiling an Atlasian SDK based project using Aspose.Cells, Apose.Words and Aspose.PDF on a Jira Project Plugin

Hi @ahsaniqbalsidiqui,

Did you have any update on this?
Kind regards,
Paulo Pereira

@paulo_pereira,
We are gathering information about it and will share our feedback soon.

Hi @ahsaniqbalsidiqui,
Thank you for the feedback.
Could you please add to this post my colleague Hugo Freixo?
hugo.freixo@xpand-it.com

Kind regards,
Paulo Pereira

@paulo_pereira, @Hugo_Freixo,
Sure, we will inform here once any update is available for sharing.

@paulo_pereira, @Hugo_Freixo,
While adding more features/functions for our products in newer versions, commonly more memory will be required while compiling or executing them. So, please allow larger memory for the process. By our test with your provided project, -Xmx1024M will make the build process succeed.

Hi @ahsaniqbalsidiqui,
Thanks for the update.
We tried to compilee using -Xmx4096M and still the problem persists.
We get this error:

[ERROR] Java heap space -> [Help 1]
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOfRange (Arrays.java:3664)
at java.lang.String. (String.java:207)
at java.io.DataInputStream.readUTF (DataInputStream.java:661)
at aQute.lib.io.ByteBufferDataInput.readUTF (ByteBufferDataInput.java:96)
at aQute.bnd.osgi.Clazz.constantUtf8 (Clazz.java:914)
at aQute.bnd.osgi.Clazz.parseClassFileData (Clazz.java:546)
at aQute.bnd.osgi.Clazz.parseClassFileData (Clazz.java:509)
at aQute.bnd.osgi.Clazz.parseClassFileWithCollector (Clazz.java:494)
at aQute.bnd.osgi.ClassDataCollectors.parse (ClassDataCollectors.java:32)
at aQute.bnd.osgi.Analyzer.analyze (Analyzer.java:239)
at aQute.bnd.osgi.Builder.analyze (Builder.java:387)
at aQute.bnd.osgi.Analyzer.calcManifest (Analyzer.java:694)
at org.apache.felix.bundleplugin.ManifestPlugin.getAnalyzer (ManifestPlugin.java:296)
at org.apache.felix.bundleplugin.ManifestPlugin.execute (ManifestPlugin.java:98)
at org.apache.felix.bundleplugin.BundlePlugin.execute (BundlePlugin.java:384)
at org.apache.felix.bundleplugin.BundlePlugin.execute (BundlePlugin.java:375)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojo (MojoExecutor.java:119)
at com.atlassian.maven.plugins.amps.util.MojoExecutorWrapperImpl.execute (MojoExecutorWrapperImpl.java:28)
at com.atlassian.maven.plugins.amps.util.MojoExecutorWrapperImpl.executeWithMergedConfig (MojoExecutorWrapperImpl.java:39)
at com.atlassian.maven.plugins.amps.MavenGoals.generateBundleManifest (MavenGoals.java:1403)
at com.atlassian.maven.plugins.amps.osgi.GenerateManifestMojo.execute (GenerateManifestMojo.java:70)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)

Do you have any idea what could be the problem?

Also, could you please check why my colleague Hugo Freixo didn’t have permitions to see this post?

Kind regards,
Paulo Pereira

@paulo_pereira, @Hugo_Freixo,
We used the latest version of atlassian plugin sdk 8.0.16 and the maven contained by this version. For your given project, we built it successfully with only 1024M. We have no idea why you still get such kind of issue even with larger memory limit. If you are not using the latest version of the sdk or the same maven, you may upgrade them and try again.

We will check the permissions and will update you soon.

@paulo_pereira,
You may please ask @Hugo_Freixo to try to access this thread and share the feedback with us.

Hi @ahsaniqbalsidiqui,
Unfortunately he are not able to access this page.
“Oops! That page is private.”

Regards,
Paulo Pereira

@paulo_pereira,
We are looking into it and will share our feedback soon.