Jump to content

compatibility with JRebel ?


metalim

Recommended Posts

Sup!

 

I'm trying to use JRebel (free Social Plan) with Minecraft Forge to make code changes without restarting Minecraft.

 

Encountered an issue: Forge reports error during startup. Console log below:

 

 

[2012-12-27 18:05:55] Contacting myJRebel server ..

[2012-12-27 18:05:57]

[2012-12-27 18:05:57] #############################################################

[2012-12-27 18:05:57]

[2012-12-27 18:05:57]  JRebel 5.1.2 (201212171004)

[2012-12-27 18:05:57]  © Copyright ZeroTurnaround OU, Estonia, Tartu.

[2012-12-27 18:05:57]

[2012-12-27 18:05:57]  Over the last 1 days JRebel prevented

[2012-12-27 18:05:57]  at least 1 redeploys/restarts saving you about 0 hours.

[2012-12-27 18:05:57]

[2012-12-27 18:05:57]  This product is licensed to Maxim Litvinov

[2012-12-27 18:05:57]

[2012-12-27 18:05:57]  License acquired through myJRebel server.

[2012-12-27 18:05:57]

[2012-12-27 18:05:57]  You are subscribed for the plan "JRebel Social Plan",

[2012-12-27 18:05:57]  subscription is for lifetime.

[2012-12-27 18:05:57]  next license check with the server is required by 2013-01-26.

[2012-12-27 18:05:57]

[2012-12-27 18:05:57]  The following plugins are disabled at the moment:

[2012-12-27 18:05:57]  * Camel plugin (set -Drebel.camel_plugin=true to enable)

[2012-12-27 18:05:57]  * Click plugin (set -Drebel.click_plugin=true to enable)

[2012-12-27 18:05:57]  * JRuby Plugin (set -Drebel.jruby_plugin=true to enable)

[2012-12-27 18:05:57]  * Jersey plugin (set -Drebel.jersey_plugin=true to enable)

[2012-12-27 18:05:57]  * Oracle ADF Core plugin (set -Drebel.adf_core_plugin=true to enable)

[2012-12-27 18:05:57]  * Oracle ADF Faces plugin (set -Drebel.adf_faces_plugin=true to enable)

[2012-12-27 18:05:57]  * RESTlet plugin (set -Drebel.restlet_plugin=true to enable)

[2012-12-27 18:05:57]  * Seam-Wicket plugin (set -Drebel.seam_wicket_plugin=true to enable)

[2012-12-27 18:05:57]  * Spring Data Plugin (set -Drebel.spring_data_plugin=true to enable)

[2012-12-27 18:05:57]  * WebObjects plugin (set -Drebel.webobjects_plugin=true to enable)

[2012-12-27 18:05:57]

[2012-12-27 18:05:57] #############################################################

[2012-12-27 18:05:57]

[2012-12-27 18:05:57] JRebel: Directory '/Users/metalim/Downloads/mc/forge/mcp/eclipse/Minecraft/bin' will be monitored for changes.

2012-12-27 18:05:59 [iNFO] [ForgeModLoader] Forge Mod Loader version 4.6.12.511 for Minecraft 1.4.6 loading

2012-12-27 18:05:59 [FINEST] [ForgeModLoader] All core mods are successfully located

2012-12-27 18:05:59 [FINEST] [ForgeModLoader] Discovering coremods

2012-12-27 18:05:59 [FINEST] [ForgeModLoader] Found library file argo-2.25.jar present and correct in lib dir

2012-12-27 18:05:59 [FINEST] [ForgeModLoader] Found library file guava-12.0.1.jar present and correct in lib dir

2012-12-27 18:05:59 [FINEST] [ForgeModLoader] Found library file asm-all-4.0.jar present and correct in lib dir

2012-12-27 18:05:59 [FINEST] [ForgeModLoader] Found library file bcprov-jdk15on-147.jar present and correct in lib dir

