Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Thu Nov 16, 2023 1:15 pm

Hi Team

I have problem with Free Spire.XLS.
I make Maven projekt, this is my pom.xml:

project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>demo.com</groupId>
<artifactId>PDF_keszito</artifactId>
<version>0.0.1-SNAPSHOT</version>

<repositories>
<repository>
<id>com.e-iceblue</id>
<name>e-iceblue</name>
<url>https://repo.e-iceblue.com/nexus/content/groups/public/</url>
</repository>

</repositories>
<dependencies>
<dependency>
<groupId>e-iceblue</groupId>
<artifactId>spire.xls.free</artifactId>
<version>5.1.0</version>
</dependency>
</dependencies>
</project>


And this is my code:
Code: Select all
private static void pdf()
   {
      try {
         
         Workbook workbook = new Workbook();
         workbook.loadFromFile(System.getProperty("user.home") + "\\Desktop\\Techem OQC\\Techem OQC_Rhsz_TE05-06-21.xlsx");
         workbook.getConverterSetting().setSheetFitToPage(true);         
         workbook.saveToFile(System.getProperty("user.home") + "\\Desktop\\Techem OQC\\Techem OQC_Rhsz_TE05-06-21.pdf",FileFormat.PDF);
         System.out.println("Lefutott");
      }
      catch (Exception e) {
         System.out.println(e);
            e.printStackTrace();
            String hibauzenet = e.toString();
            JOptionPane.showMessageDialog(null, hibauzenet, "Hiba üzenet", 2);                                              //kiírja a hibaüzenetet
      }
   }


If I run the code i have this issue:

Exception in thread "AWT-EventQueue-0" java.lang.IllegalAccessError: class com.spire.xls.packages.sprRFA (in unnamed module @0x5c31b8a) cannot access class sun.security.action.GetPropertyAction (in module java.base) because module java.base does not export sun.security.action to unnamed module @0x5c31b8a
at com.spire.xls.packages.sprRFA.spr (Unknown Source)
at com.spire.xls.packages.sprRFA.spr (Unknown Source)
at com.spire.xls.packages.sprRFA.<init>(Unknown Source)
at com.spire.xls.packages.sprksa.<init>(Unknown Source)
at com.spire.xls.packages.sprHTa.<init>(Unknown Source)
at com.spire.xls.core.spreadsheet.XlsWorkbook.<init>(Unknown Source)
at com.spire.xls.Workbook.<init>(Unknown Source)
at Ablak.pdf(Ablak.java:53)
at Ablak.access$0(Ablak.java:49)
at Ablak$1.run(Ablak.java:29)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:771)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:741)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)


What is the problem?
The System JRE version is JDK 16.
The JRE version is in Eclipse for the project is JaveSE-1.8
Op system: Win 10 64 bit

Vizinyenyec
 
Posts: 15
Joined: Mon May 09, 2022 10:16 am

Fri Nov 17, 2023 2:27 am

Hello,

Thanks for your inquiry.
Due to irregular maintenance of our Free Spire.XLS for Java, the currently released version does not support high-version JDKs. To solve the issue you are experiencing, please use our latest commercial version (Spire.XLS for Java Version:13.11.0) for testing, which supports high-version JDKs. We are willing to provide you with a one-month temporary license to evaluate without any watermarks and restrictions, please apply for a temporary license from this link: https://www.e-iceblue.com/TemLicense.html.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1657
Joined: Wed Apr 07, 2021 2:50 am

Fri Nov 17, 2023 8:24 am

Thank you for the reaply

Vizinyenyec
 
Posts: 15
Joined: Mon May 09, 2022 10:16 am

Fri Nov 17, 2023 8:35 am

Hello,

You're welcome.
If you encounter other issues related to our products in the future, please feel free to contact us.
Have a nice day.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1657
Joined: Wed Apr 07, 2021 2:50 am

Return to Spire.XLS