Error using DynamicReports with Lucee: java.lang.Object cannot be resolved

I’m trying to create a simple PDF report with Lucee v5.3.9+ 141 and DynamicReports v 6.12.1 ( I managed to load a simple OSGI Jar bundle and the first time I run it in Lucee, the report is generated correctly, but the second time I get this error:

net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file: 
1. The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files /* ^ 
2. The type java.lang.String cannot be resolved. It is indirectly referenced from required .class files /* ^ 
3. JREvaluator cannot be resolved to a type public class Report_1664969584830_647639 extends JREvaluator 
4. JRFillParameter cannot be resolved to a type private JRFillParameter parameter_IS_IGNORE_PAGINATION = null; 
5. JRFillParameter cannot be resolved to a type private JRFillParameter parameter_REPORT_CONNECTION = null;  
6. JRFillParameter cannot be resolved to a type private JRFillParameter parameter_FILTER = null; 
7. JRFillParameter cannot be resolved to a type private JRFillParameter parameter_DYNAMICREPORTS_SCRIPTLET = null;

For this I create a maven project with this class (

package org.test.simplereport;

import static;
import static;
import static;
import static;

public class SimpleReport{
    public static void main(String[] args) throws DRException{
        String destino = "report_simple.pdf";
        new SimpleReport().build(destino);

    public void build(String destino) throws DRException{
        String[] columnas = {"item", "price"};
        String[] fila = {"thing","10000000"};
        DRDataSource datasource = new DRDataSource(columnas);


                col.column("Item", "item", type.stringType()),
                col.column("Precio", "precio", type.stringType())

After compiling I create an OSGI Bundle jar with this MANIFEST:

Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven 3.8.6
Built-By: franjial
Build-Jdk: 11.0.16
Bundle-Classpath: ant-1.7.1.jar,ant-launcher-1.7.1.jar,avalon-framework-
Bundle-Description: simplereport bundle
Bundle-ManifestVersion: 2
Bundle-Name: SimpleReport
Bundle-SymbolicName: org.test.simplereport
Bundle-Vendor: ISOTools simplereport project
Bundle-Version: 1.0.1
Export-Package: org.test.simplereport
Main-Class: org.test.simplereport.SimpleReport

And finally I use Commandbox to create a Lucee server where I execute the following cfm:

        CFMLEngine = createObject( "java", "lucee.loader.engine.CFMLEngineFactory" ).getInstance();
        OSGiUtil = createObject( "java", "lucee.runtime.osgi.OSGiUtil" );

        reportsResource = CFMLEngine.getResourceUtil().toResourceExisting( getPageContext(), expandpath( 'simplereport-1.0.1.jar' ) );

        reports = createObject("java", "org.test.simplereport.SimpleReport", "org.test.simplereport", "1.0.1");

        <cfdump var="#cfcatch#">

Thanks in advance

OS: Windows 10
Java Version: tested with 11.0.15 and 1.8.0_202
Deploy with CommandBox:
Lucee Version: 5.3.9+ 141

Hi @franjial, I am not sure why you getting this error.

Maybe the below points help to you

  1. You can create a pdf using the lucee built-in cfdocument tag.
    <cfdocument> :: Lucee Documentation

  2. Also, you can load the jar files with lucee using javaSettings in the Application or place your jar under the /lib folder.

this.javasettings.loadPaths = "path-to-the-jar-file-directory";

Hi! Thanks for your reply. The weird thing is that the first time the cfm is run, it works. Then it gives the error, and you have to restart Lucee to make it work again.
I need to use this library because I’m trying to reuse an existing project wrote in Java with DynamicReports. When I load the jars files with javaSettings I get the same result and I choose load with an OSGI bundle to avoid conflicts with dependencies.

Hi! Have you found a solution ? I have the same issue with a jasperreports project.