We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

'ICollection.size()' is not API after update to Slides 17.04.0

After updating Aspose Slides from 17.01.0 to 17.04.0 I have a few compile errors.

For example the following code:

for (int row = 0; row < table.getRows().size(); row++) {
for (int column = 0; column < table.getColumns().size(); column++) {
ICell cell = table.get_Item(column, row);

size() seems to be no API anymore:

Access restriction: The method ‘ICollection.size()’ is not API (restriction on required library ‘…\aspose-slides-17.4-jdk16.jar’)

I’m in an OSGi environment.

Hi Peter,

I have worked with code shared by you using Aspose.Slides for JAVA 17.4.0 and unable to observe the issue. I like to inform that it look like issue of eclipse, For more details and solution of the issue please visit this access restriction article. I also suggest you to please try to change JDK version on your end. Please share feedback with us if there is still an issue.

Best Regards,

I’m using the latest JRE 1.8.0_131, it works if you just include the jar in your project, that is not the issue here.

This is an OSGi issue, please forward the issue to a person who has basic knowledge of OSGi.

Back in Aspose Slides 17.01.0 IGenericCollection:
Attachment: 17.01.PNG

Now in Aspose Slides 17.04.0 IGenericCollection:
Attachment: 17.04.PNG

size() has been moved from IGenericCollection to com.aspose.slides.Collections.ICollection.

Since the Package “com.aspose.slides.Collections” is not exported in the MANIFEST.MF
(only entry Export-Package: com.aspose.slides;version=17.4), it is not accessible in an OSGi environment. Hence size() is not accessible.

Hi Ashish,

I have observed your comments. A ticket with ID SLIDESJAVA-36379 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with issue so that you may be automatically notified once issue will be fixed.

We are sorry for your inconvenience,

Hi Ashish,

I like to inform that our product team has investigated issue in detail. I like to inform our that product team added Aspose.Slides for Java 17.4.jar to Bundle-ClassPath, sample code with creating presentation, adding a table and getting size of Rows/Columns works fine. Product team also converted Aspose.Slides for Java 17.4.jar to Bundle and added this bundle as Require-Bundle. This bundle also works fine. However product team was able to reproduce this problem by deleting “com.aspose.slides.Collections” from MANIFEST.MF of Aspose.Slides bundle. But this is not a problem of Aspose.Slides for Java 17.4, this is a problem of project setup. Bundle MANIFEST.MF must contains “com.aspose.slides.Collections” string (because MANIFEST.MF of Aspose.Slides for Java contain it).
Can the you please recheck MANIFEST.MF of your Aspose.Slides bundle. If after this the you are still facing this problem, can you please provide sample project to reproduce this issue.

Best Regards,

How did the product team manage to delete “com.aspose.slides.Collections” from the MANIFEST.MF?

I just downloaded aspose-slides-17.4-java.zip and aspose-slides-17.5-java.zip.
The containing jars aspose-slides-17.4-jdk16.jar and aspose-slides-17.5-jdk16.jar do not export the package in the MANIFEST.MF.
I’m well aware that I need to import the package on my side, but can’t because it is not exported.

Here the MANIFEST.MF of aspose-slides-17.5-jdk16.jar:

Manifest-Version: 1.0
Application-Name: Aspose.Slides for Java
Implementation-Title: Aspose.Slides for Java
Copyright: Copyright 2004-2017 Aspose Pty Ltd
Bundle-SymbolicName: com.aspose.slides
Implementation-Version: 17.5
Release-Date: 2017.05.31
Specification-Vendor: Aspose Pty Ltd
Bundle-ManifestVersion: 2
Specification-Title: Aspose.Slides for Java
Bundle-Vendor: Aspose Pty Ltd
Application-Library-Allowable-Codebase: *
Import-Package: javax.xml.parsers;resolution:=optional,javax.imageio;r
Implementation-Vendor: Aspose Pty Ltd
Ant-Version: Apache Ant 1.9.7
Export-Package: com.aspose.slides;version=17.5
Bundle-Version: 17.5
Bundle-Name: Aspose.Slides for Java
Caller-Allowable-Codebase: *
Permissions: all-permissions
Created-By: 1.8.0_112-b15 (Oracle Corporation)
Specification-Version: 17.5

Hi Ashish,

I have observed your comments. Can you please provide sample project to reproduce issue so that we can further investigate to help you out.

Best Regards,

Please forward my previous comment to an OSGi developer, your saying:

"Bundle MANIFEST.MF must contains “com.aspose.slides.Collections” string (because MANIFEST.MF of Aspose.Slides for Java contain it). "

This is not true, see the MANIFEST.MF I posted, or go download aspose-slides-17.4-java.zip and aspose-slides-17.5-java.zip and have a look in there.

There is no com.aspose.slides.Collections in the MANIFEST.MF:

Export-Package: com.aspose.slides;version=17.4

instead of

Export-Package: com.aspose.slides;version=17.4,

Hi Ashish,

Attached please find the MANIFEST.MF for Aspose.Slides for Java 17.5. Please observe snapshot 1 and snapshot 2 for your kind reference. You can see the Collection entry is available inside MANIFEST.MF. In order to investigate the issue further we need a sample project from your end that is reproducing the issue on your end. It would be easier for us to understand and resolve the issue if there is any on the basis of a working project. Please share requested information so that we may proceed further with investigation on our end.

Many Thanks,

PLEASE forward this to a developer with OSGi/Java knowledge!!! You are wasting my time, I’m trying to report a bug, to improve your software.

What your printscreens show is the SHA-256 hash value of two classes, which is generated during the “signing” process. I will not go deeper into that, research it yourself.
This does NOT EXPORT the package. See my previous post, how a package is exported.

Other bundles will not be able to import the package and it’s classes.

Hi Ashish,

Please accept my sincere apologies for inconvenience on your end. We really wish to help and resolve your issue. What we have shared earlier with you was actually feedback requested from our product team. If it is possible for you to please share the manifest for Aspose.Slides for Java 17.1.0 that worked for you. We are investigating the issue further on our end and will share the further feedback with you as soon as it will be shared by our product.

We are sorry for your inconvenience,