[#13591] - Custom Function Extension cannot be used (Compile error)

Category:
Bug report
Priority:
High
Status:
Confirmed
Project: Severity:
Major
Resolution:
Open
Component: Reproducibility:
Always
Assigned to:
0

Hi there,

I made a fresh install (i.e. gunzip) of Jaspersoft Studio 6.17.0 on Linux.

When I create a blank A4 report and use a function in a Text Field from the built-in Function Extension, like UPPER("gugu"), the report compiles and runs fine.

When I add a User Library to the project and this Library contains a custom Function Extension and I use one of the function from this Extension, like SysDate() to get the current timestamp as java.util.Date, then I get the following compile error:

net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
1. net.sf.jasperreports.printserver.functions.JRPrintServerFunctions cannot be resolved to a type
return getFunctionSupport(net.sf.jasperreports.printserver.functions.JRPrintServerFunctions.class).SysDate();
<--------------------------------------------------------------->
1 errors
.
at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:229)
at net.sf.jasperreports.eclipse.builder.JasperReportCompiler.compileReport(JasperReportCompiler.java:289)
at net.sf.jasperreports.eclipse.builder.JasperReportCompiler.compileReport(JasperReportCompiler.java:141)
at net.sf.jasperreports.eclipse.builder.JasperReportsBuilder.compileJRXML(JasperReportsBuilder.java:212)
at com.jaspersoft.studio.editor.action.CompileAction.actionCompile(CompileAction.java:154)
at com.jaspersoft.studio.editor.action.CompileAction$1.run(CompileAction.java:98)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

Interestingly, in the Expression Editor the Function Extension and its function show up completely fine.
I can only speculate, but it looks like the Function Extension is somehow not "visible" to the compiler.

This test report is extremely simple:

<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.17.0.final using JasperReports Library version 6.17.0-6d93193241dd8cc42629e188b94f9e0bc5722efd -->
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="Blank_A4" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="9119563a-7959-40d1-af56-6566e631cfff">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="Data Adapters/DepartmentOverviewDataAdapter.xml"/>
<queryString language="xPath">
<![CDATA[/DOCUMENT/REGION/ROWSET2/ROWSET2_ROW]]>
</queryString>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="79" splitType="Stretch"/>
</title>
<detail>
<band height="125" splitType="Stretch">
<textField>
<reportElement x="100" y="35" width="100" height="25" uuid="ac94afa6-474d-4677-8867-b628bff2d8da"/>
<textFieldExpression><![CDATA[SysDate( )]]></textFieldExpression>
</textField>
<textField>
<reportElement x="218" y="36" width="100" height="25" uuid="61bac079-c181-43f8-a997-1d9668803e2e"/>
<textFieldExpression><![CDATA[UPPER("gugu")]]></textFieldExpression>
</textField>
</band>
</detail>
</jasperReport>

Ok, so I the the property to keep the Java files. Here the Java file - that looks quite fine - for the report above:

/*
* Generated by JasperReports - 23.05.21, 14:33
*/
import net.sf.jasperreports.engine.*;
import net.sf.jasperreports.engine.fill.*;

import java.util.*;
import java.math.*;
import java.text.*;
import java.io.*;
import java.net.*;

