We installed Servoy 8.1.1 (server only) on a customer’s server and imported a solution. When we attempt to print a Jasper report within the solution, we get the following error:
We found this item on how to whitelist .jar files using the RMI but do not believe the ‘net.sf.jasperreports.engine.JasperPrint;’ pertains to the whitelist (it’s not a .jar file…at least, we could not find it):
I don’t use the smart client much any more, so I haven’t experienced this, but the whitelisting using the rmi-whitelist.jar from Johan’s post looks like its referencing packages, not jars. A jar is just a zip of a folder structure with some extras, so in this example, it looks like you probably want to add “net.sf.jasperreports.” to your whitelist (note the period at the end). Then all the classes under those packages/folders in the jar will be whitelisted.
Just a guess, I haven’t tried it before
PS. If you unzip the jasperreports-X.X.X.jar, you’ll see that folder structure and class in there.
To modify the .class file, I would have to extract and decompile the file, add the “net.sf.jasperreports.” path, recompile the code back into a class file, then add it back to the .jar file. Is there an alternate way to add the pathname (like a simple text edit), and, if so, would someone be willing to provide an example? My Java knowledge is rather limited.
No need to decompile. Sorry I confused you. I was just explaining how Jars work, with the classes and folder structure in them.
In Johan’s forum post here: viewtopic.php?f=16&t=21087 he describes how to use the rmi-whitelist.jar to add additional classes to the whitelist.
In the JAVA_OPTS, there is a property set, “rmi.whitelist.config”. You need to set it to a colon separated list of packages you want to white list. for example,
I saw Johan’s post but was confused by it…I still do not know what JAVA_OPTS is. I presume it is a generic term for Java options, wherever they may exist, since I could not find anything by that name. However, I did find what I needed to modify and want to post the information here for others who may come across this situation.
If you are running Servoy server as a Windows service and need to add a package reference to the RMI white list, you need to modify the service wrapper configuration file (wrapper.conf). This file is located in the following path:
C:\Servoy\application_server\service\wrapper.conf
Open wrapper.conf in a text editor and locate the section called Java Additional Parameters.
Within this section, locate the line starting with ‘wrapper.java.additional.x=-Drmi.whitelist.config=’. Append each package reference to this line separating them by a colon ( character. Do not forget to end the package pathname with a period (.). Below is an example:
Thanks a lot for this, I had exactly the same problem when installing new Servoy AppServers today with the latest Java Update.
Now it works like a charm again.