B4J Question [solved] B4JPackager11 + JasperReports error

powerino

Active Member
Licensed User
Hi everyone, I have implemented a software that I have to give to the customer, but when creating the .exe file I have these errors (3) ... what can I do to solve it? Thank you





B4JPackager11 Version 1.14
Exe name: Timesofart.exe
InputJar: C:\Rino\AppSitoWeb\Timesofart\Objects\Timesofart.jar
Running: C:\Rino\APPSIT~1\COMPIL~1\B4JPAC~1\Objects\temp\FindDosPath.exe
Running: C:\Program Files\Java\jdk-11.0.6\bin\jar
.
Package name: com.guerrinosantoni.database
Running: C:\Program Files\Java\jdk-11.0.6\bin\jdeps
.
.
.
.
Explicitly excluded modules: []
Included modules: [java.base, java.datatransfer, java.desktop, java.logging, java.management, java.management.rmi, java.naming, java.prefs, java.rmi, java.scripting, java.security.jgss, java.sql, java.sql.rowset, java.transaction.xa, java.xml, java.xml.crypto, javafx.base, javafx.controls, javafx.fxml, javafx.graphics, javafx.media, javafx.swing, javafx.web, jdk.security.auth, jdk.unsupported, jdk.unsupported.desktop, jdk.jsobject, jdk.xml.dom]
Running: C:\Program Files\Java\jdk-11.0.6\bin\javac
.
.
.
.
module-info.java:33: error: package org.codehaus.groovy.plugins does not exist
uses org.codehaus.groovy.plugins.Runners;
^
module-info.java:34: error: cannot find symbol
uses org.codehaus.groovy.runtime.ExtensionModule;
^
symbol: class ExtensionModule
location: package org.codehaus.groovy.runtime
module-info.java:35: error: package org.codehaus.groovy.source does not exist
uses org.codehaus.groovy.source.Extensions;
^
3 errors



Edit: solution is here: https://www.b4x.com/android/forum/threads/b4jpackager11-error.115168/post-721387
 
Last edited by a moderator:

powerino

Active Member
Licensed User
Now i have this error:

Error: java.lang.IllegalArgumentException: org.apache.commons.lang.enum: Invalid package name: 'enum' is not a Java identifier
 
Upvote 0

powerino

Active Member
Licensed User
Thanks Erel, you are the best!
Now the .exe program has been created and starts ... it works except when I want to open the report made with "Jaspersoft". The program closes! While the version with the .jar file works correctly
 
Last edited:
Upvote 0

rboeck

Well-Known Member
Licensed User
Longtime User
Try to use run_debug.bat. The you have the chance to see some, maybe relevant error messages. I found out, that i could't use files with space inside a name, when using the exe variant.
 
Upvote 0

powerino

Active Member
Licensed User
ON button click i have only this code:
B4X:
Sub btnReport_Click
    
    Dim jasper As JasperReports
    Dim report As JasperReport
    Dim print As JasperPrint
    Dim conn As JasperConnection
    
    jasper.InitializeParameters
    'report = jasper.CompileXML(File.Combine(File.DirApp, "Report-Time.jrxml"))
    'conn = jasper.getConnectionSQLite(File.Combine(File.DirApp, "database.db"))
    report = jasper.CompileXML(File.Combine(Main.percorsoApp, "Report-Time.jrxml"))
    conn = jasper.getConnectionSQLite(File.Combine(Main.percorsoApp, "database.db"))
    print = jasper.Print(report, jasper.parameters, conn)
    jasper.JasperViewer(print,True)

    
End Sub
B4X:
 
Upvote 0

powerino

Active Member
Licensed User
I'm getting this error: java.io.FileNotFoundException: C:\Users\H\Documents\B4J\B4JPackager11\Objects\temp\build\bin\Timesofart\config.ini (The system cannot find the file specified)
Hi Erel, in the config.ini file is indicated the path of the database and the reporrt (first line) and the name of the database (second line). If you change these values based on where you saved my project on your PC, then you can make it work, okay?
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…