/**
*
*/
public class Blank_A4_1621773188825_317900 extends JREvaluator
{

/**
*
*/

/**
*
*/
public void customizedInit(
Map pm,
Map fm,
Map vm
)
{
initParams(pm);
initFields(fm);
initVars(vm);
}

/**
*
*/
private void initParams(Map pm)
{
}

/**
*
*/
private void initFields(Map fm)
{
}

/**
*
*/
private void initVars(Map vm)
{
}

/**
*
*/
public Object evaluate(int id) throws Throwable
{
Object value = null;

switch (id)
{
case 8 :
{
value = SysDate( ); //$JR_EXPR_ID=8$
break;
}
case 9 :
{
value = UPPER("gugu"); //$JR_EXPR_ID=9$
break;
}
default :
{
}
}

return value;
}

/**
*
*/
public Object evaluateOld(int id) throws Throwable
{
Object value = null;

switch (id)
{
case 8 :
{
value = SysDate( ); //$JR_EXPR_ID=8$
break;
}
case 9 :
{
value = UPPER("gugu"); //$JR_EXPR_ID=9$
break;
}
default :
{
}
}

return value;
}

/**
*
*/
public Object evaluateEstimated(int id) throws Throwable
{
Object value = null;

switch (id)
{
case 8 :
{
value = SysDate( ); //$JR_EXPR_ID=8$
break;
}
case 9 :
{
value = UPPER("gugu"); //$JR_EXPR_ID=9$
break;
}
default :
{
}
}

return value;
}

/**
*
*/
public java.util.Date SysDate()
{
return getFunctionSupport(net.sf.jasperreports.printserver.functions.JRPrintServerFunctions.class).SysDate();
}

/**
*
*/
public java.lang.String UPPER(java.lang.String arg0)
{
return getFunctionSupport(net.sf.jasperreports.functions.standard.TextFunctions.class).UPPER(arg0);
}

}

The very same Function Extension works fine with JSS 6.16.0.
If it's useful, I could provide the jar file with the custom Function Extension.

Regards,
Michael

v6.17.0
Michael Schmid's picture
Joined: Oct 4 2013 - 9:43am
Last seen: 17 min 16 sec ago

8 Comments:

#1

Hello Michael,

I have the same problem I think. One question (only for testing purpose): If you change the report language to groovy compile correctly?

Thank you.

#2
  • Priority:Normal» High

Hi fddam,

quite possible that those issue have the same root cause...

Now, when I switch my test report Language "java" to "groovy" the report compile into a jasper file. Good so far.
But when I execute/preview the report the I get an exception:

net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression for source text: SysTimestamp( )
at com.jaspersoft.studio.editor.preview.view.control.ReportController.fillReport(ReportController.java:551)
at com.jaspersoft.studio.editor.preview.view.control.ReportController.access$18(ReportController.java:526)
at com.jaspersoft.studio.editor.preview.view.control.ReportController$1.run(ReportController.java:444)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression for source text: SysTimestamp( )
at net.sf.jasperreports.engine.fill.JREvaluator.handleEvaluationException(JREvaluator.java:294)
at net.sf.jasperreports.compilers.GroovyEvaluator.handleEvaluationException(GroovyEvaluator.java:98)
at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:328)
at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:673)
at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:641)
at net.sf.jasperreports.engine.fill.JRFillElement.evaluateExpression(JRFillElement.java:1173)
at net.sf.jasperreports.engine.fill.JRFillTextField.evaluateText(JRFillTextField.java:555)
at net.sf.jasperreports.engine.fill.JRFillTextField.evaluate(JRFillTextField.java:540)
at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:383)
at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:548)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2613)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:836)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:275)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:119)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:622)
at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFill.run(BaseFillHandle.java:135)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: Lnet/sf/jasperreports/repo/RepositoryUtil;
at java.base/java.lang.Class.getDeclaredFields0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredFields(Unknown Source)
at java.base/java.lang.Class.getDeclaredFields(Unknown Source)
at org.codehaus.groovy.reflection.CachedClass$1.lambda$initValue$2(CachedClass.java:59)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at org.codehaus.groovy.reflection.CachedClass$1.initValue(CachedClass.java:62)
at org.codehaus.groovy.reflection.CachedClass$1.initValue(CachedClass.java:54)
at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:50)
at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:37)
at org.codehaus.groovy.reflection.CachedClass.getFields(CachedClass.java:255)
at groovy.lang.MetaClassImpl.addFields(MetaClassImpl.java:2546)
at groovy.lang.MetaClassImpl.inheritFields(MetaClassImpl.java:2541)
at groovy.lang.MetaClassImpl.setupProperties(MetaClassImpl.java:2427)
at groovy.lang.MetaClassImpl.addProperties(MetaClassImpl.java:3464)
at groovy.lang.MetaClassImpl.initialize(MetaClassImpl.java:3437)
at org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(ClassInfo.java:273)
at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:315)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.getMetaClass(MetaClassRegistryImpl.java:258)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.getMetaClass(DefaultGroovyMethods.java:17709)
at net.sf.jasperreports.compilers.GroovyEvaluator.functionCall(GroovyEvaluator.java:117)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.groovy.runtime.callsite.PlainObjectMetaMethodSite.doInvoke(PlainObjectMetaMethodSite.java:43)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:193)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:61)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:66)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:194)
at Blank_A445FT_1622216531716_247760.methodMissing(calculator_Blank_A445FT_1622216531716_247760:22)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107)
at groovy.lang.MetaClassImpl.invokeMissingMethod(MetaClassImpl.java:953)
at groovy.lang.MetaClassImpl.invokePropertyOrMissing(MetaClassImpl.java:1347)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1270)
at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1120)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:61)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:171)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:176)
at Blank_A445FT_1622216531716_247760.evaluate(calculator_Blank_A445FT_1622216531716_247760:82)
at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:313)
... 14 more
Caused by: java.lang.ClassNotFoundException: net.sf.jasperreports.repo.RepositoryUtil
at java.base/java.net.URLClassLoader.findClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at java.base/java.net.FactoryURLClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
... 60 more

