[Persistence Question] Not a registered ebean entity?

Discussion in 'Plugin Development' started by shadrxninga, May 20, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    shadrxninga

    I am having problems with persistence... whenever I try to put something in the database I get this error in th console
    Code:
    2011-05-20 21:14:18 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'iop' in plugin iOP v0.5
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:85)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:278)
        at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:682)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:645)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:639)
        at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:32)
        at net.minecraft.server.NetworkManager.a(NetworkManager.java:196)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:372)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:287)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    Caused by: javax.persistence.PersistenceException: com.scswc.shadrxninga.iop.iOPDatabase is NOT an Entity Bean registered with this server?
        at com.avaje.ebeaninternal.server.core.DefaultServer.createQuery(DefaultServer.java:1031)
        at com.avaje.ebeaninternal.server.core.DefaultServer.createQuery(DefaultServer.java:988)
        at com.avaje.ebeaninternal.server.core.DefaultServer.find(DefaultServer.java:1024)
        at com.scswc.shadrxninga.iop.iOP.onCommand(iOP.java:113)
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
        ... 12 more
    I have ebeans.properties in the main server folder
    database is set to true in the plugin.yml
    I have deleted the empty database several times

    Here is my main class
    http://pastebin.com/DmxqLDe6
    and my persistence class
    http://pastebin.com/tGPi2BZM

    I have looked at captainawsome7 thread about this and could not find the answer...
    What am I doing wrong

    @Sammy
     
  2. Offline

    cjc343

    Change the @NotNull to @NotEmpty for all your strings (and make sure they aren't empty).

    Also, don't hardcode the path to your yml file, use this.getDataFolder().

    Let me know if that helps.
     
  3. Offline

    Sammy

    Code:
                @Override
                public List<Class<?>> getDatabaseClasses() {
                    List<Class<?>> list = new ArrayList<Class<?>>();
                    list.add(iOP.class);
                    return list;
                }
                {
    Isn't the name of the class iOPDatabase and not iOP?
     
Thread Status:
Not open for further replies.

Share This Page