Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    But not in EAP
    Graziano Felline
    @ogipogi
    ok, thank you for the info
    Vladimir Dvorak
    @skybber
    not at all, hope it helps you
    Graziano Felline
    @ogipogi
    :thumbsup:
    Graziano Felline
    @ogipogi

    Ok, it looks lie the app i have is to large (large monolith).
    The deployment of ear hangs, if i have JBossModules plugin activated.
    It hangs on:

    17:40:09,444 INFO  [org.jboss.weld.deployer] (MSC service thread 1-1) WFLYWELD0003: Processing weld deployment app.ear

    jstack:

    at org.jboss.as.weld.deployment.processors.ExternalBeanArchiveProcessor.findExportedResource(ExternalBeanArchiveProcessor.java:330)
        at org.jboss.as.weld.deployment.processors.ExternalBeanArchiveProcessor.findExportedResources(ExternalBeanArchiveProcessor.java:313)

    With disabled JBossModules plugin deployment duration is ca. 8 min.

    Any hints how i can patch JBossModules plugin for test if swapping works to an explicit module (ejb jar)?

    Vladimir Dvorak
    @skybber
    look into ModuleClassLoaderTransformer
    if you are not attached by external debugger, then you also need autoHotswap=true
    There are generally 2 ways how the JVM can get new bytecode, 1. from debugger 2. from HA ussing autoHotswap
    Vladimir Dvorak
    @skybber
    Anyway for Wildfly, I would try to remove unused plugins directly from hotswap-agent.jar. It will avoid a lot of useless scanning especially on jboss eap, where are a lot of classloaders that slow things down.
    1 reply
    I would recommend to test it outside docker at first, if it works, then docker is next level
    Graziano Felline
    @ogipogi

    The reason for hanging (much slower deployment) is:

    • Setup has a lot of sub projects (large monolith)
    • I set hotswap-agent.properties in one of these sub projects src/main/resources folder withextraClasspath=[path_to_my_project]/build/classes/java/main
    • During deployment of other ejbs (other sub project) it checks now if on the extraClasspath it exists a META-INF/beans.xml or META-INF/jandex.idx file

    Stack (java.nio.file.Files.exists(Files.java:2385))

    java.lang.Thread.State: RUNNABLE
      at sun.nio.fs.UnixNativeDispatcher.access0(Native Method)
      at sun.nio.fs.UnixNativeDispatcher.access(UnixNativeDispatcher.java:449)
      at sun.nio.fs.UnixFileSystemProvider.checkAccess(UnixFileSystemProvider.java:306)
      at java.nio.file.Files.exists(Files.java:2385)
      at org.jboss.modules.PathResourceLoader.lambda$getResource$4(PathResourceLoader.java:155)
      at org.jboss.modules.PathResourceLoader$$Lambda$7/2033524545.run(Unknown Source)
      at org.jboss.modules.PathResourceLoader.doPrivilegedIfNeeded(PathResourceLoader.java:248)
      at org.jboss.modules.PathResourceLoader.getResource(PathResourceLoader.java:155)
      at org.jboss.modules.ModuleClassLoader.loadResourceLocal(ModuleClassLoader.java:410)
      at org.jboss.modules.ModuleClassLoader$1.loadResourceLocal(ModuleClassLoader.java:144)
      at org.jboss.modules.Module.getResources(Module.java:861)
      at org.jboss.modules.Module.getExportedResources(Module.java:904)
      at org.jboss.as.weld.deployment.processors.ExternalBeanArchiveProcessor.findExportedResource(ExternalBeanArchiveProcessor.java:330)
      at org.jboss.as.weld.deployment.processors.ExternalBeanArchiveProcessor.findExportedResources(ExternalBeanArchiveProcessor.java:313)

    Is this expected?
    Without hotswap-agent.properties file it doesn't hang anymore, but i have no chance to link to classes for swapping.

    Vladimir Dvorak
    @skybber
    I didn't see that
    Graziano Felline
    @ogipogi
    Hi Vladimir, which part don't you see?
    Vladimir Dvorak
    @skybber
    I did not see the problem yet
    its not clear what place of code calls the check procedure, it seems it is not related to HA
    Graziano Felline
    @ogipogi

    It look like the defined extraClasspath has here an impact.
    I need to understand this first - yes.
    https://github.com/wildfly/wildfly/blob/eacb144910142d456946ea2c429f63abf0cf8b93/weld/subsystem/src/main/java/org/jboss/as/weld/deployment/processors/ExternalBeanArchiveProcessor.java#L309

    Only to be sure - it is right, to place the hotswap-agent.propertiesfile in resources folder of subprojects?

    Vladimir Dvorak
    @skybber
    yes, it is right place for project or module specific HA configuration
    it looks you are interested in this problem :) HA is good starting point to understand underlaying technologies like Weld/JbossModules/Undertow
    My technology stack is little bit different. I'm using OWB/Deltaspike/Tomcat, although I did the Weld/Udertow/Jboss modules some years ago
    bute generally, I'm interested to CDI, JSF, CXF ...
    bosbeles
    @bosbeles
    Hello.
    I am new to this gitter stuff. HotswapProjects/HotswapAgent#372
    I have a
    bosbeles
    @bosbeles
    I want to make hotswap for a swing based application. The panel creation is generally on the constructor. I have used spring plugin and modified the example plugin. It is now half working. HotswapProjects/HotswapAgent#372 I have created an issue/question on github. Maybe this is the right place for that kind of question. Could you help me?
    Arjun Krishnamurthy
    @arjun.krishnamurthy_gitlab
    Hi Team
    We have a java application running in JDK 1.8.0_191 and we are using jboss 7.2 as the application server. we are using eclipse photon(4.8.0) with hotswap 1.3.0. We also have file synchronization setup for JSP changes. We are observing error "hotswap failed VM may be inconsistent"after few changes in java classes. changes are picked up in runtime but debugger thread goes out of sync and we are not able to debug the same class again. This behavior is inconsistent and doesn't have specific patterns. Could you please help on this issue?
    Jak
    @Shadowrs
    I have a question does hsa work with java 12 13 14 15 etc? do you have to do a custom image/jdk build to get it working?
    Jak
    @Shadowrs
    Answered my question herre TravaOpenJDK/trava-jdk-11-dcevm#16 i guess we cant expect any newer than java 11
    Jak
    @Shadowrs
    Yep LTS is only possiblity not 6-month java release cycles https://groups.google.com/g/hotswapagent/c/MU85QPkUY04/m/J0nlanRWCQAJ
    Hanh Le
    @hanh090
    Hi team, I am running project using spring boot and maven wrapper. I using vim and do not like any other IDE (it was too heavy), how can I set up to start hotswap from maven wrapper. (I was successfull install dcvm and hotswap agent)
    cyberquarks
    @cyberquarks
    How does Hotswap compare to JRebel?
    JonathanTractionDK
    @JonathanTractionDK
    Has anyone managed to get the Hotswapagent (with DCEVM) to work with Grails 4?
    Vladimir Dvorak
    @skybber
    We don't have experince, but definitely worth a try it
    JonathanTractionDK
    @JonathanTractionDK
    I'm asking because I'm trying to make it work, I can successfully start the hotswapagent, but it doesn't see my changes at all and I can't find why. I think the structure of grails application is different, so that might be why. How can I modify the directory where hotswapagent checks for changes?
    Vladimir Dvorak
    @skybber
    I don't understand your question. You can modify the directory content without restricotions. I suppose the groovy compilators makes .class files after you modified it.
    Vignesh
    @Vignesh-FullStackDeveloper
    Actually I m using Java 8 in Apache Netbean for JSF project.
    I just installed and setup the Hotswap.but If I changed any thing in my code ,tomcat get restarted.Could you please help me on this.
    Vladimir Dvorak
    @skybber
    Vignesh
    @Vignesh-FullStackDeveloper
    image.png
    Yes I followed all the steps..
    I got hotswap log while starting tomcat..as above
    but still if i do some, changes tomcat is redeploying..
    Welton Rodrigo Torres Nascimento
    @weltonrodrigo
    Hi guys. I'm managed to get travaopenjdk working with my jsf project. I believe it's necessary to specify webappDir on hotswap-agent.properties to get xhtml reload working.
    But I couldn't find a mention to it in the jsf plugin page. I'm willing to improve the docs if it's the case, but could not find the repo hosting the site. Where can I find it so I can open a PR?
    Vladimir Dvorak
    @skybber
    For JSF reloading, I'm using standard configuration in web.xml:
        <context-param>
                <param-name>javax.faces.PROJECT_STAGE</param-name>
                <param-value>Development</param-value>
        </context-param>

    MyFaces plugin does not do a lot for XHTML reloading, look at:

    https://github.com/HotswapProjects/HotswapAgent/blob/master/plugin/hotswap-agent-myfaces-plugin/src/main/java/org/hotswap/agent/plugin/myfaces/MyFacesPlugin.java#L82

    there is .properties reloading and managed bean reloading.

    lulnope
    @lulnope
    Hello.
    I'm using HA + TravaJDK 11 with Wildfly 18. Reloading EJBs works great when I edit method body. However method signature changes seem broken. New methods are called without any interceptors. This leads me to believe that EJB reload isn't really supported by HA.
    1. Is there support for EJB 3 reloading in Hotswap-agent currently? Is it planned in the future?
    2. If it is not planned, why? Are there any reasons inherent to EJB3 that would prevent someone from implementing HA support for Wildfly (for example: complexity)?
    Vladimir Dvorak
    @skybber
    EJB3 is not supported, no plan to do it, but you an try to do it :)
    nomuna
    @nomuna
    Hello everyone... Is there a way to deactivate some of the plugins selectively? For example I am using the fatjar and I do not want to use the hibernate plugin....
    Vladimir Dvorak
    @skybber
    Matsuuu
    @mmatsuuu:matrix.org
    [m]

    I set up Hotswap Agent to work with wildfly. I am able to connect to the instance with wildfly, and recompile classfiles.

    However one of my projects contains JSP files and serves them through REST endpoints, and when I compile those classes, I get the following error:
    Could not reload rest class Hotswap agent org.jboss.resteasy.spi.LoggableFailure: RESTEASY003880: Unable to find contextual data of type: javax.servlet.ServletContext

    The class causing the error is a controller (containing the rest endpoints) class if that has anything to do with it