-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PlugIn/Compatibility between Payara and Hotswap Agent #715
Comments
Would you be more specific? What are the issues when you try to use Hotswap Agent with Payara server? Hotswap Agent requires to modify your JDK with a patch, and then add a java agent to the application server.
If above steps don't work, please post more details about your issues. |
Hello OndrejM, thank you for your answer. I tried to install the HotSwapAgent like you explaned. But I get the error:
so I added the HotSwapAgent.jar into the domain1/lib/ext-Path and added some packages to the osgi.properties (like describe here: click ) The payara starts as normal and the server.log shows some started plugins. But when I try to change a session bean, Eclipse throws the standard error the code could not be swapped. I attached the log file and some screenshots. I hope you can help me :-) Many thanks in advance, Andreas server.log:
|
@angerhard, could you try installing DCEVM using the other option - "Replace by DCEVM"? You should not use an option -XXaltjvm=dcevm then, only -javaagent... I tried to setup DCEVM and HotSwap agent with Payara and Netbeans on Ubuntu Linux, with Java 8, and also received errors in Netbeans when I tried to rename a method - the same thing I would get if using just normal hot replace with Hotspot JVM from Oracle. I was using altjvm installation option. After a while I tried to install DCEVM using option "Replace by DCEVM", and then hot replace worked sesamlessly when I changed method name. So I suppose that Payara works with HotSwap agent, but the installation option as altjvm does not work. Possibly this is an issue with the Oracle JVM itself, as it should consider the -XXaltjvm option and load JVM from dcevm directory in JRE lib folder. As DCEVM developers would possible know more, I created an issue for DCEVM: |
@angerhard, some good news :) I found out that HotSwap doesn't work with |
Hi OndrejM, yes, I tried both ways, but don't get any of them running. I tried following simple code (I tried to test something simple): import java.util.logging.Logger; import javax.ejb.Stateless;
(and started the webservice over the installed Tester). Sometimes (but not deterministic) I received a warning in the server.log:
I think I am overssing something simple ...
|
Are you sure you patched the following Java installation? C:\opt\payara41hs\jdk1.8.0_74 Can you find this folder: C:\opt\payara41hs\jdk1.8.0_74\jre\lib\amd64\dcevm ? |
I havn't access on this machine by now, will check it in the evening. But I got hotswap-messages in the server.log, so I am very sure the jdk is patched (I have build up a simple installation for this test). |
You get hotswap messages with any JRE, even the unpatched one. The messages come from the java agent, which works to some extent even with an unpatched JRE (relaoding of framework specific files), but java code replacement is limited to what unpatched JRE offers. It is not easy to find out from log whether you are running a patched JRE or unpatched, not even in jVisuaVM - only once you try code replacement with unsupported changes, then you see if it works or not. |
Ah ... I see. |
I was using Linux, I checked on Windows now and the folder structure is different there. So it appears that the installer put it into the correct place in jre\bin\dcevm. The hint is that there is also folder called |
I checked now on a Windows box and I was able to get hotswap working properly. Maybe the problem is with a particular type of change in the code, which is not handled even by the HotSwap DCEVM patch. You are getting error "verifier detected internal inconsistency" - it might be caused by an inconsistent change, see the javadoc of the exception: http://ulibgcj.sourceforge.net/javadoc/java/lang/VerifyError.html To verify that hotswap patch is in place, I did plain rename of a method, and afterwards changed body of the method. The code was repaced and the app behaved differenty. |
@angerhard, were you able to get Hotswap running with Payara? Were my instructions helpful? |
I haven't found any issues using HotSwap Agent with Payara Server on Linux and Windows. However, the configuration to get it running can be a bit tricky. |
Hi, any update on a detailed blog post about how to use HotSwap Agent with Payara Server since this task was closed ? Couldn't find it with Google Would be much appreciated ! :) |
No blog is ready yet, but still in the plan. With the latest version of HotSwap Agent, the following steps should be enough:
In Netbeans:
In Eclipse:
I haven't tried yet in IntelliJ, but it should also work while debugging an application and if application redeploy/automatic publishing is disabled. |
Hi there! First: Tanks a lot for the plan/blog about hot-swapping! Just tried it and ... wow, very nice! Since a full deploy of our application takes up to 60 s this might be a blessing! :) "Might" because one thing does not work and I'm not shure why. Our application is an EAR-Application. Any ideas would be great! What do I miss? |
FISH-6066 (Enterprise) Invalid property 'default-web-xml' on instance start-up
Using Hotswap Agent (open source alternative to JRebel) with Payara for hot code swapping would be very useful and a true benefit to develop jee with it.
The text was updated successfully, but these errors were encountered: