B4J Question Error in Build Standalone Package

ANTONIO ALBEIRO VALENCIA

Member
Licensed User
Longtime User
I'm creating a project using JasperReport. When I compile it in Release or Debug mode, it compiles and runs fine. However, when I use the Build Standalone Package, I get these errors:

Errors in Build Standalone Package compilation ::
Exe name: jasper-test.exe
build folder: E:\B4J JasperReport\B4J\Objects\temp\build
InputJar: E:\B4J JasperReport\B4J\Objects\result.jar
Running: E:\B4J JasperReport\B4J\Objects\temp\FindDosPath.exe
Running: D:\java\jdk-19.0.2\bin\jar
Package name: b4j.jasper
Running: D:\java\jdk-19.0.2\bin\jdeps
.
.
.
Explicitly excluded modules: [javafx.web]
Included modules: [java.base, java.compiler, java.desktop, java.logging, java.management, java.naming, java.prefs, java.security.jgss, java.sql, java.sql.rowset, java.transaction.xa, java.xml, javafx.base, javafx.controls, javafx.fxml, javafx.graphics, javafx.media, javafx.swing, jdk.xml.dom]
Running: D:\java\jdk-19.0.2\bin\javac
module-info.java:29: error: cannot find symbol
uses org.w3c.dom.DOMImplementationSourceList;
                ^
  symbol:   class DOMImplementationSourceList
  location: package org.w3c.dom
module-info.java:30: error: cannot find symbol
uses org.xml.sax.driver;
                ^
  symbol:   class driver
  location: package org.xml.sax
2 errors

Note: The same project created in Java using the Jasper library compiles and runs correctly.

Best Regards
 

ANTONIO ALBEIRO VALENCIA

Member
Licensed User
Longtime User
Don't know much about the code you are trying to compile but you may need:

#PackagerProperty: IncludedModules = javafx.web
compiles with the same error.

Project Attributes:
#AdditionalJar: commons-beanutils-1.9.3.jar
    #AdditionalJar: commons-collections4-4.0.jar
    #AdditionalJar: commons-digester-2.1.jar
    #AdditionalJar: commons-logging-1.3.5.jar
    #AdditionalJar: commons-math3-3.6.1.jar
    #AdditionalJar: groovy-4.0.26.jar
    #AdditionalJar: javax.json-1.1.4.jar
    #AdditionalJar: slf4j-api-1.7.30.jar
    #AdditionalJar: slf4j-simple-1.6.1.jar
    
    #AdditionalJar: openpdf-1.3.26.jar
    #AdditionalJar: poi-4.1.2.jar
    #AdditionalJar: SparseBitSet-1.2.jar
    #AdditionalJar: xercesImpl-2.12.2
    
    #PackagerProperty: ExeName = jasper-test
    #PackagerProperty: VMArgs = --add-opens b4j/net.sf.jasperreports.engine.fill=ALL-UNNAMED
    #PackagerProperty: IncludedModules = javafx.web
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
Try updating the Additionaljar files. Some of them are very old versions. i.e. the commons-beanutils-1.9.3 was released in 2016 and may not play well with modularized packaging. It may be worth checking the JasperReport library site to see which versions are supported.
 
Upvote 0
Top