Jump to content
Changes to the Jaspersoft community edition download ×

How to install custom expression on server


jphiloon

Recommended Posts

I created a custom expression function by following the instructions here: https://community.jaspersoft.com/wiki/jaspersoft-studio-expression-editor-how-extend-it-and-contribute-your-own-functions-part-2-0  

This works fine and I can preview a report using the custom expression in JSS 6.5.1.   Now, how do I install the expression on the server?  I can create and upload a jar, but that in itself is not enough.  I see various mention of bundles, spring beans, and so on, but the information seems either outdated or irrelevant.  Is there a "Part 3" to the tutorial above that shows how to install the extended expression on the server?

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

The problem as per the log is

2018-02-06 13:44:55,324 ERROR GenericExceptionMapper,http-nio-8080-exec-2:50 - Unexpected error occurs
net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
1. The method CSS2HTML(String) is undefined for the type Comments_1517942694193_850454
                value = CSS2HTML(((java.lang.String)field_COMMENT.getValue()) ); //$JR_EXPR_ID=21$

 

Link to comment
Share on other sites

I got the server working by: a) copying up the jar that contained the custom expression, b) modifying the .jrxml file to import the custom class and c) also qualifying the CCS2HTML expression as per  <textFieldExpression><![CDATA[util.CSS2HTML($F{COMMENT} )]]></textFieldExpression>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...