[INACTIVE][ECON] Cookies! v0.5 - Economic System w/ API [424]

Discussion in 'Inactive/Unsupported Plugins' started by Coelho, Feb 21, 2011.

  1. Offline

    sev042

    Great plugin! I love that you have the monster money drop built in. I DL'd 0.4, decompressed, put a copy of sql into the right folder, recompressed as a .jar, and I'm getting this error:

    Code:
    2011-02-23 19:23:43 [SEVERE] Could not load plugins/Cookies.jar in plugins: null
    org.bukkit.plugin.InvalidPluginException
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:56)
            at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:129)
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:94)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:55)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:187)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:174)
            at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:120)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:227)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
            ... 9 more
    
    Did I so something incorrectly?
     
  2. Offline

    ShadowDrakken

    looks like the jar is corrupted or mis-structured... if you use 7-Zip, you don't need to decompress it first, just drop the SQL plugin right into the META-INF through 7-Zip and it handles it pretty :D
     
  3. Offline

    sev042

    Okay, did that, now I'm getting this error.

    Code:
    2011-02-23 19:38:29 [INFO] [COOKIES] Please change the properties for Cookies if not default.
    2011-02-23 19:38:29 [SEVERE] com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
    
    Last packet sent to the server was 0 ms ago.
    2011-02-23 19:38:29 [SEVERE]    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    2011-02-23 19:38:29 [SEVERE]    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    2011-02-23 19:38:29 [SEVERE]    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    2011-02-23 19:38:29 [SEVERE]    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    2011-02-23 19:38:29 [SEVERE]    at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
    2011-02-23 19:38:29 [SEVERE]    at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)
    2011-02-23 19:38:29 [SEVERE]    at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2103)
    2011-02-23 19:38:29 [SEVERE]    at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:718)
    2011-02-23 19:38:29 [SEVERE]    at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
    2011-02-23 19:38:29 [SEVERE]    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    2011-02-23 19:38:29 [SEVERE]    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    2011-02-23 19:38:29 [SEVERE]    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    2011-02-23 19:38:29 [SEVERE]    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    2011-02-23 19:38:29 [SEVERE]    at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
    2011-02-23 19:38:29 [SEVERE]    at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
    2011-02-23 19:38:29 [SEVERE]    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
    2011-02-23 19:38:29 [SEVERE]    at java.sql.DriverManager.getConnection(DriverManager.java:582)
    2011-02-23 19:38:29 [SEVERE]    at java.sql.DriverManager.getConnection(DriverManager.java:185)
    2011-02-23 19:38:29 [SEVERE]    at com.pi.coelho.Cookies.net.cDatabase.<init>(cDatabase.java:20)
    2011-02-23 19:38:29 [SEVERE]    at com.pi.coelho.Cookies.Cookies.onEnable(Cookies.java:114)
    2011-02-23 19:38:29 [SEVERE]    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:140)
    2011-02-23 19:38:29 [SEVERE]    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:426)
    2011-02-23 19:38:29 [SEVERE]    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:187)
    2011-02-23 19:38:29 [SEVERE]    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:76)
    2011-02-23 19:38:29 [SEVERE]    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:57)
    2011-02-23 19:38:29 [SEVERE]    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:187)
    2011-02-23 19:38:29 [SEVERE]    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:174)
    2011-02-23 19:38:29 [SEVERE]    at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:120)
    2011-02-23 19:38:29 [SEVERE]    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:227)
    2011-02-23 19:38:29 [SEVERE]    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    2011-02-23 19:38:29 [SEVERE] Caused by: java.net.ConnectException: Connection refused
    2011-02-23 19:38:29 [SEVERE]    at java.net.PlainSocketImpl.socketConnect(Native Method)
    2011-02-23 19:38:29 [SEVERE]    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
    2011-02-23 19:38:29 [SEVERE]    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
    2011-02-23 19:38:29 [SEVERE]    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
    2011-02-23 19:38:29 [SEVERE]    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
    2011-02-23 19:38:29 [SEVERE]    at java.net.Socket.connect(Socket.java:529)
    2011-02-23 19:38:29 [SEVERE]    at java.net.Socket.connect(Socket.java:478)
    2011-02-23 19:38:29 [SEVERE]    at java.net.Socket.<init>(Socket.java:375)
    2011-02-23 19:38:29 [SEVERE]    at java.net.Socket.<init>(Socket.java:218)
    2011-02-23 19:38:29 [SEVERE]    at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:253)
    2011-02-23 19:38:29 [SEVERE]    at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:280)
    2011-02-23 19:38:29 [SEVERE]    at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2026)
    2011-02-23 19:38:29 [SEVERE]    ... 23 more
    2011-02-23 19:38:29 [SEVERE] java.lang.NullPointerException
    2011-02-23 19:38:29 [SEVERE]    at com.pi.coelho.Cookies.Cookies.onDisable(Cookies.java:160)
    2011-02-23 19:38:29 [SEVERE]    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:142)
    2011-02-23 19:38:29 [SEVERE]    at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoader.java:441)
    2011-02-23 19:38:29 [SEVERE]    at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:199)
    2011-02-23 19:38:29 [SEVERE]    at com.pi.coelho.Cookies.Cookies.onEnable(Cookies.java:126)
    2011-02-23 19:38:29 [SEVERE]    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:140)
    2011-02-23 19:38:29 [SEVERE]    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:426)
    2011-02-23 19:38:29 [SEVERE]    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:187)
    2011-02-23 19:38:29 [SEVERE]    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:76)
    2011-02-23 19:38:29 [SEVERE]    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:57)
    2011-02-23 19:38:29 [SEVERE]    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:187)
    2011-02-23 19:38:29 [SEVERE]    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:174)
    2011-02-23 19:38:29 [SEVERE]    at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:120)
    2011-02-23 19:38:29 [SEVERE]    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:227)
    2011-02-23 19:38:29 [SEVERE]    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    2011-02-23 19:38:29 [INFO] [COOKIES] Failed to save list into database.
    2011-02-23 19:38:29 [INFO] [COOKIES] Script has stored cookies in a safe spot for later use.
    2011-02-23 19:38:29 [INFO] [COOKIES] Failed to retrieve list from database.
    2011-02-23 19:38:29 [WARNING] Plugin 'Cookies' (ver 0.4) is registering events before it is enabled. It may be misbehaving and the author needs to fix this.
    2011-02-23 19:38:29 [WARNING] Plugin 'Cookies' (ver 0.4) is registering events before it is enabled. It may be misbehaving and the author needs to fix this.
    
     
  4. Offline

    Coelho

    Some wierd connection error, definately not my script, however.
    --- merged: Feb 24, 2011 2:45 AM ---
    Glad that fixed it for you :D
     
  5. Offline

    ShadowDrakken

    "Communications link failure" makes it look like it failed to connect to the MySQL server... not sure though

    yeah, in fact, looking through all the errors, they're all JDBC4 and SQL errors
     
  6. Offline

    Coelho

    Rightio, however thats something to do with protocol, i'm pretty sure.
     
  7. Offline

    sev042

    Oh fun, a random error. I only know two things about java, that a .jar is a java archive, and I don't know much about java.

    Thanks for the help so far BTW, I really appreciate it.
     
  8. Offline

    ShadowDrakken

    I would recommend stepping through the installation process to make sure everything is in the proper place

    1) sql connector in the root Bukkit folder
    2) sql connector in the Cookies.jar/META-INF

    and then triple check your MySQL settings in the .properties file match exactly (case sensitive on most servers)

    if all that's good, make sure the MySQL connector you're using matches the MySQL server version (MySQL 4, 5 or 6 usually)
    --- merged: Feb 24, 2011 2:56 AM ---
    On a side note,
    @Coelho is there any way to remove the META-INF connector requirement and just hook the sqlite/mysql connector from the Bukkit folder? That way your files stay small, and users don't need to modify the jar?
     
  9. Offline

    Coelho

    It should not be required, at the moment.
     
  10. Offline

    sev042


    1) Check
    2) Check

    These were my .properties regarding SQL
    Code:
    # Setting all of the MySQL settings
    sql-lite=no
    sql-hostname=localhost
    sql-port=3306
    sql-database=minecraft
    sql-username=root
    sql-password=
    sql-table=cookie_data
    
    I DL'd the MySQL connector from the first post, so it should be good (plus I'm not entirely clear on how to check).
     
  11. Offline

    Coelho

    Use SQLite and you won't have to deal with these problems. Tick sql-lite in your properties to "yes"
     
  12. Offline

    sev042

    That did it!
    Thank you very much to both of you.
     
  13. Offline

    ShadowDrakken

    Do you have a MySQL server on your home computer? If not, switch to sqlite connector
    Is MySQL setup to allow root@localhost with no password (not recommended btw)? If not, make sure you have a proper user setup with either <user>@% or <user>@localhost and a strong password

    @Coelho noticed a minor issue, it's not a current problem, but may become one in the future. Usernames in MC have been made case sensitive. Case insensitive still works for the moment, but is deprecated.
     
  14. Offline

    Plyz

    if u made a permission for people who could earn pix and drop percent, this is imonster and currency in one :i
     
  15. Offline

    ShadowDrakken

    haha almost... iMonster has per-monster payouts, so if iMonster gets updated before Cookie! adds that, I'm turning off monsters in Cookie! (keeping the rest of Cookie! though) and going back to iMonster, lol
     
  16. Offline

    Coelho

    Hm? Everything in the script is not case sensitive as when any name goes into the parser it makes it uses "name.toLowerCase()" to change it to lower case. If that is not what your talking about, correct me.
    --- merged: Feb 24, 2011 3:12 AM ---
    That is what the options are for :D
     
  17. Offline

    ShadowDrakken

    Yeah, that's exactly the issue. If for instance, a person named "Player" joins the server, and another person named "player", your current method has them sharing a bank account :)

    Right now there's no overloading of names because MC only just made this change, but there could be in the future.
     
  18. Offline

    Coelho

    True, however this could only possibly happen if you have online-mode off.

    EDIT: While I was writing this a creeper blew me up in Minecraft. Now i'm sad. Lol
     
    SweetCraft Girl likes this.
  19. Offline

    ShadowDrakken

    Are you sure? Even minecraft.net is using case sensitive usernames when logging in...
     
  20. Offline

    Plyz

    Hmm i dont see my .properties file ? Is there a way u could tell me what complete filename + standard property looks like, cause eithers its not there, or its hidden on my ftp.
     
  21. Offline

    ShadowDrakken

    @Plyz all files starting with a period are hidden on linux systems, so if your FTP is linux, that's exactly what's happening :)
     
  22. Offline

    Plyz

    aww jesus thats why. Damnit :mad:
    --- merged: Feb 24, 2011 3:21 AM ---
    i fix it tomorrow then :)
     
  23. Offline

    Devon L Ferree

    cookies starts registering events before it's enabled, and this causes bukkit to throw up red flags on it.
     
  24. Offline

    sev042

    Hey we got the Server up and running great now, but there are two oddities.
    We have the monsters configured to drop coins, but when they are killed there are no messages in game or in the console.
    Also, we're using the iConomyChestShop mod, and there seems to be an error between that and the wrapper? Once again, I don't know anything about java, so if I'm asking in the wrong thread just let me know.

    Code:
    2011-02-23 20:49:13 [SEVERE] Could not pass event BLOCK_RIGHTCLICKED to iConomyChestShop
    java.lang.NullPointerException
            at com.bukkit.Acrobot.iConomyChestShop.iConomyChestShopBlockListener.hasPermissions(iConomyChestShopBlockListener.java:56)
            at com.bukkit.Acrobot.iConomyChestShop.iConomyChestShopBlockListener.onBlockRightClick(iConomyChestShopBlockListener.java:219)
            at org.bukkit.plugin.java.JavaPluginLoader$21.execute(JavaPluginLoader.java:232)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:225)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:495)
            at net.minecraft.server.Packet15Place.a(SourceFile:57)
            at net.minecraft.server.NetworkManager.a(SourceFile:230)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:70)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:338)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:253)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    
    Does that have anything to do with your wrapper?
     
  25. Offline

    Coelho

    It doesn't.
    --- merged: Feb 24, 2011 3:55 AM ---
    Get Permissions.
     
  26. Offline

    sev042

    We have Permissions and I'm pretty sure it's all set up correctly.
     
  27. Offline

    KingPin

    for some reason its not reading my DB table. the table states I have 1010 as balance but ingae it shows as -1 and even if I grant myself another 1000 it still remains 1010 in db and shows -1 ingame. any ideas?
     
  28. Offline

    Coelho

    The plugin is not synced with the DB, you must restart the server for it to synchronize.
    --- merged: Feb 24, 2011 4:10 AM ---
    Love it, but you spelt my name wrong in the contact me XD.
    --- merged: Feb 24, 2011 4:11 AM ---
    If you look at the error, its screwing up when its trying to check permissions.
     
  29. Offline

    sev042

    Alright I'll look over everything. Thanks again.
     
  30. Offline

    HaloInverse

    A suggestion came up in the DynamicMarket thread about switching DynamicMarket from iConomy (only sort-of working) to Cookies (less broken).

    While considering the merits of updating iConomy vs. switching, I had an idea about a simple generic economy interface, which would allow any economy-using plugin which used the interface to work with any economy plugin which implemented the interface (at least as far as basic transactions).

    If such a thing was built, would you consider adding support for it to Cookies?

    I'm in ur past, stealing ur nascent thoughts!
     

Share This Page