by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    mkamalov
    @mkamalov
    Class<?> clazz = classLoader.loadClass(className);
    Method m = clazz.getDeclaredMethod(HOTSWAP_AGENT_CLINIT_METHOD, new Class[] {}); My log says that no method found in class.
    It it not clean where the code that updates this class in the classloader between ctClass.addConstructor(haClinit) line and Class<?> clazz = classLoader.loadClass(className);
    Please, could you explain?
    Vladimir Dvorak
    @skybber
    method public static void patch(final CtClass ctClass is called from HotswapTransformer.transform, it adds $$ha$clinit method to class. Then the class is reloaded by dcevm, so the actual class reinitialization must be called in callback using scheduler.scheduleCommand. Class is now redefined after 150ms since the class can have be proxied by dynamic proxies (com.sun.proxy, etc...).
    davidezucc
    @davidezucc
    Rajkumar
    @rajsennimalai
    How to use hotswapper plugin withouy using IDE. I'm starting wildfly server with hotswapagent and altjvm options. I have a exploded war file with hotswap-agent.properties file with watchresources and extraclasspath pointing to the class folder. Whenever the classes files are getting changes ,the changes are not hotreloaded. Am i missing any configurations?
    Vladimir Dvorak
    @skybber
    @rajkumar: loot at autoHostawaphttp://hotswapagent.org/mydoc_configuration.html
    Rajkumar
    @rajsennimalai
    HI Vlaadimir,
    I have checked the documentation..But still classes are not getting reloaded. Look at https://stackoverflow.com/questions/55687372/hotswapper-plugin-is-not-reloading-classes-in-web-project for description
    Vladimir Dvorak
    @skybber
    even with autoHostawap=true in hotswap-agent.properties?
    Rajkumar
    @rajsennimalai
    Yes Vladimir
    Vladimir Dvorak
    @skybber
    and extraClasspath=your_build_path ?
    Rajkumar
    @rajsennimalai
    Mapped to target/classes folder
    LOGGER=trace
    extraClasspath=/home/user/HotSwapTest/target/classes
    webappDir=/home/user/HotSwapTest/src/main/webapp
    watchResources=/home/user/HotSwapTest/target/classes
    autoHotswap=true
    autoHotswap.port=8000
    Vladimir Dvorak
    @skybber
    I've pushed cosmetic fix in HotSwapperJpda.java , but I can't just help you with this, I'll check it soon ...
    Rajkumar
    @rajsennimalai
    Ok...thanks
    atamboli3
    @atamboli3

    Hi, i am looking for An Open source alternative for JRebel, but i am dealing with JAVA 1.6 , will your solution will support with this java version?
    if YES, Could you please tell me what i need to do...???

    Thank You...

    Vladimir Dvorak
    @skybber
    1.6 is too old. HA need j7 at least, j6 does not have generics <> that are necessary
    but you can use some old dcevm, probably from original source
    atamboli3
    @atamboli3
    Thanks Vladimir...
    As i am not aware of this things, Could you please let me know where i can get this old dcevm version (i looked out but didn't got any link or references).... Please share any link/reference if you have....
    Vladimir Dvorak
    @skybber
    atamboli3
    @atamboli3
    Thank You...
    davidezucc
    @davidezucc
    Hi all, a simple question...can HotSwapAgent hotreload resources in META-INF folder (css,js,img)?thx
    Vladimir Dvorak
    @skybber
    META-INF files are usually loaded using ClassLoader.getResource, HotswapAgent add watchResource path into this mechanism, but does not change anyway. Maintaining/ Loading resource file is done by framework/application, file can be cached in browser or even on server.
    Quintin Siebers
    @qsiebers
    New HA user here. Can HA only be used to hotswap dependency classes (in webapp) when their classes folder is added to extraClasspath configuration? Or is it possible for HA to find all hotswap-agent.properties files on the entire classpath and find dependency hotswap classes via their respective extraClasspath properties?
    Alain Tavan
    @alain57
    Hi all, just a small question :
    any plan on releasing a new version for 11.03 ? or is it needed to build the binaries from source ?
    Vladimir Dvorak
    @skybber
    currently I've no plan to do it.
    mryvz
    @mryvz
    Hello , I ve question. Im new in HotswapAgent and trying to work with thorntail (wildfly)
    i ve managed to hotswap my web application , but changes i ve made beign applied a bit late
    about every 10 secs , not as soon as i save the file , anyone knows how to solve this
    thanks btw ^^
    Alain Tavan
    @alain57
    Hi again,
    on this page : https://github.com/TravaOpenJDK/trava-jdk-11-dcevm it is written that I can build my own release
    Small question about that : do I need something special to make a build based on 11.0.4 ?
    I also saw that the travis yaml file has references to jdk10, any reason for that ? Or is this travis file not up to date ?
    Thanks in advance for your help.
    @mryvz after saving process, java build new classes and reload them this takes a bit.
    On the project i'm working building new classes takes also 10-15 secondes
    you need to wait after the IDE told you that the classes where reloaed or do you try to refresh the webpage directly after pressing save without waiting that everything was reloaded?
    Vladimir Dvorak
    @skybber
    Hi, just fork the repository, create your travis account, add forket project and build :) java10 is used for build java11 image
    forked ...
    David Brown
    @davebrown1975
    Hi all - has anyone used hotswap with success on a Grails 4 project?
    If this works well, you're likely going to have a flood of Grails developers looking to avoid being forced to use jRebel just to remain productive since Grails 4 uses a later version of spring boot so no longer has the magic behind hot-swapping of classes which was one of the attractions of the framework in the first place.
    mryvz
    @mryvz
    @alain57
    i dont think its compile issue , im using compile on save option in netbeans. Save configuration with tomcat working almost insta ,
    as you sugested i refresh page without waiting classes updated message but nothing :( ,
    in my opinion wildfly (thorntail) has internal classpath something like search deamon which has 10 secs period
    Vladimir Dvorak
    @skybber
    extraClasspath is supported on wildfly. I dont know if netbeans use JDI to hotswap classes, but extraClasspath + autohotswap could work. As I know Kotlin and Scala works with dcevm+hotswagent
    Guilherme Chafy
    @guichafy
    Hi guys, The Hotswap Agent there are support to replace JSP files in Jboss?
    Vladimir Dvorak
    @skybber
    Hi, it could work, bute there is some threads relating to JSPs at https://groups.google.com/forum/#!forum/hotswapagent , otherwise I've no personal experience with JSP hotswap
    gkna
    @gkna
    Hi, i have done successful integration of Hotswap Agent(used openjdk11) with wildfly. I have connected wildfly with remote debugger from eclipse. Code changes are getting reflefcted only for methods. If i add a new class it is not getting swapped to the wildfly, i am getting java.lang.NoClassDefFoundError. Can anyone help me how i can fix this?
    Vladimir Dvorak
    @skybber
    Are you sure that the new class is deployed to wildfly? Otherwise if you're deploying via wars it could not work
    gkna
    @gkna
    No, i am not copying the new class to wildfly. I was in an assumption new class will be moved to wildfly after compilation.
    gkna
    @gkna
    I have configured extraClasspath in hotswap-agent.properties file. This path is not getting registered and not seen any error also in the log. Other options like LOGGER=DEBUG has taken.
    gjevardat
    @gjevardat
    Hello
    I have strange behavior with the agent. I have SpringBoot + Vaadin + tomcat setup.
    For my test I have a simple thread that output string in a console.
    When I change the value of the output string, I have to reload the page to have the updated srting , but the previous string is still outputed. Actually I can see that 2 Threads are now present like if the hotswap agent did a duplication of the updated code.
    Thread t = new Thread(new Runnable() {
                @Override
                public void run() {
                    while(true) {
                        try {
                            System.err.println("within the loop 7");
                            Thread.sleep(2000);
                            if(grid.isAttached() && grid.isVisible() ) {
    
                                updateLastActiveRuns();
                            }
                        } catch (InterruptedException e1) {
    
                        }
                    }
                }
            });
            t.start();
    So basically each time I update the output string, I have a new version of the code that is spawned, concurrently to previous versions
    gjevardat
    @gjevardat
    It looks like the current session is tied to the running version of the code, and only a new session will trigger the loading of new code