GithubHelp home page GithubHelp logo

Comments (7)

aaa8881 avatar aaa8881 commented on September 3, 2024

have you managed to solve the issue? I'm encountering same issue on the latest hotswap agent

from hotswapagent.

baba43 avatar baba43 commented on September 3, 2024

Guys did you manage to find a solution since I have the same issue?

@DevSock @aaa8881

from hotswapagent.

aaa8881 avatar aaa8881 commented on September 3, 2024

Guys did you manage to find a solution since I have the same issue?

@DevSock @aaa8881

I did manage to fix by disabling log4j in jvm args. I think one of threads I found in stackoverflow worked. can't recall what it was. however I'm not using it anymore but rather just using remote jvm feature in intelliJ. It's built in and works well.

from hotswapagent.

H4kt avatar H4kt commented on September 3, 2024

Hotswap itself does not work either

[14:55:06 INFO]: [STDOUT] [org.hotswap.agent.logging.AgentLoggerHandler] HOTSWAP AGENT: 14:55:06.223 ERROR (org.hotswap.agent.plugin.jdk.JdkPlugin) - classReload() exception No such field java.beans.Introspector.declaredMethodCache on null.
[14:55:06 INFO]: [STDOUT] [org.hotswap.agent.logging.AgentLoggerHandler] HOTSWAP AGENT: 14:55:06.224 ERROR (org.hotswap.agent.plugin.jdk.JdkPlugin) - classReload() exception class java.io.ObjectStreamClass$Caches$1 cannot be cast to class java.util.Map (java.io.ObjectStreamClass$Caches$1 and java.util.Map are in module java.base of loader 'bootstrap').
[14:55:06 INFO]: [STDOUT] [org.hotswap.agent.logging.AgentLoggerHandler] HOTSWAP AGENT: 14:55:06.229 ERROR (org.hotswap.agent.annotation.handler.PluginClassFileTransformer) - InvocationTargetException in transform method on plugin 'class org.hotswap.agent.plugin.proxy.ProxyPlugin' class 'dev/h4kt/randomActivities/commands/CommandActivity'.
java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.hotswap.agent.annotation.handler.PluginClassFileTransformer.transform(PluginClassFileTransformer.java:218)
        at org.hotswap.agent.annotation.handler.PluginClassFileTransformer.transform(PluginClassFileTransformer.java:112)
        at org.hotswap.agent.util.HotswapTransformer.transform(HotswapTransformer.java:246)
        at java.instrument/java.lang.instrument.ClassFileTransformer.transform(ClassFileTransformer.java:244)
        at java.instrument/sun.instrument.TransformerManager.transform(TransformerManager.java:188)
        at java.instrument/sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:541)
Caused by: java.lang.NoClassDefFoundError: org/hotswap/agent/logging/AgentLogger
        at RandomActivities-1.0.jar//org.hotswap.agent.plugin.proxy.hscglib.GeneratorParametersRecorder.<clinit>(GeneratorParametersRecorder.java:38)
        at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method)
        at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unsafe.java:1155)
        at java.base/jdk.internal.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:42)
        at java.base/jdk.internal.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:185)
        at java.base/java.lang.reflect.Field.acquireFieldAccessor(Field.java:1132)
        at java.base/java.lang.reflect.Field.getFieldAccessor(Field.java:1113)
        at java.base/java.lang.reflect.Field.get(Field.java:425)
        at org.hotswap.agent.plugin.proxy.hscglib.GeneratorParametersTransformer.getGeneratorParamsMap(GeneratorParametersTransformer.java:103)
        at org.hotswap.agent.plugin.proxy.hscglib.GeneratorParametersTransformer.getGeneratorParams(GeneratorParametersTransformer.java:130)
        at org.hotswap.agent.plugin.proxy.ProxyPlugin.transformCglibProxy(ProxyPlugin.java:105)
        ... 10 more
Caused by: java.lang.ClassNotFoundException: org.hotswap.agent.logging.AgentLogger
        at io.papermc.paper.plugin.entrypoint.classloader.PaperPluginClassLoader.loadClass(PaperPluginClassLoader.java:142)
        at io.papermc.paper.plugin.entrypoint.classloader.PaperPluginClassLoader.loadClass(PaperPluginClassLoader.java:103)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
        ... 21 more

from hotswapagent.

raikasdev avatar raikasdev commented on September 3, 2024

The AgentLogger issue (at least on debugging Minecraft plugins) can be "fixed" by disabling the Proxy plugin.

-javaagent:/route/to/jbr/lib/hotswap/hotswap-agent.jar=disablePlugin=log4j2,disablePlugin=proxy

from hotswapagent.

UltraBlackLinux avatar UltraBlackLinux commented on September 3, 2024

I just recompiled the hotswap agent with all the stuff I don't need removed and it does work now, with zero issues.

from hotswapagent.

xtb7 avatar xtb7 commented on September 3, 2024

I faced the same thing as you guys. I explained in my videos that only core, not fatjar works for me. Use core.

This was specifically how I set it up for Paper: https://youtu.be/yQVLT6sDg68
And this is just generally how I got it working for Java 21: https://youtu.be/iQSvTkyiIDY

from hotswapagent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.