Code Monkey home page Code Monkey logo

spigot-injection's People

Contributors

bilektugrul avatar dependabot[bot] avatar hakan-krgn avatar thehuze avatar wuodan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

spigot-injection's Issues

Need help with Repositories

Hello. I'm trying to save an object to a database using your library. I looked at the example in the full plugin, there are no @querัƒ annotations for the save delete methods, etc. That's why I didn't add it to my test plugin. At the same time, I get an exception. Please take a look at the attachments below.

image
image

[16:51:24 ERROR]: Could not pass event BlockDestroyEvent to hibernate-test-for-spigot v1.0-SNAPSHOT
java.lang.reflect.InvocationTargetException: null
	at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:118) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:580) ~[?:?]
	at com.hakan.spinjection.utils.ReflectionUtils.invokeMethod(ReflectionUtils.java:47) ~[hibernate-test-for-spigot-1.0-SNAPSHOT.jar:?]
	at com.hakan.spinjection.utils.ReflectionUtils.runMethod(ReflectionUtils.java:69) ~[hibernate-test-for-spigot-1.0-SNAPSHOT.jar:?]
	at com.hakan.spinjection.listener.executor.ListenerExecutor.execute(ListenerExecutor.java:115) ~[hibernate-test-for-spigot-1.0-SNAPSHOT.jar:?]
	at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:77) ~[purpur-api-1.20.2-R0.1-SNAPSHOT.jar:git-Purpur-2082]
	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[purpur-api-1.20.2-R0.1-SNAPSHOT.jar:?]
	at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[purpur-1.20.2.jar:git-Purpur-2082]
	at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[purpur-1.20.2.jar:git-Purpur-2082]
	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:617) ~[purpur-api-1.20.2-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.event.Event.callEvent(Event.java:45) ~[purpur-api-1.20.2-R0.1-SNAPSHOT.jar:?]
	at net.minecraft.world.level.Level.destroyBlock(Level.java:1132) ~[?:?]
	at net.minecraft.world.level.block.Block.updateOrDestroy(Block.java:205) ~[purpur-1.20.2.jar:git-Purpur-2082]
	at net.minecraft.world.level.redstone.NeighborUpdater.executeShapeUpdate(NeighborUpdater.java:50) ~[purpur-1.20.2.jar:git-Purpur-2082]
	at net.minecraft.world.level.redstone.CollectingNeighborUpdater$ShapeUpdate.runNext(CollectingNeighborUpdater.java:158) ~[?:?]
	at net.minecraft.world.level.redstone.CollectingNeighborUpdater.runUpdates(CollectingNeighborUpdater.java:79) ~[purpur-1.20.2.jar:git-Purpur-2082]
	at net.minecraft.world.level.redstone.CollectingNeighborUpdater.addAndRun(CollectingNeighborUpdater.java:63) ~[purpur-1.20.2.jar:git-Purpur-2082]
	at net.minecraft.world.level.redstone.CollectingNeighborUpdater.shapeUpdate(CollectingNeighborUpdater.java:30) ~[purpur-1.20.2.jar:git-Purpur-2082]
	at net.minecraft.world.level.Level.neighborShapeChanged(Level.java:1180) ~[?:?]
	at net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase.updateNeighbourShapes(BlockBehaviour.java:1183) ~[?:?]
	at net.minecraft.world.level.Level.notifyAndUpdatePhysics(Level.java:1095) ~[?:?]
	at net.minecraft.world.level.Level.setBlock(Level.java:1041) ~[?:?]
	at net.minecraft.world.level.Level.setBlock(Level.java:955) ~[?:?]
	at net.minecraft.world.level.Level.removeBlock(Level.java:1115) ~[?:?]
	at net.minecraft.world.level.block.FireBlock.trySpread(FireBlock.java:300) ~[?:?]
	at net.minecraft.world.level.block.FireBlock.tick(FireBlock.java:212) ~[?:?]
	at net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase.tick(BlockBehaviour.java:1205) ~[?:?]
	at net.minecraft.server.level.ServerLevel.tickBlock(ServerLevel.java:1417) ~[?:?]
	at net.minecraft.world.ticks.LevelTicks.runCollectedTicks(LevelTicks.java:197) ~[?:?]
	at net.minecraft.world.ticks.LevelTicks.tick(LevelTicks.java:94) ~[?:?]
	at net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:863) ~[?:?]
	at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1577) ~[purpur-1.20.2.jar:git-Purpur-2082]
	at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:486) ~[purpur-1.20.2.jar:git-Purpur-2082]
	at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1406) ~[purpur-1.20.2.jar:git-Purpur-2082]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1177) ~[purpur-1.20.2.jar:git-Purpur-2082]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320) ~[purpur-1.20.2.jar:git-Purpur-2082]
	at java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: java.lang.RuntimeException: method must be annotated with @Query!
	at com.hakan.spinjection.database.executor.DatabaseExecutor.postCall(DatabaseExecutor.java:126) ~[hibernate-test-for-spigot-1.0-SNAPSHOT.jar:?]
	at com.hakan.spinjection.database.executor.DatabaseExecutor.preCall(DatabaseExecutor.java:112) ~[hibernate-test-for-spigot-1.0-SNAPSHOT.jar:?]
	at com.hakan.spinjection.utils.ProxyUtils.lambda$create$0(ProxyUtils.java:34) ~[hibernate-test-for-spigot-1.0-SNAPSHOT.jar:?]
	at jdk.proxy4.$Proxy69.save(Unknown Source) ~[hibernate-test-for-spigot-1.0-SNAPSHOT.jar:?]
	at org.testing.hibernatetestforspigot.listener.BreakBlockListener.onBlockBreak(BreakBlockListener.java:25) ~[hibernate-test-for-spigot-1.0-SNAPSHOT.jar:?]
	at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?]
	... 36 more

As a result, an annotation is needed even for standard methods, and this point was omitted for the sake of simplicity of the example?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.