We are looking a free alternative for jRebel. It seems hotswap agent is a free good alternative for jRebel. But I didn't sure about it supports weblogic server , is there anyone use hotswap agent with weblogic server and how?
-
1I am too looking at dcevm/hotswap right now and I am about to experiment with using it on weblogic. I found that in this issue https://github.com/HotswapProjects/HotswapAgent/issues/164 it is said that weblogic is not officially supported, so this is a bit discouraging. On the other hand one of commenter submitted some draft for a plugin that adds weblogic support. – tporeba Jan 17 '22 at 10:52
-
1For now my weblogic won't even start with latest jdk8 dcevm version - I get this https://github.com/dcevm/dcevm/issues/101 – tporeba Jan 17 '22 at 16:56
1 Answers
DCEVM and HotswapAgent do not support Weblogic. Maintainers are clear about that, it is mentioned in many issues: here, here and here.
So if you are looking for a solution that will flawlessly work out of the box on WLS, is up-to-date and supported for recent java versions, then I'm afraid DCEVM is not one.
But if your are ok with unsecure, hacky solution, then read on.
The first problem with dcevm and weblogic is to even get it running. I tested weblogic docker image with dcevm + HotswapAgent and most combinations of oraclejdk and dcevm versions cause error or other JVM/WLS crash on startup. Long time ago the maintainers said oraclejdk should work with dcevm, but I guess this is not actively supported/tested and just works by coincidence on some combination of versions. Deep magic used by WLS doesn't help also.
But thanks to some comments I found WLS will start on these two:
- oraclejdk 1.8.0_05 + dcevm installer-light-jdk8u5.52.jar (25.5-b02-dcevmlight-58)
- oraclejdk 1.8.0_25 + dcevm DCEVM-light-8u45-installer.jar (25.45-b02-dcevmlight-15
NOTE: These versions are ancient and probably have lots of security vulnerabilities, use at your own risk.
procedure:
- overwrite original java
/u01/jdk/
in the image, - take
linux_amd64_compiler2/product/libjvm.so
from dcevm installer and put it in/u01/jdk/jre/lib/amd64/dcevm
- add
-XXaltjvm=dcevm
to weblogic commandline. - (optionally) to get HotswapAgent features:
- add
hotswap-agent-core.jar
orhotswap-agent.jar
in/u01/jdk/jre/lib/amd64/hotswap
together with option-javaagent:/u01/jdk/jre/lib/amd64/hotswap/hotswap-agent.jar
on wls commandline - add
hotswap-agent.properties
to your war/ear/classpath - see also https://github.com/HotswapProjects/HotswapAgent/pull/418
- add
Now run a remote debugging session, modify a class by adding a new method and recompile - hotswapping new method is not supported by standard hotswap, it will only work when dcevm is active.

- 867
- 10
- 23