The used function of my Function Extension is "SysTimestamp()".
The Function Extension class has a init method like this:

@Override
public void init(FunctionContext context) {
super.init(context);
functionContext = getContext();
JasperReportsContext jasperReportsContext = getJasperReportsContext();
propertiesUtil = JRPropertiesUtil.getInstance(jasperReportsContext);
repositoryUtil = RepositoryUtil.getInstance(jasperReportsContext);
fontUtil = FontUtil.getInstance(jasperReportsContext);
...
}

Here obviously the net.sf.jasperreports.repo.RepositoryUtil class cannot be found!?! Why???

When I execute the generated jasper file outside of JSS, i.e. with pure JasperReports Library the report and my function execute fine.
So, somehow the class resolution in JSS is flawed...

I also tried to switch to Language "javascript": Compile works and execution/preview in JSS.

I hope that gets fixed soon, otherwise JSS 6.17 is useless for us...

Regards,
Michael

#3
  • Status:New» Confirmed

Hi, I can confirm I was able to reproduce your issue.
I will have to debug further to understand if it's somehow related to JR as well, because everything seems to be working fine if you are working with sources in your project. Meaning that if you have your functions library code inside the project and build normally, also the preview seems to be working fine (see screenshot setup).
The issue comes in place when you are working with jar, as you guys reported. Moreover I tried to verify the issue in the normal develop environment + launching runtime and it seemed to work fine. I have to "remote debug" the standalone version in order to understand what's going on.

If you can, please try to work with the custom functions Java code inside the project to confirm that is working on your side too with this method.

Thanks!
Regards,
Massimo.

AttachmentSize
Image icon functionsjavacodeexample.png19.28 KB
#4

Hi Massimo,

I created a Function Extension in JSS.
The creation was quite easy with the wizard.

I have now a Java package com.test.functions in my project.
There a two java files there.
First, the category file "Test.java":

package com.test.functions;

import net.sf.jasperreports.functions.annotations.FunctionCategory;

@FunctionCategory()
public class Test {
}

And then the more interesting file "TestFunctionLibrary.java":

package com.test.functions;

import net.sf.jasperreports.functions.annotations.Function;
import net.sf.jasperreports.functions.annotations.FunctionCategories;
import net.sf.jasperreports.functions.annotations.FunctionParameter;
import net.sf.jasperreports.functions.annotations.FunctionParameters;

