Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    bhuvangu
    @bhuvangu
    @skybber didnt get your comment ..
    bhuvangu
    @bhuvangu
    While running the hotswap i am getting this exception .. request for help
    HOTSWAP AGENT: 21:57:45.161 INFO (org.hotswap.agent.HotswapAgent) - Loading Hotswap agent {1.1.0-SNAPSHOT} - unlimited runtime class redefinition.
    HOTSWAP AGENT: 21:57:45.725 ERROR (org.hotswap.agent.config.PluginRegistry) - Error in plugin initial processing for plugin package 'org.hotswap.agent.plugin'
    java.lang.ClassNotFoundException: org/hotswap/agent/plugin/hotswapper/HotswapperPlugin
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:278)
            at org.hotswap.agent.config.PluginRegistry.scanPlugins(PluginRegistry.java:89)
            at org.hotswap.agent.config.PluginManager.init(PluginManager.java:125)
            at org.hotswap.agent.HotswapAgent.premain(HotswapAgent.java:52)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:606)
            at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:382)
            at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:397)
    Andrew Tran
    @xXAndrew28Xx
    About to use it for the first time, hopefully this stops me from having to wait 3 minutes everything I change some code
    oh no stacktrace
    Anyone have any idea why it happens?
    it isn't present without hotswapagent
    Andrew Tran
    @xXAndrew28Xx
    Is there any way to disable a specific plugin
    if there isn't, i'll just clone and compile a version without that plugin
    Andrew Tran
    @xXAndrew28Xx
    well that worked
    the issue was that the log4j2 plugin didn't check for all the classes required before starting itself
    https://github.com/xXAndrew28Xx/HotswapAgent (version w/o log4j2 plugin)
    I probably should make an issue
    Zakaria Amine
    @zak905
    Hello guys,
    I am trying to use HotSwpAgent on Windows with JRE 1.8
    I am getting this error
    Invalid layout of java.lang.Thread at name
    Error occurred during initialization of VM
    Invalid layout of preloaded class: use -XX:+TraceClassLoading to see the origin of the problem class
    Zakaria Amine
    @zak905
    it turns out it was a JRE version issue
    I solved after updating to JRE 1.8 131
    sdeepugd
    @sdeepugd
    Can i install DCEVM to Oracle JVM 1.8 ?
    I am using this version jdk-8u144
    Vladimir Dvorak
    @skybber
    should work
    Prateek Chachra
    @prateekchachra
    I am replacing the class files in their respective places with the patch on + hotswapagent as the default classloader. It is not working at all, not even detecting. Please help!
    initzx
    @initzx
    Hello, I'm trying to hotswap running programs/jars. Is it possible to accomplish that with hotswap agent?
    Vladimir Dvorak
    @skybber
    You can redefine classes inside jars/programs using extraClassPath , look at configuration http://hotswapagent.org/mydoc_configuration.html
    Zakaria Amine
    @zak905
    Hello everybody
    I am using Hotswap successfully on my web apps running on Tomcat
    but failing to use it on a simple java main class
    public class JavaEcho {
      public static void main(String[] args) {   
          String input = "";
          while(!"quit".equals(input)) {   
             System.out.print("Say : ");
              Scanner scan= new Scanner(System.in);
              input =  scan.nextLine();
              System.out.println("Echo: " + input);
              } 
      }
    }
    I have the hotswap-agent.propeties in the same directory with the following properties:
    extraClasspath=compile/JavaEcho.class
    autoHotswap=true
    when I run the app , and modifiy something and compile again I see something like:
    Zakaria Amine
    @zak905
    HOTSWAP AGENT: 20:48:40.987 RELOAD (org.hotswap.agent.config.PluginManager) - Reloading classes [JavaEcho] (autoHotswap)
    which means that the agent receives the event
    but the changes are not applied
    am I missing on something here?
    Vladimir Dvorak
    @skybber
    Hi, are you using dcevm?
    Zakaria Amine
    @zak905
    Yes off course
    java -XXaltjvm=dcevm -javaagent:/home/zakaria1/Downloads/hotswap-agent-1.0.jar -cp . JavaEcho
    Jiri Bubnik
    @edudant
    Hi, split your main method into two seperate methods - main with while cycle and reader() with the rest. Change of active method is generally not supported (although in some cases it is possible)
    Zakaria Amine
    @zak905
    @edudant thanks for your suggestion, it still does not work. Maybe static methods are not supported
    Vigneshwaran
    @imvigneshb
    Can anyone guide me to configure Hotswapagent into my STS for Spring Hibernate project with JPA, Hibernate-Validator
    Zakaria Amine
    @zak905
    are you using Spring boot ?
    Vigneshwaran
    @imvigneshb
    Nope..
    Am using Spring WebMVC
    Zakaria Amine
    @zak905
    ok how are you deploying the app ? on Tomcat?
    Vigneshwaran
    @imvigneshb
    Yes in tomcat
    Zakaria Amine
    @zak905
    so you have to create a hotswap-agent.properties in src/main/resources
    Vigneshwaran
    @imvigneshb
    ok in that properties what i need to mention
    Zakaria Amine
    @zak905
    extraClasspath=WEB-INF/classes
    autoHotswap=true