I’m in problems when I add new functions in a plugin…
I built a simple plugin that works fine in developer and in servoy-client (I can connect with my solution from my developer machine or other machine and the plugin works without problems…).
Later I added a new function in my plugin, and this new function is working fine in developer…
However, when I open in my solution by servoy-client (http://my_ip_server:8080/servoy-client/solutions/<my_solution>.jnlp from my developer machine or other machine), the new function is not available… I get this error message:
TypeError: Cannot find function <my_function_name>. (<my_function_name>#3)
By other hand, the old functions are working fine… Due this:
It`s not enougth to update the .jar (I mean, overwrite the old file with the new one) of plugin in application_server\plugins folder???
Can it be related with cache in clients??? I tried to flush the client cache from developer, but the problem is happening yet…
I tried to do the updating of library (the .jar of my plugin) in the admin too, but I didn`t get to solve it…
After installing a new version of (any) bean/plugin you should clear the server cache as well or else the clients won’t see the new functionality.
The cache files you find in the //application_server/server/work/ .
Hi Gerardo!
If the server is not a production server, restarting it should do the trick too!
I’m doing it all the time and never had to clear the server’s cache, although I would on a production server…
First of all, i tried to delete manually my plugin files in work folder, but i didn´t work… The new files weren´t loaded again, and nothing worked… After previous steps it worked fine!
Anyway, i think something is wrong in my server… I´ll go on doing research on this!!!
What you did is not deleting server cache but client cache.
Server cache can be deleted by deleting files in ~/application_server/server/work/Catalina.
That should do it.
Both Robert and Patrick are not completely correct/complete in their answers though (sorry guys no offence).
This is most important when you develop a Plug-in: JWS needs/wants to know that something changed. For that we create a .jnlp file (if you don’t use it already you can find plenty of info on the internet) and update the version number of your jars with the last version number, build number or timestamp so that JWS knows that it needs to load the new libraries.
Deleting Server Cache is a ‘safe’ way to go but should not be necessary. Sometimes, for some reason, Java will not act according to its own rules though and you need to clear it but I certainly would not do that as first measurement. I hardly ever do this on my development machine and only when I run the server and not developer.
Deleting Client Cache has the same rule as above. This I do always on my dev machine but only when the following applies: I don’t change the version during development and when I am going to test the client on another machine with the server instead of developer running.
This is most important when you develop a Plug-in: JWS needs/wants to know that something changed. For that we create a .jnlp file (if you don’t use it already you can find plenty of info on the internet) and update the version number of your jars with the last version number, build number or timestamp so that JWS knows that it needs to load the new libraries.
In fact I use the .jnlp file, but I never changed the version after modifications in my plugins…
On the other hand, if I delete the files in …/work/catalina folder, the new version of theses files never are loaded till I perform the java cache clean… in server machine! I mean, I do this cache clean server, none the clients… Is it the normal behavior?
Gerardo.
P.S.: for these tests, i used as server my Windows dev machine, and i tested the login in my solution from the same machine and from other linux machine in the same network.