HotSwap Fails due to 'delete method not implemented'


I am developing a plugin that allows users to HotSwap classes on a Sling Based Server. This is my setup:

- IntelliJ CE 14.0.3, build 139.1117
- Remote Debug Server with Socket, Attached on localhost port 30303.
- Started the server with tthe given command line arguments '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=30303'

Both IntelliJ CE as well as Slng Server run with the same JVM (Apple's 1.6.0_65) on a Mac Pro with Yosemite. Configured HotSwap to run after each compile automatically but when I do I see these error messages in the Event Log of the Remote Server:

7:49:31 AM Compilation completed successfully in 1 sec
7:49:31 AM Hot Swap failed
           Sling Remote Debug Server: delete method not implemented;
           Sling Remote Debug Server: Operation not supported by VM

The class in questions is an OSGi Service component and I changed a string that is returned from a method (added 'a Sling Server Test'):

@Service(value = HelloService.class)
@Component(immediate = true)
public class HelloServiceImpl implements HelloService {

SlingSettingsService settings;
String getMessage() {
      return "Hello World, this is a Sling Server Test instance " + settings.getSlingId();


Any idea what is causing HotSwap to fail, what the 'delete method not implemented' means and if that can be fixed.

Comment actions Permalink

I tried also on OpenSuSE with Java 1.7 and it still fails the same way.

Comment actions Permalink

I delved into the issue a little bit further and so I want to clarify a few things.

1. I did not try that with official Apache Sling but Adobe AEM 6.0 which is based on Sling.

2. I tried multiple Java Versions and none of them did work including the same Java version that IntelliJ is running with.

3. Using Apache Sling 7 the HotSwap does not fail but it does not reload any classes on the server side and the class does provide the old functionality

I assume this might be an issue with Sling using an OSGi service to manage bundles and classes and that the hot swap might have issues with it. That said in Ecllipse (Luna) the hot swap works with Adobe AEM.

Cheers - Andy Schaefer


Please sign in to leave a comment.