Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Agent#getInstance() is null #7

Open
MCAki06 opened this issue Jun 10, 2024 · 0 comments
Open

Agent#getInstance() is null #7

MCAki06 opened this issue Jun 10, 2024 · 0 comments

Comments

@MCAki06
Copy link

MCAki06 commented Jun 10, 2024

JDK Version: 17
Paper (1.20.4)

RuntimeTransformer is called in onEnabled()
Startup has -Djdk.attach.allowAttachSelf=true argument

When I try to call RuntimeTransfomer I get the following error:

[19:17:03 WARN]: java.lang.NullPointerException: Cannot invoke "me.yamakaja.runtimetransformer.agent.Agent.process(java.lang.Class[])" because the return value of "me.yamakaja.runtimetransformer.agent.Agent.getInstance()" is null
[19:17:03 WARN]:        at Rhodium.jar//me.yamakaja.runtimetransformer.TransformerUtils.attachAgent(TransformerUtils.java:25)
[19:17:03 WARN]:        at Rhodium.jar//me.yamakaja.runtimetransformer.RuntimeTransformer.<init>(RuntimeTransformer.java:43)
[19:17:03 WARN]:        at Rhodium.jar//me.immcaki.Main.onEnable(Main.java:789)
[19:17:03 WARN]:        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:287)
...

POM file is:


    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.6.0</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <artifactSet>
                                <includes>
                                    <include>me.yamakaja.runtimetransformer:api</include>
                                    <include>me.yamakaja.runtimetransformer:agent</include>
                                </includes>
                            </artifactSet>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            ...... specialsource-maven-plugin
        </plugins>
    </build>
...
    <dependencies>
        <dependency>
            <groupId>me.yamakaja.runtimetransformer</groupId>
            <artifactId>api</artifactId>
            <version>1.0-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>me.yamakaja.runtimetransformer</groupId>
            <artifactId>agent</artifactId>
            <version>1.0-SNAPSHOT</version>
        </dependency>

       <dependency>
                <groupId>org.spigotmc</groupId>
                <artifactId>spigot</artifactId>
                <version>1.20.4-R0.1-SNAPSHOT</version>
                <scope>provided</scope>
                <classifier>remapped-mojang</classifier>
        </dependency>
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant