Blueprint has JSON error
Closed this issue · 3 comments
Expected behavior
Probably something has been changed and Bentobox can't convert blu scheme to right format in some way. It will be enough if you can fix my blu file. I guess No need to fix in the plugin side.
Observed/Actual behavior
[17:57:29 ERROR]: [BentoBox] Blueprint has JSON error: island.blu
[17:57:29 ERROR]: [BentoBox] Could not load blueprint island Blueprint has JSON error: island.blu
[17:57:29 ERROR]: [BentoBox] java.io.IOException: Blueprint has JSON error: island.blu
at BentoBox-2.4.1.jar//world.bentobox.bentobox.managers.BlueprintClipboardManager.loadBlueprint(BlueprintClipboardManager.java:111)
at BentoBox-2.4.1.jar//world.bentobox.bentobox.managers.BlueprintsManager.loadBlueprints(BlueprintsManager.java:328)
at BentoBox-2.4.1.jar//world.bentobox.bentobox.managers.BlueprintsManager.lambda$loadBlueprintBundles$5(BlueprintsManager.java:200)
at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:86)
at org.bukkit.craftbukkit.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)
Steps/models to reproduce
I just upgraded the server version to 1.21 from 1.19.2
(Bentobox 1.22 to 2.4.1 and BSkyblock 1.15.2 to 1.18)
BentoBox version
2.4.1
Plugin list
No response
Other
No response
I added debug and I see the error now. Something about villager's professions not working. I assume you had a villager in the blueprint. I'll see if I can make it work.
[15:55:49 ERROR]: [BentoBox] Blueprint has JSON error: island.blu
[15:55:49 ERROR]: [BentoBox] com.google.gson.JsonIOException: Interfaces can't be instantiated! Register an InstanceCreator or a TypeAdapter for this type. Interface name: org.bukkit.entity.Villager$Profession
at com.google.gson.internal.ConstructorConstructor$3.construct(ConstructorConstructor.java:136)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$FieldReflectionAdapter.createAccumulator(ReflectiveTypeAdapterFactory.java:427)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:383)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.readIntoField(ReflectiveTypeAdapterFactory.java:212)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$FieldReflectionAdapter.readField(ReflectiveTypeAdapterFactory.java:433)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:393)
at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40)
at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:82)
at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:61)
at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40)
at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:173)
at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:144)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.readIntoField(ReflectiveTypeAdapterFactory.java:212)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$FieldReflectionAdapter.readField(ReflectiveTypeAdapterFactory.java:433)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:393)
at com.google.gson.Gson.fromJson(Gson.java:1227)
at com.google.gson.Gson.fromJson(Gson.java:1137)
at com.google.gson.Gson.fromJson(Gson.java:1075)
at BentoBox-2.4.2-SNAPSHOT-LOCAL.jar//world.bentobox.bentobox.managers.BlueprintClipboardManager.loadBlueprint(BlueprintClipboardManager.java:108)
at BentoBox-2.4.2-SNAPSHOT-LOCAL.jar//world.bentobox.bentobox.managers.BlueprintsManager.loadBlueprints(BlueprintsManager.java:328)
at BentoBox-2.4.2-SNAPSHOT-LOCAL.jar//world.bentobox.bentobox.managers.BlueprintsManager.lambda$loadBlueprintBundles$5(BlueprintsManager.java:200)
at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:86)
at org.bukkit.craftbukkit.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1570)
[15:55:49 ERROR]: [BentoBox] Could not load blueprint island Blueprint has JSON error: island.blu
[15:55:49 ERROR]: [BentoBox] java.io.IOException: Blueprint has JSON error: island.blu
at BentoBox-2.4.2-SNAPSHOT-LOCAL.jar//world.bentobox.bentobox.managers.BlueprintClipboardManager.loadBlueprint(BlueprintClipboardManager.java:112)
at BentoBox-2.4.2-SNAPSHOT-LOCAL.jar//world.bentobox.bentobox.managers.BlueprintsManager.loadBlueprints(BlueprintsManager.java:328)
at BentoBox-2.4.2-SNAPSHOT-LOCAL.jar//world.bentobox.bentobox.managers.BlueprintsManager.lambda$loadBlueprintBundles$5(BlueprintsManager.java:200)
at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:86)
at org.bukkit.craftbukkit.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1570)
I added debug and I see the error now. Something about villager's professions not working. I assume you had a villager in the blueprint. I'll see if I can make it work.
Yes, that is true. The villager was the default one or library professions. I don't remember.
@myavuzokumus This should be fixed in the BentoBox SNAPSHOT. Please try it.