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

2

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

robert.groll's picture
Joined: Jan 11 2014 - 8:02am
Last seen: 5 years 2 weeks ago

6 Answers:

3

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

 

hozawa's picture
50973
Joined: Apr 24 2010 - 4:31pm
Last seen: 4 months 1 week ago
0

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

 

Attachments: 
AttachmentSize
File dynamicdate.java7.54 KB
robert.groll's picture
Joined: Jan 11 2014 - 8:02am
Last seen: 5 years 2 weeks ago
0

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.

robert.groll's picture
Joined: Jan 11 2014 - 8:02am
Last seen: 5 years 2 weeks ago
0

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

robert.groll's picture
Joined: Jan 11 2014 - 8:02am
Last seen: 5 years 2 weeks ago
0

Hello,

thank you for your help.

The clues were good. The wrong scriptlet has made obstacles.

Solved!!!

robert.groll's picture
Joined: Jan 11 2014 - 8:02am
Last seen: 5 years 2 weeks ago
2

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

 

idstewart's picture
Joined: May 30 2014 - 4:05am
Last seen: 4 years 2 months ago
Feedback
randomness