Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    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?
    For example: MyClass s = new MyClass(); System.out.println(s.getClass().getClassLoader().toString());
    Output: sun.misc.Launcher$AppClassLoader@73d16e93. Check the number in the end of string.
    Vladimir Dvorak
    @skybber
    @mkalov: as far as classloaders and class cast you're absolutely right. As far as enum values, it could return null only for not enum classes according doc. But if there is prblem, we could add null check with error log. Would you like create PR?
    mkamalov
    @mkamalov
    @skybber I'm trying to undestand a problem. I can't reproduce an issue in clean small projects. I suspect switch block + enum class with non default constructor.
    Vladimir Dvorak
    @skybber
    As I see the name "reinitializeStatics" is confusing, should be initializeStatics
    mkamalov
    @mkamalov
    I looks like: first time i have an error message with Enums in logs with init method and then I get NPE and Hotswap fails. But i'm not sure.
    Vladimir Dvorak
    @skybber
    Is it only in case of inner enum class?
    mkamalov
    @mkamalov
    also I have strange line in console like MyEnum(MyEnum.java:1)
    No all enums
    I don't undestand why it reffers to first line in code
    mkamalov
    @mkamalov
    @skybber Do you have some guideline how to debug hotswapagent?
    Vladimir Dvorak
    @skybber
    debug you example project + add breakpoints to ha plugins sources. It should work
    You should import HA core+plugin(s) to eclipse workspace
    even you can modify HA classes on the fly
    mkamalov
    @mkamalov
    Ok Thanks
    Sorry, I don't work with java agents I thought it is something special :)
    Vladimir Dvorak
    @skybber
    have you java11?
    mkamalov
    @mkamalov
    No 8
    Vladimir Dvorak
    @skybber
    ok