Page 1 of 3
Reload java extension
Posted: 18 Mar 2006, 10:15
by radz
I have a problem when reloading my java extensions. If I compile the file and click reload in the admin interface, it still reloads the old class. I have to restart sfs to run the new class. Is that related to my jvm or the sfs?
Posted: 18 Mar 2006, 14:45
by Lapo
that's weird, the java class should be reloaded each time
Do you compile your class and put it in the javaExtensions folder?
Posted: 18 Mar 2006, 16:47
by radz
Yes, and if I restart the server the changes are loaded.
Once loaded, I can even delete the class file and press reload, this will reload the deleted class file as if it still existed. It seems like the jvm is caching the class. I've also tried it on the pixel demo with the same result.
Posted: 18 Mar 2006, 16:50
by Lapo
Thanks for the info, we'll look into it and post a solution as soon as possible

Posted: 20 Mar 2006, 10:07
by Virusescu
Lapo, same here.
The same problem apply to the Zone extension written in AS.
SFS doesn't react neighter to the Reload Zone nor to the Reload Extension button pressed for a zone extension.
It works only after a server restart.
Posted: 20 Mar 2006, 10:11
by Lapo
one moment... Reloading AS extensions has always been working

If you can't reload an extension, probably a compilation error is being thrown. Check your console, or the wrapper logs if you run it as a service.
Probably the Java extension issue noticed by radz is similar, I will do a test soon and I'll let you know
Posted: 20 Mar 2006, 12:31
by radz
I have no problem reloading AS extensions.

I don't get any error messages when reloading java extension either, it's looks fine except it's reloading the old version of the class.
Posted: 21 Mar 2006, 10:58
by Lapo
radz wrote:I have no problem reloading AS extensions.

I don't get any error messages when reloading java extension either, it's looks fine except it's reloading the old version of the class.
Radz you're right. The problem is with the Java default classloader which does not load newly compiled classes.
Thanks for spotting this!
I am already working on it

Posted: 26 Mar 2006, 14:43
by radz
Lapo, any news about the dynamic reload? I noticed that the same problem is still in the 1.4.0 final release. Do you think it will be fixed soon?[/quote]
Posted: 27 Mar 2006, 08:04
by Lapo
Hi,
I think there's a little mistake in the 1.4.0 launcher. It includes the
javaExtensions/ folder in the classpath.
If you're under Windows open the start.bat file and remove that folder. Then stop and start the server. It should fix the problem

Posted: 27 Mar 2006, 15:31
by radz
Perfect! It's working fine now, thanks!

Posted: 14 Jan 2008, 00:08
by turtlesoup
Hey Lapo,
I was having the same problem reloading java extensions from the Admin tool. I deleted that javaExtensions folder from the start.bat and it's working now. This is on SFS 1.6.
Just a reminder if you were intending to fix that and forgot about it or something.
Posted: 31 Jan 2008, 00:44
by jigidyjim
Hi - I'm having this problem too.
I just upgraded from 1.5.5. to 1.6.1 today, and now reloading java extensions has stopped working. I have to completely stop and start the server again (a restart doesn't work either).
Any work arounds?
Posted: 31 Jan 2008, 13:49
by Lapo
Yep!
turtlesoup sorry about being late on checking this one.
We're checking the issue in the next hours. Stay tuned

Posted: 31 Jan 2008, 14:18
by Lapo
The solution is actually in the above previous message of mine:
I think there's a little mistake in the 1.4.0 launcher. It includes the javaExtensions/ folder in the classpath.
Depending on how you run the service (service/daemon) or standalone you should remove the reference to that folder in the classpath folder.
Service/Daemon:
open the Server/conf/wrapper.conf and remove the classpath line referencing the folder
Standalone:
open the start.sh (Unix) or start.bat (Windows) and remove the classpath entry
Additionally you can turn on the <AutoReloadExtension> feature to make the server auto-detect extension saves.