Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    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?
    Vladimir Dvorak
    @skybber
    It is hard to fix it in HotswapAgent, since it should be race condition between HotsawpAgent and IDE synchronization, may be we can increase delay in some way.... But yanonymous class plugin is not necessary if you don't create/remove anonymous classes in hosting class.
    Vladislav Tankov
    @TanVD
    Well, for the Kotlin as far as I understand it is more than likely. There are a lot of anonymous classes supporting, for example, creation of lambdas (which are everywhere)
    But I am not sure that problem is in syncronization in my case. I was sending Reload changed classes signal from IDEA after build is definitely done.
    Vladimir Dvorak
    @skybber
    Modified classes must be saved on classpath before IDEA sends a new bytecode via JVMTI to hotspot (JVM). Redefinition is initialized from JVMTI call (if you do not use extraclasspath), and consequently it calls HotswapAgent intrumentation before classes are actually modified in JVM . I've seen problem when the JVMTI was called before IDE finished saving of classes to classpath - then HotswapAgent does not see new classes on classpath. May be you can try add some sleep (1s) to AnonymousClassPatchPlugin code to check it
    Otherwise we need some good testing example to fix the problem, since Kotlin will be priority for us in next few months.
    Vladislav Tankov
    @TanVD
    Well, as far as I see from debug the problem is with inner classes generated for some functions in Kotlin -- in my case AnonymousClassPatchPlugin triggered for org.company.MyClass$innerFun, while in reality exists only org.company.MyClass$innerFun$1 and etc. This is the case with call of top level extension functions inside of function "innerFun" which overrides "innerFun" from superclass of MyClass
    I've managed to fix it just ignoring non-existance of className in AnonymousClassInfos constructor, but not sure that was the right solution...
    Xiaoliang
    @caitsithx
    Hi Guys, I met this issue starting an Spring project: HOTSWAP AGENT: 13:07:22.792 ERROR (org.hotswap.agent.plugin.spring.scanner.XmlBeanDefinationScannerAgent) - failed to convert filePath /localhost/apps/WEB-INF/RestApi-servlet.xml to classPath path
    Any clue?
    Vladimir Dvorak
    @skybber
    Hi, I'm not author of it, but according https://github.com/HotswapProjects/HotswapAgent/blob/master/plugin/hotswap-agent-spring-plugin/src/main/java/org/hotswap/agent/plugin/spring/scanner/XmlBeanDefinationScannerAgent.java#L114 your config is not at well-known path. Are you able to try to fix the code? I don't have minimal non-working example ...
    Neither am I expert on Spring
    Xiaoliang
    @caitsithx
    Thank you Validimir
    OK. I don't understand how the path get prefixed with '/localhost'..
    Vladimir Dvorak
    @skybber
    Pby it is from URL, you can try to add split :
    paths = filePath.split("WEB-INF/");
    if (paths.length == 2) {
    return paths[1];
    }
    Let's see what happens...
    mkamalov
    @mkamalov
    Hi guys, I met the issue with hotswap agent with private static enum in my code and hotswap throws NPE in org.hotswap.agent.plugin.jvm.ClassInitPlugin.checkOldEnumValues(ClassInitPlugin.java:130). Who could help me with this issue?
    I tried 1.3.1-SNAPSHOT and 1.1.0-SNAPSHOT - both fails
    Vladimir Dvorak
    @skybber
    Hi, it is bug
    I can fix it quickly, but it is not clear why the originalClass return null at this point
    mkamalov
    @mkamalov
    Hi, Vladimir. I don't know why the originalClass returns null. I use Oracle JDK 8u181 and DCVEM for 8u181. I debug my code from Eclipse. OS is Windows 10. My application stops working and gets NPE in Enum.values() method.
    If I extract enum class to separate file it works for me. But I don't want to refactor all my code.
    Please, could you fix it?
    Vladimir Dvorak
    @skybber
    ok, thanks for info
    Vladimir Dvorak
    @skybber
    Rajkumar
    @rajsennimalai
    Hi
    Vladimir Dvorak
    @skybber
    Hi
    Can any answer this
    Newly added method is not getting hot swapped for CDI
    Vladimir Dvorak
    @skybber
    Since I'm using eclipse I cant help ypou with this. definitely not HA/dcevm problem
    Rajkumar
    @rajsennimalai
    Let me try the same in eclipse
    can someone answer this? in alfresco using hotswapagent, can't reload META-INF folder
    Alfresco SDK 3.0 platform project
    mkamalov
    @mkamalov
    This enum has default package constructor. Please, could you look at this issue also?
    Vladimir Dvorak
    @skybber
    Could you supply example?
    mkamalov
    @mkamalov
    Hi Vladimir, I think that one more bug exists for Enum classes
    Vladimir Dvorak
    @skybber
    ok, could you make example?
    mkamalov
    @mkamalov
    If enum with package level access constructor can't be redefined Is it a bug or limitation?
    Vladimir Dvorak
    @skybber
    constructor is redefined, but enum already created enum instances are not. HA creates only new ones
    mkamalov
    @mkamalov
    Hi Vladimir, Sometimes I have NPE in ClassInitPlugin.checkOldEnumValues in line 149. I use last SPANSPHOT. This method originalClass.getEnumConstants() can return null by Java documentation. But i'm not sure about Hotswap workflow. What do you think?
    Alain Tavan
    @alain57

    Hi,
    Sometime i modify a class the hotswap reload in IntelliJ says it was done but when i open the part of the java programm where the hotswap was done i sometime get a classCastExpection saying something MayPackage.MyClass cannot be cast to MyPackage.MyClass (both are identical)
    Only solution for me : stop and rerun the programm (so without hotswap)

    Is this a known issue ? Or did someone in my company add something that made hotswap not work anymore for some components :/

    ps: any chance to have some kind of automatic builder on the hotswap page that automatically detect new adoptopenjdk release and put out a new DECVM JDK ;)

    mkamalov
    @mkamalov
    @alain57 When you says both are identical, how do you check it?
    Alain Tavan
    @alain57
    well there was no difference in the name of the class and package within the error.
    Next time I have one, i'll try to do a screenshot and store the stacktrace
    mkamalov
    @mkamalov
    No difference in the name doesn't garantee than both classes are the same. For example the same class that has been loaded by two different classloaders. You see the same name for the class but system throws ClassCastException.
    Please, check that both classes belong to the same Classloader. It could be your application issue.
    Alain Tavan
    @alain57
    sorry for the dumb question, but how can i check that the classloader is different ? I mean this happens after a hotswap and the classloader is defined in the IDE. I did not changed something there . I just modified a file and noticed this error a few time. Like said I'll see if I can reproduce this and try to give as much details as possible :)
    mkamalov
    @mkamalov
    Do you use debug mode?