Jump to content
We've recently updated our Privacy Statement, available here ×

How to use custom functions from a .jar on the jasperserver, too


robert.groll

Recommended Posts

Hello,

I'd like to get help for using custom functions on jasperserserver, too.

Ich added the .jar to my Project with the Build Path Dialog within JasperStudio. Locally the method where used.

But If I save the .jrxml on the server and execute it on the server with japsersoft studio, the error message says the method is undefined.

I've already tried to ad the .jar to the Report-folder on the jasperserver but it also don't work. I've tried to set Properties in the Properties of the project and in the Preferences of JasperStudio but

nothing had helped. If I try it with a scriptlet I can't use the scriptlet in the crosstab. Why Jasper don't publish the .jar to the report by saving it on the jasperserver.

Ich hope someone can help. Thank you in advance.

With kind regards

Robert

Link to comment
Share on other sites

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

Guten Tag,

Have you copies your jar to /jasperserver/WEB-INF/lib folder? The other option is to upload it to Tomcat/lib. You'll need to restart your tomcat to load your jar file with these approaches.

The other option is to upload it to the repository. Check "JasperReports Server Administration Guide" p 98 "4.5.2 JAR Files"

http://community.jaspersoft.com/documentation/jasperreports-server-administration-guide/v550/file-resources

 

Link to comment
Share on other sites

Hello,

thank you for your answer and sorry for the late reply.

I've attached the .java-file.

Refer to the 3 suggestion: I've already tried to add the jar to the report unit. In the jasperserver I also see the jar as a ressource in the report unit under the name "dynamicdate". But it still don't work.

Refer to suggestion 1 and 2: If I have entrance to the directories I'll try it.

Thank you again.

Robert

 

Link to comment
Share on other sites

  • 4 weeks later...

Hello,

I tried the /jasperserver/WEB-INF/lib folder and add the .jar to the Report Unit.

But it still don't word.

What can be wrong? Can the problem be that I habe already one .jar with the same Class-Name?

And Jars with the same class can't word together on Jasperserver?

But locally the Jars work together.

Please can anybody help?

Thank you in advance.

Link to comment
Share on other sites

Hello,

another additive and maybe solving question.

Can it be that I've to restart the Tomcat or the Jasperserver-Application to be able to use these Jars(in the Report Unit or the "/jasperserver/WEB-INF/lib"-folder?

Have I to restart Jasperserver or the Apache Tomcat?

Thank you in advance. With kind regards.

Robert

Link to comment
Share on other sites

  • 1 month later...

expanding off of this article (meaning you have already done everything in the article to make a custom function)

you export you custom functions package as a JAR

now, go to your JasperReports Server directory

put the JAR here -> /jasperserver/WEB-INF/lib 

and

put jasperreports_extension.properties here -> /jasperserver/WEB-INF/classes

then restart the JasperReports Server

 

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...