@FunctionCategories({ com.test.functions.Test.class })
public class TestFunctionLibrary {

@Function("HELLO_WORLD_MSG")
public static String HELLO_WORLD_MSG() {
return "Hello World!";
}
}

The wizard additionally created a file "jasperreports_messages.properties" in this package.
And in the root of my build path a file "jasperreports_extension.properties" was created with this content:

net.sf.jasperreports.extension.registry.factory.functions=net.sf.jasperreports.functions.FunctionsRegistryFactory
net.sf.jasperreports.extension.functions.testfunctionlibrary=com.test.functions.TestFunctionLibrary

Now, I create an empty report that uses the HELLO_WORLD_MSG function. (It's available in the Expression Wizard.)

When the report language is set to "java" compilation fails with:

net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
1. Only a type can be imported. com.test.functions.TestFunctionLibrary.HELLO_WORLD_MSG resolves to a package
import static com.test.functions.TestFunctionLibrary.HELLO_WORLD_MSG;
<---------------------------------------------------->
2. The method HELLO_WORLD_MSG() is undefined for the type Blank_A445FT_1622656423500_53801
value = HELLO_WORLD_MSG( ); //$JR_EXPR_ID=9$
<------------->
3. The method HELLO_WORLD_MSG() is undefined for the type Blank_A445FT_1622656423500_53801
value = HELLO_WORLD_MSG( ); //$JR_EXPR_ID=9$
<------------->
4. The method HELLO_WORLD_MSG() is undefined for the type Blank_A445FT_1622656423500_53801
value = HELLO_WORLD_MSG( ); //$JR_EXPR_ID=9$
<------------->
4 errors
.
at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:229)
at net.sf.jasperreports.eclipse.builder.JasperReportCompiler.compileReport(JasperReportCompiler.java:289)
at net.sf.jasperreports.eclipse.builder.JasperReportCompiler.compileReport(JasperReportCompiler.java:141)
at net.sf.jasperreports.eclipse.builder.JasperReportsBuilder.compileJRXML(JasperReportsBuilder.java:212)
at com.jaspersoft.studio.editor.action.CompileAction.actionCompile(CompileAction.java:154)
at com.jaspersoft.studio.editor.action.CompileAction$1.run(CompileAction.java:98)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

The java source is:

/*
* Generated by JasperReports - 02.06.21, 19:56
*/
import static com.test.functions.TestFunctionLibrary.HELLO_WORLD_MSG;
import net.sf.jasperreports.engine.*;
import net.sf.jasperreports.engine.fill.*;

import java.util.*;
import java.math.*;
import java.text.*;
import java.io.*;
import java.net.*;

/**
*
*/
public class Blank_A445FT_1622656576990_621694 extends JREvaluator
{

/**
*
*/

/**
*
*/
public void customizedInit(
Map pm,
Map fm,
Map vm
)
{
initParams(pm);
initFields(fm);
initVars(vm);
}

/**
*
*/
private void initParams(Map pm)
{
}

/**
*
*/
private void initFields(Map fm)
{
}

/**
*
*/
private void initVars(Map vm)
{
}

/**
*
*/
public Object evaluate(int id) throws Throwable
{
Object value = null;

switch (id)
{
case 8 :
{
value = UPPER("Gugu"); //$JR_EXPR_ID=8$
break;
}
case 9 :
{
value = HELLO_WORLD_MSG( ); //$JR_EXPR_ID=9$
break;
}
default :
{
}
}

return value;
}

/**
*
*/
public Object evaluateOld(int id) throws Throwable
{
Object value = null;

switch (id)
{
case 8 :
{
value = UPPER("Gugu"); //$JR_EXPR_ID=8$
break;
}
case 9 :
{
value = HELLO_WORLD_MSG( ); //$JR_EXPR_ID=9$
break;
}
default :
{
}
}

return value;
}

/**
*
*/
public Object evaluateEstimated(int id) throws Throwable
{
Object value = null;

switch (id)
{
case 8 :
{
value = UPPER("Gugu"); //$JR_EXPR_ID=8$
break;
}
case 9 :
{
value = HELLO_WORLD_MSG( ); //$JR_EXPR_ID=9$
break;
}
default :
{
}
}

return value;
}

/**
*
*/
public java.lang.String UPPER(java.lang.String arg0)
{
return getFunctionSupport(net.sf.jasperreports.functions.standard.TextFunctions.class).UPPER(arg0);
}

}