2012-12-27 18:06:07 [iNFO] [sTDERR] Exception in thread "main" java.lang.RuntimeException: java.lang.NoClassDefFoundError: com/zeroturnaround/javarebel/gen/RebelLocator$$15dcc3ca

2012-12-27 18:06:07 [iNFO] [sTDERR] at cpw.mods.fml.relauncher.FMLRelauncher.setupHome(FMLRelauncher.java:175)

2012-12-27 18:06:07 [iNFO] [sTDERR] at cpw.mods.fml.relauncher.FMLRelauncher.relaunchClient(FMLRelauncher.java:92)

2012-12-27 18:06:07 [iNFO] [sTDERR] at cpw.mods.fml.relauncher.FMLRelauncher.handleClientRelaunch(FMLRelauncher.java:26)

2012-12-27 18:06:07 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.main(Minecraft.java:2235)

2012-12-27 18:06:07 [iNFO] [sTDERR] at Start.main(Start.java:29)

2012-12-27 18:06:07 [iNFO] [sTDERR] Caused by: java.lang.NoClassDefFoundError: com/zeroturnaround/javarebel/gen/RebelLocator$$15dcc3ca

2012-12-27 18:06:07 [iNFO] [sTDERR] at cpw.mods.fml.common.asm.transformers.AccessTransformer.<clinit>(AccessTransformer.java:50001)

2012-12-27 18:06:07 [iNFO] [sTDERR] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

2012-12-27 18:06:07 [iNFO] [sTDERR] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

2012-12-27 18:06:07 [iNFO] [sTDERR] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

2012-12-27 18:06:07 [iNFO] [sTDERR] at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

2012-12-27 18:06:07 [iNFO] [sTDERR] at java.lang.Class.newInstance0(Class.java:355)

2012-12-27 18:06:07 [iNFO] [sTDERR] at java.lang.Class.newInstance(Class.java:308)

2012-12-27 18:06:07 [iNFO] [sTDERR] at cpw.mods.fml.relauncher.RelaunchClassLoader.registerTransformer(RelaunchClassLoader.java:75)

2012-12-27 18:06:07 [iNFO] [sTDERR] at cpw.mods.fml.relauncher.RelaunchLibraryManager.handleLaunch(RelaunchLibraryManager.java:238)

2012-12-27 18:06:07 [iNFO] [sTDERR] at cpw.mods.fml.relauncher.FMLRelauncher.setupHome(FMLRelauncher.java:155)

2012-12-27 18:06:07 [iNFO] [sTDERR] ... 4 more

2012-12-27 18:06:07 [iNFO] [sTDERR] Caused by: java.lang.ClassNotFoundException: com.zeroturnaround.javarebel.gen.RebelLocator$$15dcc3ca

2012-12-27 18:06:07 [iNFO] [sTDERR] at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:179)

2012-12-27 18:06:07 [iNFO] [sTDERR] at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

2012-12-27 18:06:07 [iNFO] [sTDERR] at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

2012-12-27 18:06:07 [iNFO] [sTDERR] ... 13 more

2012-12-27 18:06:07 [iNFO] [sTDERR] Caused by: java.lang.NullPointerException

2012-12-27 18:06:07 [iNFO] [sTDERR] at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:138)

2012-12-27 18:06:07 [iNFO] [sTDERR] ... 15 more

 

 

I've tested JRebel with with vanilla Minecraft (via mcp725): works fine.

 

Question is: have any clue from the error message, how to fix that?

 

Link to comment
Share on other sites

Why are you using JRebel? What type of environment are you in that you need it?

Its a development tool that allows you to swap classes at runtime, but you know, every IDE has this functionality...

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

Not going to happen. JRebel is a custom classloader wrapped around the code it's running, and unfortunately, for FML and Forge to function, we need to break free of the core classloader framework so we can inject mods and libraries. So we'll pretty much 100% conflict with what JRebel is trying to do.

 

I'm not about to rewrite FML either. Sorry about that.

 

Link to comment
Share on other sites

cpw: can it technically be done? And on which side?

FML uses a custom class loader to load classes from mod files, so pretty much you'd have to merge the JRebel loader with that AFAIK.

Protip: try and find answers yourself before asking on the forum.

It's pretty likely that there is an answer.

 

Was I helpful? Give me a thank you!

 

 

width=635 height=903http://bit.ly/HZ03zy[/img]

 

 

Tired of waiting for mods to port to bukkit?

use BukkitForge! (now with a working version of WorldEdit!)

Link to comment
Share on other sites

As cpw said, if you want to try and merge JRebel support into FML feel free to submit a PR.

And you're right changing the structure of the class requires a re-launch in eclipse, however, it's not that big of a deal, and takes about 5 seconds. And you probably won't be doing it often :P

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

  • 3 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • They were already updated, and just to double check I even did a cleanup and fresh update from that same page. I'm quite sure drivers are not the problem here. 
    • i tried downloading the drivers but it says no AMD graphics hardware has been detected    
    • Update your AMD/ATI drivers - get the drivers from their website - do not update via system  
    • As the title says i keep on crashing on forge 1.20.1 even without any mods downloaded, i have the latest drivers (nvidia) and vanilla minecraft works perfectly fine for me logs: https://pastebin.com/5UR01yG9
    • Hello everyone, I'm making this post to seek help for my modded block, It's a special block called FrozenBlock supposed to take the place of an old block, then after a set amount of ticks, it's supposed to revert its Block State, Entity, data... to the old block like this :  The problem I have is that the system breaks when handling multi blocks (I tried some fix but none of them worked) :  The bug I have identified is that the function "setOldBlockFields" in the item's "setFrozenBlock" function gets called once for the 1st block of multiblock getting frozen (as it should), but gets called a second time BEFORE creating the first FrozenBlock with the data of the 1st block, hence giving the same data to the two FrozenBlock :   Old Block Fields set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=head] BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@73681674 BlockEntityData : id:"minecraft:bed",x:3,y:-60,z:-6} Old Block Fields set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} Frozen Block Entity set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockPos{x=3, y=-60, z=-6} BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} Frozen Block Entity set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockPos{x=2, y=-60, z=-6} BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} here is the code inside my custom "freeze" item :    @Override     public @NotNull InteractionResult useOn(@NotNull UseOnContext pContext) {         if (!pContext.getLevel().isClientSide() && pContext.getHand() == InteractionHand.MAIN_HAND) {             BlockPos blockPos = pContext.getClickedPos();             BlockPos secondBlockPos = getMultiblockPos(blockPos, pContext.getLevel().getBlockState(blockPos));             if (secondBlockPos != null) {                 createFrozenBlock(pContext, secondBlockPos);             }             createFrozenBlock(pContext, blockPos);             return InteractionResult.SUCCESS;         }         return super.useOn(pContext);     }     public static void createFrozenBlock(UseOnContext pContext, BlockPos blockPos) {         BlockState oldState = pContext.getLevel().getBlockState(blockPos);         BlockEntity oldBlockEntity = oldState.hasBlockEntity() ? pContext.getLevel().getBlockEntity(blockPos) : null;         CompoundTag oldBlockEntityData = oldState.hasBlockEntity() ? oldBlockEntity.serializeNBT() : null;         if (oldBlockEntity != null) {             pContext.getLevel().removeBlockEntity(blockPos);         }         BlockState FrozenBlock = setFrozenBlock(oldState, oldBlockEntity, oldBlockEntityData);         pContext.getLevel().setBlockAndUpdate(blockPos, FrozenBlock);     }     public static BlockState setFrozenBlock(BlockState blockState, @Nullable BlockEntity blockEntity, @Nullable CompoundTag blockEntityData) {         BlockState FrozenBlock = BlockRegister.FROZEN_BLOCK.get().defaultBlockState();         ((FrozenBlock) FrozenBlock.getBlock()).setOldBlockFields(blockState, blockEntity, blockEntityData);         return FrozenBlock;     }  
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.