Plugin Debugging HotSwap Problem

Dear all,

I am currently trying to figure out, how I can use the HotSwap functionality.

I am using Intelij Idea and followed the whole tutorial from this series:

I made a local copy of the current stable 7.1 git repository and integrated my plugin as an artifact.

I am able to debug, but when I am using the “Reload changed classes” functionality, it tries to rebuild sponge and my plugin and I receive the following error:

Unable to find source java class: ‘C:\Users\gottw.gradle\caches\minecraft\net\minecraftforge\forge\1.12.2-14.23.5.2838\start\GradleStartServer.java’ because it does not belong to any of the source dirs: '[D:\SpongeForge\testmods\src\main\java]*

The strange thing is that the file at C:\Users\gottw.gradle\caches\minecraft\net\minecraftforge\forge\1.12.2-14.23.5.2838\start\GradleStartServer.java is present.

I am completely new to Intelij Idea and Sponge, but I would like to be able to use the HotSwap functionality. Does anybody of you have an idea what kind of problem I have and how I can solve it?

Has it something todo, that the project workspace is on disk D and the cache on C?

I would appreciate any help! Thanks in advance

Regards
Sascha

----- Edit -----

My run configuration:

Plugin artifact:

I think I have a guess as to what’s going on. Could you send a screenshot of the “External Libraries” section in the project pane? It should look something like this:

In particular, I’m trying to see if there’s a “start” folder in that list.

1 Like

Thanks for the answer :slight_smile:

Here are my external libraries

Libraries

Part 1:


Part 2:

Part 3:

Part 4:

There is a start folder refered aswell

Regards
Sascha

Hm… I really have no idea what’s going on then. Are you on the latest SpongeForge and IntelliJ versions?

I updated IntelliJ IDEA and SpongeForge and now it builds the project without the described error. Now when I do some code changes in my plugin, I click on “Reloaded changed classes” and it rebuilds my plugin and SpongeFroge which causes the server to stop.

Because the console error ouput was to long I had to upload it seperatly
Copy of console output: Upload files for free - error.txt - ufile.io
Crash report: Upload files for free - crash-2019-10-12_12.50.32-server.txt - ufile.io

Any idea how to get HotSwap running on the latest version?

Regards
Sascha

@JBYoshi or someone else, any idea left? I really want to continue developing our plugin. At the moment I have to restart the whole server for every line of code I change. It is really hard to make any progress. We migrated a Spigot plugin into Sponge with a lot of code and we need the HotSwap functionality to test and adjust the migrated code.

I would really appreciate any help …

Regards
Sascha

After months of testing I started to set up my sponge enviroment new. After doing all the steps mentioned in the tutorial, I coulnd’t get it running again. But I didn’t surrendered and figured after days of testing out that in the newest Intelij Idea IDE the option “Reload changed classes” doesn’t work for me. With the option “Recompile xxx.class” in the Build menu it worked without any of the errors I explained above. Now after months of pain I finally can continue my project.

Thanks for any help attempts.

Regards
Sascha