WorldEdit (Forge) 6.0.0-snapshot Failed to extract defaults (defaults/worldedit.properties)
LadyCailinBot opened this issue ยท 11 comments
WORLDEDIT-3131 - Reported by rhylos
Error report. Is this a config issue or an issue with a built in call?
Received the following error message on Forge .965 server start
2014-06-25 13:50:09 [WARNING] [com.sk89q.worldedit.forge.ForgeWorldEdit] Failed to extract defaults
java.io.IOException: Failed to get resource 'defaults/worldedit.properties' from .class
at com.sk89q.worldedit.forge.ForgeWorldEdit.createDefaultConfiguration(ForgeWorldEdit.java:246)
at com.sk89q.worldedit.forge.ForgeWorldEdit.preInit(ForgeWorldEdit.java:82)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:545)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:201)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:112)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:522)
at cpw.mods.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:99)
at cpw.mods.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:350)
at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:69)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:445)
at net.minecraft.server.ThreadMinecraftServer.run(SourceFile:583)
Comment by wizjany
--There's a second part of that error missing--but maybe your config file is missing? Where did you get the jar?
Comment by wizjany
edit: nvm, i seem to have found the issue. it's not using a defaults folder anymore
edit2: this is rather odd though since it certainly used to work...I wonder if they changed something in forgegradle, since we have changed nothing in worldedit for a while...
Comment by rhylos
Right, I did try the build you mentioned but it had the same error; however, while the same build snapshot it was much larger in size. Is it trying to ref the /config/worldedit/ folder now?
Comment by wizjany
no, the default file lies inside the jar...there used to be a defaults folder in it though
edit: this line https://github.com/sk89q/worldedit/blob/master/src/forge/java/com/sk89q/worldedit/forge/ForgeWorldEdit.java#L239
Comment by wizjany
No, it's just in the root folder (root of the jar) instead of in defaults/
Comment by rhylos
The defaults folder is, yes. So the question is, is it better to add the folder or to remove the call for the folder as the file is in root
Comment by rhylos
To match with the bukkit build as much as possible, it seems logical to have
the defaults folder in the root of the jar with the properties file within it.
Comment by rhylos
I'll let the pro's decide which direction to correct this; however, to semi-close the loop
on the error message with the file not being found, recompiling using just a "/" as ref above removed
the error message with a positive message.
Comment by rhylos
Hate to do this but the last build by you wizjany and the more recent snapshots builds with the default
folder in the pack still report the properties file as not found even though I can see them in the proper
location. Looks like it needs a slash on line 245 (String path = "/defaults/" + name;)
Submitted pull request if approved for correction.
Results in:
[INFO] [com.sk89q.worldedit.forge.ForgeWorldEdit] Default configuration file written: worldedit.properties