Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    vikrantch-hk
    @vikrantch-hk
    @skybber i removed -vm and -vmargs from eclipse.ini and it worked
    vikrantch-hk
    @vikrantch-hk
    can we enable hot swapping while debugging also, as of now my application restarts on adding new classes
    vikrantch-hk
    @vikrantch-hk
    @skybber please help
    Vladimir Dvorak
    @skybber
    You should disable auto realoding on Modules page in Sever Setup
    vikrantch-hk
    @vikrantch-hk
    @skybber hot to disable auto reload if using spring boot's embedded tomcat
    vikrantch-hk
    @vikrantch-hk
    @skybber is there any way to hotswap while doing remote debugging
    Vladimir Dvorak
    @skybber
    There is no problem to do hotswap when remote debugging. But only the modification of class is allowed, creating a new class is not supported. You should copy new classes to destination beforehand hotswap to support this kind of change.
    vikrantch-hk
    @vikrantch-hk
    @skybber is there any way to configure this in intellij (copying new classes to destination) using maven
    Vladimir Dvorak
    @skybber
    I'm not expert on Intellij, but you can definitely use some external tool to synchronize it. New class must be copied to destination before it is used (loaded) by JVM
    Andreas Resios
    @resios

    I'm trying to build the master branch for hotswap (mvn clean install -DskipTests) to get the latest patches but when I try to run it in the JVM I'm getting the following stacktrace:

    HOTSWAP AGENT: 11:56:11.320 DEBUG (org.hotswap.agent.plugin.jvm.ClassInitPlugin) - Skipping old field log
    HOTSWAP AGENT: 11:56:11.322 DEBUG (org.hotswap.agent.plugin.jvm.ClassInitPlugin) - Skipping old field savedBeers
    HOTSWAP AGENT: 11:56:11.322 DEBUG (org.hotswap.agent.plugin.jvm.ClassInitPlugin) - Skipping old field nextBeerId
    Exception in thread "Thread-19" java.lang.IllegalStateException: Unable to redefine classes
            at org.hotswap.agent.config.PluginManager.hotswap(PluginManager.java:276)
            at org.hotswap.agent.plugin.hotswapper.HotswapperPlugin$1.executeCommand(HotswapperPlugin.java:94)
            at org.hotswap.agent.command.impl.CommandExecutor.run(CommandExecutor.java:25)
    Caused by: java.lang.UnsupportedOperationException: class redefinition failed: attempted to add a method
            at sun.instrument.InstrumentationImpl.redefineClasses0(Native Method)
            at sun.instrument.InstrumentationImpl.redefineClasses(InstrumentationImpl.java:170)
            at org.hotswap.agent.config.PluginManager.hotswap(PluginManager.java:272)
            ... 2 more

    This seems similar with #162, but I've verified that the JVM has dcevm installed and it's used.
    Also if I switch back to the latest official release, it starts working again.

    I tried running mvn release:prepare release:perform but it fails to generate a jar file.
    For building I'm using Oracle JDK 1.8.0_151
    For running I'm using Oracle JDK 1.8.0_144

    Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
    Dynamic Code Evolution 64-Bit Server VM (build 25.71-b01-dcevmlight-2, mixed mode)

    Any help would be appreciated.

    Andreas Resios
    @resios
    @resios I found the problem. As indicated by the stacktrace, dcevm was not used. Apparently if java is started with the -server flag, the -XXaltjvm=dcevm -javaagent:/home/deceneu/hotswap/hotswapagent/hotswap-agent-1.1.0-SNAPSHOT.jar need to be after it, otherwise the -XXaltjvm=dcevm is ignored. After re-positioning the arguments, everything works as expected.
    Alexander Bartash
    @AlexanderBartash
    Hi guys, hi @skybber I am trying to figure out why version 1.1.0 works in my project based on SAP Hybris platform and 1.2.0 does not. Do you have any information how to debug hotswap agent? I am particularly interested in Spring Plugin.
    Alexander Bartash
    @AlexanderBartash
    More precisely 1.2.0 works but it screws up spring context in the runtime and the app does not start. 1.2.1 does the same and logs additional errors.
    Vladimir Dvorak
    @skybber
    Hi, thanks for info. I don't have any experience with Hybris neither I have any prepared tests for it. But may be you can find out of your own. It is not so hard to do. All what you need is the last working commit ID and then you can do "git bisect" on repository and build/test each itermidiate version. We don't have too much versions since 1.1
    Alexander Bartash
    @AlexanderBartash
    Yeah, that is what I am going to do. I am just curious if there is any way to debug the agent in runtime. It may be not possible because of the way it is being run.
    Actually breakpoints seem to be working. Thanks :)
    Alexander Bartash
    @AlexanderBartash
    What does tomcat plugin do?
    Vladimir Dvorak
    @skybber
    You can change hotswapagent's code when you debug hotswapagent, it seems creazy but you really do it.
    Tomcat plugin patches the Tomcat's(Tomee, Payara, GlassFish) WebAppClassloader and allow to use extraClassPath+webappDir properties.
    There is some description of extraClassPath & webappDir : http://hotswapagent.org/mydoc_configuration.html
    Vladimir Dvorak
    @skybber
    This settings are really cool for debugging apps in Docker.
    Alexander Bartash
    @AlexanderBartash
    Thank you
    nwsduy
    @nwsduy
    Hi all, i'm using Hotswap in my project.
    However, i found that project lib in web-inf/lib can not be reloaded when i debugged in Wilfly with Eclipse.
    Is there any solution for this problems?
    Vladimir Dvorak
    @skybber
    content of jar is not able to reload but you can use extraClassPath, look at http://hotswapagent.org/mydoc_configuration.html
    nwsduy
    @nwsduy
    Thank for your confirmation.
    I'm wondering that is there any way to config eclipse to move it jar class into web-inf/classes instead of packing it into jar.
    nwsduy
    @nwsduy

    After move class from jar into web-inf/classes I'm facing with some problem:

    1. Update Web services: Get warning about [Multiple resource methods match request]
    2. Update Web services: Sometime ConcurrentModificationException happen
    3. Update statebean: If i try to inject another bean or do something complicated, NullPointerException will happen

    Can some one help me on this case?

    Vladimir Dvorak
    @skybber
    Please create an issue on github with full stacktrace & description
    nwsduy
    @nwsduy
    After a little of debuging i found:
    1. This is our mistake. Developer add Stateless to WebServices class.
    2. May be same cause with 1.
    3. Look like the bean is redefined it still error. I will try to confirm this problem again and create issues if need.
      Thanks.
    Vladimir Dvorak
    @skybber
    Could you create minimalistic non-working example? We have example apps used for testing e.g. https://github.com/HotswapProjects/HotswapAgentExamples/tree/master/deltaspike-hibernate-jsf
    nwsduy
    @nwsduy
    Got it, i will give it a try on example source code.
    Edoardo Luppi
    @lppedd
    Hi guys. Is HA compatible with WebLogic?
    Vladimir Dvorak
    @skybber
    Hi, look at HA WebLogic issues. We didn't do any tests with WebLogic in past, may be you can be much successful with OpenLiberty.
    Sorry for that, liberty is not optin for WebLogic...
    Edoardo Luppi
    @lppedd
    Don't worry, I'll do a couple of test
    Edoardo Luppi
    @lppedd
    Seems it's working fine for simple things. A question, has anyone tried DCEVM and HotswapAgent with EJB 2.x?
    Vladimir Dvorak
    @skybber
    EJB s are not supported
    Edoardo Luppi
    @lppedd
    Any plan on supporting it?
    Vladimir Dvorak
    @skybber
    No plan
    Misha
    @mikeldpl
    It would be nice to have it as default feature for IDEA. Did you have some discussion on this topic?
    Vladimir Dvorak
    @skybber
    No, but there is some plugin for IDEA as I know.
    Alain Tavan
    @alain57
    Hi All, short question : my company switched from java 8 to java 11
    i'm used to use hotswapagent. but as far as I know since java 9 this works differently integrated in an openJDK .
    where can I find the openJDK 11 with preintegrated hotswapagent ? Or does this not exists ?
    Vladimir Dvorak
    @skybber
    Hi, still does not exist. I've checked it today, it shouldn't be such problem like with java8->java9
    Alain Tavan
    @alain57
    I read on a support case that i was planned that DCEVM would be integrated in adoptopenjdk.net
    Is this already integrated with the released openJDK11 or is there still some work to do ?
    sorry for the dumb questions. I'm really used to it and it is painfull to work without it. You guys really did an amazing job with this !!!!
    Vladimir Dvorak
    @skybber
    DCEVM is still not integrated/distributed via AdoptOpenJDK.
    Alain Tavan
    @alain57
    Do you provide any binary for test (win 10 x64 in my case) or is it still not usable ? I saw some commits done these lasts days. This sound encouraging :)
    I really wish your guys good luck :P
    Vladimir Dvorak
    @skybber
    Builds for linux are available at https://github.com/HotswapProjects/dcevm11build-linux
    for win still missing, we didn't find a way how to compile it on travis, adopt is still not agreed. But it is not difficult to do it. cygwin+msvc should be enough! Or you can use https://github.com/AdoptOpenJDK/openjdk-build and change source repository to dcevm11
    Vladimir Dvorak
    @skybber
    Vladislav Tankov
    @TanVD
    Hi everyone! Are there any info on HotSwapAgent compatability with Kotlin? I see that there were problem with AnonymousPatch plugin and it is still relevant, but no other info...
    Vladimir Dvorak
    @skybber
    I've tried Kotlin project in the past and had no problems.
    Vladislav Tankov
    @TanVD
    Well, right now we have disabled AnonymousClassPath plugin due to HotswapProjects/HotswapAgent#263 . As far as I understood -- you've found the bug and it is possible that solution will be included in next releases?