When I set the report language to "groovy" compilation and preview works!
The groovy file's content:

/*
* Generated by JasperReports - 02.06.21, 19:57
*/
import net.sf.jasperreports.engine.*;
import net.sf.jasperreports.engine.fill.*;

import java.util.*;
import java.math.*;
import java.text.*;
import java.io.*;
import java.net.*;

/**
*
*/
class Blank_A445FT_1622656673002_844779 extends net.sf.jasperreports.compilers.GroovyEvaluator
{

def methodMissing(String name, args) {
return functionCall(name, args);
}

/**
*
*/

/**
*
*/
void customizedInit(
Map pm,
Map fm,
Map vm
)
{
initParams(pm);
initFields(fm);
initVars(vm);
}

/**
*
*/
void initParams(Map pm)
{
}

/**
*
*/
void initFields(Map fm)
{
}

/**
*
*/
void initVars(Map vm)
{
}

/**
*
*/
Object evaluate(int id)
{
Object value = null;

if (id == 8)
{
value = (UPPER("Gugu"));
}
else if (id == 9)
{
value = (HELLO_WORLD_MSG( ));
}

return value;
}

/**
*
*/
Object evaluateOld(int id)
{
Object value = null;

if (id == 8)
{
value = (UPPER("Gugu"));
}
else if (id == 9)
{
value = (HELLO_WORLD_MSG( ));
}

return value;
}

/**
*
*/
Object evaluateEstimated(int id)
{
Object value = null;

if (id == 8)
{
value = (UPPER("Gugu"));
}
else if (id == 9)
{
value = (HELLO_WORLD_MSG( ));
}

return value;
}

}

Compilation and preview also work when I set the language to "javascript".

Hope this helps with analyzing this issue.

Best regards,
Michael

#5

Hi thanks for the feedback.
I will try to debug further also setting up a Linux dev environment.
I can confirm that in Mac OS X BigSur it seems to work fine using the Java code inside the project (creating the functions library like you did from wizard). The only operation needed is of course the manual build of the related classes (using CMD/CTRL + B).
On the other side I re-tried also the Javascript and Groovy language with the usage of the external jar library. And they work fine. Only Java language seems not ok.

Regards,
Massimo.

#6

Hi, I Got same problem in Windows 10
But in my case sources is in the project and 6.17 will trow this error
when trying to preview report same project was working fine in 6.16 (Im not sure how to switch Java to Groovy so I didn't try that)

Start Report Execution
Compiling report......net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
1. Only a type can be imported. mypackage.customFunctions.myclass.MYFUNCTION resolves to a package
import static mypackage.customFunctions.myclass.MYFUNCTION;
<------------------------------------------------------->

#7

Hi can you please give it a try to see if the solution proposed with this patch here addresses the problem of sources in the project?
https://community.jaspersoft.com/jaspersoft-studio/issues/13616#comment-...

Let me know.
Indeed there are other issues as well that we are trying to tackle.

Best regards,
Massimo.

#8

Hi Massimo,

I copied the file net.sf.jasperreports.patch_6.17.0.js-patch01.jar to my plugins directory.
In my case it's: /opt/jaspersoft/TIB_js-studiocomm_6.17.0/plugins

Then I started JSS with: /opt/jaspersoft/TIB_js-studiocomm_6.17.0/runjss.sh -clean

When I first tried my test reports the errors showed up :-(

Then I quit JSS and started it again with: /opt/jaspersoft/TIB_js-studiocomm_6.17.0/runjss.sh

And now the compilation worked with language java! :-)

So, the patch helped.

But, unfortunately I think I found the next problem:
I'm using my own ChartCustomizers and they are part of a jar that is part of a user library of my project. (The same jar that includes my own Function Extension.)
Now, I can compile the report, but when I execute/preview I get:

net.sf.jasperreports.engine.JRRuntimeException: Could not create chart customizer instance.
at net.sf.jasperreports.engine.fill.JRFillChart.createAndInitCustomizer(JRFillChart.java:354)
at net.sf.jasperreports.engine.fill.JRFillChart.<init>(JRFillChart.java:320)
at net.sf.jasperreports.engine.fill.JRFillObjectFactory.visitChart(JRFillObjectFactory.java:704)
at net.sf.jasperreports.engine.base.JRBaseChart.visit(JRBaseChart.java:586)
at net.sf.jasperreports.engine.JRAbstractObjectFactory.getVisitResult(JRAbstractObjectFactory.java:88)
at net.sf.jasperreports.engine.fill.JRFillElementGroup.<init>(JRFillElementGroup.java:82)
at net.sf.jasperreports.engine.fill.JRFillElementContainer.<init>(JRFillElementContainer.java:95)
at net.sf.jasperreports.engine.fill.JRFillFrame$JRFillFrameElements.<init>(JRFillFrame.java:505)
at net.sf.jasperreports.engine.fill.JRFillFrame.<init>(JRFillFrame.java:99)
at net.sf.jasperreports.engine.fill.JRFillObjectFactory.visitFrame(JRFillObjectFactory.java:1475)
at net.sf.jasperreports.engine.base.JRBaseFrame.visit(JRBaseFrame.java:92)
at net.sf.jasperreports.engine.JRAbstractObjectFactory.getVisitResult(JRAbstractObjectFactory.java:88)
at net.sf.jasperreports.engine.fill.JRFillElementGroup.<init>(JRFillElementGroup.java:82)
at net.sf.jasperreports.engine.fill.JRFillElementContainer.<init>(JRFillElementContainer.java:95)
at net.sf.jasperreports.engine.fill.JRFillBand.<init>(JRFillBand.java:129)
at net.sf.jasperreports.engine.fill.JRFillObjectFactory.getBand(JRFillObjectFactory.java:524)
at net.sf.jasperreports.engine.fill.JRFillSection.<init>(JRFillSection.java:74)
at net.sf.jasperreports.engine.fill.JRFillObjectFactory.getSection(JRFillObjectFactory.java:500)
at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:285)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:82)
at net.sf.jasperreports.engine.fill.JRFiller.createBandReportFiller(JRFiller.java:251)
at net.sf.jasperreports.engine.fill.JRFiller.createReportFiller(JRFiller.java:272)
at net.sf.jasperreports.engine.fill.BaseFillHandle.<init>(BaseFillHandle.java:86)
at net.sf.jasperreports.engine.fill.AsynchronousFillHandle.<init>(AsynchronousFillHandle.java:120)
at net.sf.jasperreports.engine.fill.AsynchronousFillHandle.createHandle(AsynchronousFillHandle.java:244)
at com.jaspersoft.studio.editor.preview.view.control.ReportController$1.run(ReportController.java:441)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.lang.ClassNotFoundException: net.sf.jasperreports.printserver.customizers.SeriesColorCustomizer cannot be found by net.sf.jasperreports_6.17.0.final
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:519)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:171)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Unknown Source)
at net.sf.jasperreports.engine.util.JRClassLoader.loadClassForRealName(JRClassLoader.java:208)
at net.sf.jasperreports.engine.util.JRClassLoader.loadClassForName(JRClassLoader.java:148)
at net.sf.jasperreports.engine.fill.JRFillChart.createAndInitCustomizer(JRFillChart.java:348)
... 26 more

When I execute the jasper file that JSS compiled in "pure" JapserReports Library 6.17 environment it works...
Should I create a new issue for this problem?

Best regards,
Michael

Feedback
randomness