[INACTIVE][ECON] DynamicMarket v.0.4.8.1 - Versatile Shop Plugin [440-480+?]

Discussion in 'Inactive/Unsupported Plugins' started by HaloInverse, Feb 2, 2011.

  1. Offline

    HaloInverse

    DynamicMarket - Dynamic Global Shop Plugin

    Version: 0.4.8
    Built against: Bukkit 0.0.1 build #412
    Works with: CraftBukkit 0.0.1 builds #440-480 or thereabouts.

    Requires:
    • Permissions 2.5
      • Very recommended, but now optional! See "DynamicMarket.settings" below.
    • iConomy 4.1
    • Either of:
      • SQLite (easiest to set up, reccomended)
      • MySQL (more troublesome, more powerful)
    Buy items, sell items, admins set prices, et cetera. However, there's a lot going on under the hood...

    READ THIS BEFORE PROCEEDING.
    Seriously. (open)

    This plugin has a great deal of flexibility, but the price of more flexibility is more command options to control that flexibility. Computers just aren't very psychic.

    While in-game help exists for commands, the output from /shop help (<topic>) is intended to be a quick reference, not exhaustive documentation. Full instructions simply won't fit on the MineCraft client's tiny text display.

    You should read and understand the following sections before installing this plugin and setting up your shop. If not, you should at least read and understand the following sections while you are setting up your shop items.


    The big feature: Dynamic pricing. Items can be set to increase in price as they are purchased from the shop, and decrease in price as they are sold back, simulating open market conditions. The initial prices of items are just considered a starting point - user transactions will eventually adjust an item's price to a near-ideal level, based on actual value vs. rarity.

    However, as of 0.4.5, the configuration fields are now flexible enough to allow a range of behaviours, from fixed pricing with no stock limits, to fully-dynamic pricing with finite stock levels.

    This is by no means "complete" in the sense of "finished adding features", but it is complete enough to be functional and usable.

    Current Features (open)

    New & Current Features:
    • Buying and selling of items:
      • Item prices can be set to dynamically adjust according to supply and demand. This is highly adjustable, including the rate of price increase/decrease per transaction, optional hard overstock/understock limits, price ceilings/floors, etc. Leaving all the extra features turned off makes an item's price fixed and always-in-stock, like a basic "flat rate" shop.
      • Subtypes of items are fully supported.
      • List of items in the shop is broken into pages, accessible by number.
        • Partial-name searching! "/shop list wood" shows everything with "wood" in the name.
      • Item names for buy/sell/info also use partial substring matches.
      • A dynamically-priced item might cost more for 10 items than the cost of 1 item multiplied by 10, due to stock depletion. So, the "/shop <id>" command now takes an optional ":<count>" parameter, so you can get a quote for the actual buy/sell price of larger numbers of items.
    • Administration:
      • Shop items are edited via a "tag" system, so you don't have to re-enter every field for each small change. Plus there's a few utility tags which do other things to an item's record...
      • Item names are now editable, and will persist (independent of items.db) until the item's record is deleted.
        • This also makes items.db a convenience instead of a necessity, since items can be added by ID and then immediately renamed.
      • A "Default" item exists in the shop, which cannot be bought or sold, but serves as the base data for any new items you add to the shop. Any tags not supplied when you add an item will be copied from whatever you put into "Default".
      • Basic sanity-checking on input data has been added. Also, adjusting an item's bundle-size will rescale its price automatically.
      • Items can be set to be purchasable but not sellable, or vice versa. (Set either price to -1 to disable that transaction type for that item.)
        • Tags like "canbuy:n" and "nosell" can now be used.
      • An extended in-game help system. "/shop help" lists available commands and help topics. "/shop help <topic>" gives help on a shop command or other shop-related topic listed in the main help.
      • The list of commands displayed is filtered by the user's current permission level.
      • Shortcuts for all commands (except for database reset).
      • All commands except for "/shop buy" and "/shop sell" can be accessed through the Bukkit console. No need to log in to add or update items!
      • Access to the entire shop is now restrictable by permission.
      • Highly informative error messages, to help reveal why your database exploded. (Which really shouldn't happen, but you never know...)
      • The shop DB can now be exported to a .csv file, edited in your favorite spreadsheet, and re-imported back into the database, making large-scale changes easier.
      • NEW: The revenue/cost of transactions can now be transferred to another account. With the basic plugin, this can be an admin's iConomy account, or a dummy "GovernmentBank" account. (Don't use that name, or some bright spark will register that username and exploit you.) With a wrapper plugin, this can be set to link a shop's funds directly to an owning player's iConomy balance.
      • NEW: Transaction logging to a comma-delimited file, ready to import into a spreadsheet for nefarious financial analysis!

    Market Mechanics (open)

    Quick Market Mechanics Description:
    • Instead of a "buy price" and a "sell price", items now have a "base price" and a "sales tax". The "buy price" is based on the base price (adjusted by stock, if set to do so), and the "sell price" is based on (<buy price> - <sales tax%>). So if the sales tax is set to 25, then an item's selling price will be 75% of its purchase price. (The sales tax is entered as a number from 0 to 100, representing 0% to 100% tax.)
      • Using the old "/shop add <id> <buyprice> <sellprice>" format still works - the plugin just calculates the base price and sales tax, so that the buying and selling prices come out right.
    • Shop items have a "stock level", which is not necessarily a literal count of items in stock. By default, the stock level is considered an offset from baseline, rather than an absolute count.
      • Items with stock near zero are considered to be in "average" supply, and will be priced at their base price.
      • Items with a positive stock are considered "in surplus", and will be priced below their base price.
      • Items with a negative stock are considered "understocked", and will be priced above their base price.
      • This interpretation of stock levels can be made to behave like literal counted stock, by setting an item's StockFloor to zero, which prohibits negative stock.
    • Items have a "volatility", which indicates how quickly the price changes based on changes in stock level. It represents the percent increase in an item's price per item purchased, multiplied by 10000. V=1 (the lowest level) means that 100 items would have to be purchased to raise the price by 1%. V=10000 (the highest level) means that 1 item purchased would raise the price by 100% (doubling the price). (More examples in tags.txt)
      • There is also "inverse volatility", which represents the number of items needed to be bought in order to double the buying price (or halve it, if selling). This is more convenient for some people's mindsets, and is converted into volatility when entered.
    • The "sell price" is actually calculated from the buy price at the current stock level + 1, rather than the current stock level. This is to prevent gaining endless money by buying an item (driving the price up) then immediately selling it back (dropping the price) - if <sales tax> = 0, then buying-then-selling like this produces zero net gain/loss (as it should).
    • The tag presets "fixed", "float", "finite", and "flat" allow you to quickly set up common options. If used with the "Default" item before adding items to your shop, this will allow you to set the overall behaviour of the shop easily. See Tag Reference for further details.

    Commands (open)

    Commands:

    <Angle Brackets> denote parameters.
    (Round Brackets) denote optional sections.
    The brackets themselves are not part of the command; they are just used to describe syntax. Brackets should not be typed.
    If executing shop commands through the Bukkit console, leave off the initial slash.

    /shop - Shows the main help page. Lists commands and shortcuts.
    /shop help - Ditto.
    /shop help <topic> - Shows help on the given command or subject.
    /shop help tag <tagName> - Shows help on the given item tag.
    /shop <id>( :<count>) - Shows current buy/sell information on the given item.
    <id> can be an item name or a type number with an optional subtype:
    <id> = <itemName> | <itemID> | <itemID>,<subtypeID> | Default
    If <count> is used, shows the total price for the given number of items/bundles.
    /shop list (<partname>) (<pageNum>) - Lists a page of items in the shop. Default page = 1.
    If <partname> is used, lists only items with <partname> as part of their name.
    /shop buy <id>( :<quantity>) - Purchases an item. Default quantity is 1 bundle.
    /shop sell <id>( :<quantity>) - Sells an item. Default quantity is 1 bundle.
    /shop add <id>( :<bundleSize>) (<buyPrice> (<sellPrice>)) <tagList> - Adds an item to the shop list.
    <buyPrice> and <sellPrice> are accepted for convenience, and are internally converted to BasePrice and SalesTax.
    Unused tags will have their data copied from the Default item.
    Transactions will be in multiples of <bundleSize>. Default quantity is 1 item per bundle (unless overriden with the Default record)
    /shop info <id> - Shows much more detailed information about an item in the shop, such as stock level, volatility, etc.
    /shop update <id>( :<bundleSize>) (<buyPrice> (<sellPrice>)) <tagList> - Edits an item's shop data record.
    Data is first copied from the old record, then tags are applied in order of entry.
    NEW! <id> can be "all", applying changes to all items in the shop list.
    /shop remove <id>- Removes an item from the shop list.
    /shop reload - Reboots the plugin, reloading the configuration file and items.db.
    /shop reset - Deletes and recreates the shop database from scratch. Asks for an extra confirmation before doing so.
    /shop exportdb - Exports the shop database to a .csv file. The name and location are configured in SimpleMarket.settings. (Default: Plugins/DynamicMarket/shopDB.csv)
    /shop importdb - Imports a .csv file into the shop database. Same file location as used by the exportdb command. Note that the previous contents of the database are NOT cleared out before importing, so you may want to do a "/shop reset" before importing. The file's format MUST match the format of the exported file (except for quote marks, which are stripped out on import).

    Tag Reference
    Tag Usage Examples
    Permissions (open)

    Permissions:

    'dynamicmarket.access' : Grants basic access to the root /shop command.
    'dynamicmarket.buy' : Grants purchase rights.
    'dynamicmarket.sell' : Grants selling rights.
    'dynamicmarket.items.add' : Grants the ability to add new items to the shop.
    'dynamicmarket.items.update' : Grants the ability to edit items in the shop.
    'dynamicmarket.items.remove' : Grants the ability to remove items from the shop.
    'dynamicmarket.admin' : Grants the ability to delete-and-rebuild the shop database, and to reboot the plugin.

    Installation/Setup (open)

    Installation/Setup:
    • If you haven't already done so, install Permissions and iConomy, and ensure they work.
    • Copy DynamicMarket.jar into your Plugins/ folder.
    • NEW: Copy items.db into Plugins/DynamicMarket/ (or whichever directory you specify in DynamicMarket.settings) (DynamicMarket will work with other plugins' items.db files, but not all plugins will handle the extra subtype data in the items.db linked below.)
    • NEW: Copy either the SQLite connector or the MySQL connector into your main MineServer/Bukkit folder.
      • Or, if you have a MySQL server running, edit DynamicMarket.settings to specify the MySQL server, login, and password.
    • Edit plugins/Permissions/config.yml, and give everybody the appropriate permissions.
      • Most users would get 'dynamicmarket.access', 'dynamicmarket.buy', and 'dynamicmarket.sell', unless you want to restrict such commands to registered/VIP users.
      • Mods would probably get 'dynamicmarket.items.*'
      • Admins should get 'dynamicmarket.admin', if they don't already have '*'.
    • (Re)Start your MineCraft server. Errors may be thrown to the console, but the file Plugins/DynamicMarket/DynamicMarket.settings should be created.
    • Edit DynamicMarket.settings. Particularly, the setting "database-type".
      • "database-type=sqlite" : Use the SQLite connector. This is the simpler option. No further database access configuration should be needed.
      • "database-type=mysql" : Use the MySQL connector. You will need to set the options "mysql-user", "mysql-pass", and "mysql-db", as well as having a working MySQL server installation set up already.
    • NEW: Log in to MineCraft as someone with 'simpleMarket.admin' permission, or use the Bukkit console. Use "/shop reload" to load the edited config file.
    • Use /shop add to fill the market with tasty blocks at scandalous prices.
      • You WILL want to use "/shop update default" to set up some sensible default values for the items you will be adding, so you don't have to do so much typing for every item. (Or at least inspect the Default entry, to be sure you agree with it.)
      • If you want to make all of the items in the shop use dynamic pricing, set up the parameters in the Default item FIRST, so you don't have to go back and modify 100+ items to support variable pricing.

    DynamicMarket.settings Reference

    Downloads:
    • DynamicMarket 0.4.8.1 (.jar) (.7z) (iConomy 4.1, Permissions 2.5)
    • DynamicMarket 0.4.8 (.jar) (.7z) (iConomy 3.0, Permissions 2.1)
    • DynamicMarket 0.4.6.1 (.jar) (.7z) (iConomy 2.1 / Cookies+iConomy Wrapper)
    • DynamicMarket Source on GitHub
    • items.db <-- Contains subtypes. Put this in /Plugins/DynamicMarket/.
    • SQLite Connector (reccomended) Put this in your MineCraft server/Bukkit root.
    • MySQL Installation Guide (not so easy, probably not recommended for SQL server beginners)
    • Sample shopDB.csv Many (but not all) items, set up for floating-stock+floating-prices. Edit it if you like, then put this in your Plugins/DynamicMarket folder and use /shop importdb to load the items into your shop.
    DynamicMarket Wrapper Plugins:
    • DMWrapper: Restricts shop access to specific regions. Outdated.
    Want to integrate DynamicMarket's shop functions into your own plugin? Read this!
    To Do List(s) (open)


    To Do for v.0.5:
    • Logging of transactions. Done.
      • Global messages to alert to price changes.
    • Item classes: Use Permissions to control access to certain types of items, i.e. make safe items (gravel, stone, iron) available to anyone, but limit traffic in dangerous items (TNT, lava buckets, monster spawners) to VIPs. (For example.)
    • Customizable interface/highlight colours. Done.
    • Clean up the d*** out-of-date comments in the code. (Working on it.)
    To Do before 1.0:
    • Optional auto-transactions triggered by price disparities in raw/processed materials.
    • Possible migration of the new help system to a separate plugin, unless the expanded features needed become available in MCDocs or Bukkit.
    • Migrate config file handler to Yaml.
    • Random fluctuations of stock levels (would make the market more lively on a low-population server)
    • Stock levels drift back to rolling averages (smoothes out short-term price spikes, allows for long-term price drifting)

    Recent Changes:

    0.4.8.1:
    • Migrated to Permissions 2.5, iConomy 4.1.
    0.4.8:
    • shopLabel moved from a table name suffix to a table field.
    • Using "all" as the item name now applies the given tags to all items with the current shopLabel.
    • Altering an item's bundleSize now changes its stock level, as well as its basePrice.
      • New stock level is rounded down, to stave off future item duplication issues.
    • Sanity-check behaviour changed to make database queries more efficient and fend off future exploits:
      • stockHighest/stockLowest set to stock if lower/higher than stock.
      • stockCeil/stockFloor is set to stockFloor if lower/higher than stock.
      • priceCeil is raised to priceFloor if priceCeil<priceFloor.
        • Previous behaviours: Swap if order wrong, range-crop stock if outside highest/lowest/floor/ceil.
    • Fixed bug: Adding items without specifying count did not import count from default record.
    0.4.7:
    • Upgraded to iConomy 3.0.
    0.4.6.1:
    • Rolled back iConomy calls to 2.x style, to be compatible with Cookies' iConomy wrapper.
    0.4.6:
    • Support for transaction funds to be backed by an iConomy account.
      • Account link parameters added to wrapper-call messages.
    • Wrapper calls streamlined.
    • Added basic transaction logging.
    0.4.5:
    • Volatility can now go as low as 0.
      • In this way, stock can still be counted without affecting price.
    • CSV import/export now uses +INF / -INF as shorthand for min/max values in applicable fields.
    • Message colours now customizable in DynamicMarket.settings.
    • Expanded help on tags/presets.
    • Changed "fixed" tag, splitting its function with "flat".
    • Added tag presets "flat" and "finite".
    • Updated tag "renorm" to accept an optional new stock level other than 0.
    Full Changelog

    Credits:
    • Nijikokun: SimpleShop v.1.1, on which this was based. (And for Permissions and iConomy, on which this relies.)
    • AtomicAcidBath: Assistance with tracking down a hard-to-see MySQL syntax error.
     
    SoapFlakes and Mahngiel like this.
  2. Offline

    imaxorz

    ^ Which iConomy does that one work with? Also, does importing/exporting work in this version?

    I didn't see this link anywhere else, so I'm assuming its new?


    Thank you.
     
  3. Offline

    Andreas Brisner

    Sorry, i dont remember what works... 4.1 should, not sure with 4.4
     
  4. Offline

    imaxorz

    I'll be sure to try it out. I miss being able to import/export the db.
     
  5. Offline

    alexfire

    Hello I was wondering if anyone could help me with this Error...

    Code:
     [SEVERE] [DynamicMarket]: Error executing statement [CREATE TABLE Market ( id INTEGER PRIMARY KEY AUTOINCREMENT, item INT NOT NULL, subtype INT NOT NULL, name TEXT NOT NULL, count INT NOT NULL, baseprice INT NOT NULL, canbuy INT NOT NULL, cansell INT NOT NULL, stock INT NOT NULL, volatility INT NOT NULL, salestax INT NOT NULL, stockhighest INT NOT NULL, stocklowest INT NOT NULL, stockfloor INT NOT NULL, stockceil INT NOT NULL, pricefloor INT NOT NULL, priceceil INT NOT NULL, jitterperc INT NOT NULL, driftout INT NOT NULL, driftin INT NOT NULL, avgstock INT NOT NULL, class INT NOT NULL, shoplabel TEXT NOT NULL DEFAULT '');CREATE INDEX itemIndex ON Market (item);CREATE INDEX subtypeIndex ON Market (subtype);CREATE INDEX nameIndex ON Market (name);CREATE INDEX shoplabelIndex ON Market (shoplabel)] with sqlite: java.sql.SQLException: database is locked
    2011-03-08 10:07:56 [SEVERE] null loading DynamicMarket v0.4.8.1 (Is it up to date?)
    java.lang.NullPointerException
        at com.gmail.haloinverse.DynamicMarket.MarketItem.<init>(MarketItem.java:96)
        at com.gmail.haloinverse.DynamicMarket.DatabaseMarket.createTable(DatabaseMarket.java:57)
        at com.gmail.haloinverse.DynamicMarket.DatabaseCore.initialize(DatabaseCore.java:34)
        at com.gmail.haloinverse.DynamicMarket.DatabaseCore.initialize(DatabaseCore.java:28)
        at com.gmail.haloinverse.DynamicMarket.DatabaseCore.<init>(DatabaseCore.java:23)
        at com.gmail.haloinverse.DynamicMarket.DatabaseMarket.<init>(DatabaseMarket.java:20)
        at com.gmail.haloinverse.DynamicMarket.DynamicMarket.setup(DynamicMarket.java:171)
        at com.gmail.haloinverse.DynamicMarket.DynamicMarket.onEnable(DynamicMarket.java:105)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:118)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:414)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:187)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:83)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:61)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:366) 
    Not sure what the issue is i followed instructions on how to install. I am running craftbukkit 493 iConomy 4.4.5 and permissions 2.5.3 the sqlitedb is where it should be etc.
     
  6. Offline

    Andreas Brisner

    Known problem, fixed in my version as of .5 i think
     
  7. Offline

    alexfire

    Hmm .. I have 0.4.8.1 but as is the plugin wont run at all from this Error.
     
  8. Offline

    Andreas Brisner

  9. Offline

    Beaverbeliever

    I guess I spoke too soon. When I try to use features of DM, it seems to have errors working with all iConomy 4.x versions.

    [​IMG]
     
  10. Offline

    Hoddie54

    I'm having errors with 4.4.5 as are some others.
     
  11. Offline

    SimplisticBeing

    CB 493
    iConomy 4.4.3 (Will try 4.4.5 later today)
    DynamicMarket 0.4.8.5

    Changed economy plugin setting in config to iconomy4 and all went well..works fine.. Add.buy.sell..edit..
     
  12. Offline

    Hoddie54

    The 4.4.3 Is not available for download? Can I have a link for 4.4.3. Only 4.3 is available for download and latest which doesn't work.
     
  13. Offline

    imaxorz

    Can some one help me with a command to set the default item to...

    stock 0, can buy: y, can sell: y, volatility: 100, sales tax: 50, stock lowest: -INF, stock high: +INF, stock floor: -INF, stock ceiling: +INF, price floor: 1. price ceiling: +INF

    It was so much easier with importdb lol
     
  14. Offline

    Oscarius

    This is an easy task if you edit the database.
    [MERGETIME="1299614821"][/MERGETIME]
    What issue does it fix from 0.4.8.5?
     
  15. Offline

    Andreas Brisner

    You have to ask me such hard questions? I dont remember 100% what it fixed :p
    [MERGETIME="1299615148"][/MERGETIME]
    Im gonna needa guinea pig soon to test the new version that supports .xx coin (54.15 for example) anyone interested?
     
  16. Offline

    imaxorz

    I use Database Browser to look at the tables, but the default record doesn't show for me. It starts at 1. I believe the default record is -1.
     
  17. Offline

    Magik

    you got source or care to fork it on github so other people can contribute to keeping this up to date?

    i'm running into the sqlite create table error on my development machine at work, and I'd love to update my other plugin that makes this location based, but I'm having trouble getting past the create table lol... and I'm not too familiar with sqlite editors in windows.... meh I really should get a *nix desktop....
     
  18. Offline

    Andreas Brisner

    Of course I have the source:) what did you have in mind? Not forking on github was deliberate. I dont like having code out like that :p
     
  19. Offline

    Magik

    is your code to dirty to show to the world? ;) it's all good!

    I've been making some updates myself to a fork I just made, updating DynamicMarket to work with
    bukkit#432
    craftbukkit#493
    iConomy 4.4.5(Arcadia)
    Permissions v2.5.3

    My fork/source is here: https://github.com/magik/DynamicMarket

    I've made some changes myself already, updating to make it run with the above. I also fixed a few errors I ran into during the process. For example, I found a NPE error in executeUpdates() of SQLHandler - if an exception occurred during the for loop that unloads the psList, it would try to reference the variable ps which was just above set to null. I made a hacky fix for this that just sets ps to the current PreparedStatement being executed, so if an exception is caught, it can be read in the catch {} section.

    There was an error setting up the initial default MarketItem trying to use a passed null. I fixed that by passing an empty MarketItem ( so it would grab it's own hard coded defaults ).

    There was also an issue with the Market table update where it added the shopLabel column. It seems Java's JDBC driver doesn't like stuffing 2 queries into a PreparedStatement? I just made it into 2 PreparedStatements.

    I could not figure out what was wrong with the sqlite create table locking issue. As far as I can tell - it's because of some earlier action on the JDBC driver that was not completed? I traced the program execution and couldn't find anything that promissing. I did notice if I removed the checkTable() call, it would create the table fine.... so maybe something to do with the getMetaData() call in SQLHandler's checkTable?

    I don't use sqlite, but I was developing on another machine ( not my servers ) and was using the defaults. I got by with hacking it aroudn a bit, but I could not figure out a solution to fix this issue. I've since moved on to using my server's MySQL DB, but remotely....

    I'd love to do some work on my DMWrapper plugin, but first I want DynamicMarket in a place where it is usable at the latest recommended build.

    I guess I'd love to see your source put up on github, or possibly commited onto my github ( or better HaloInverse's - not sure if he is around... ). I don't have the major hours to spend on this, so other devs fixing bugs and issues are very welcome IMO.
    [MERGETIME="1299626922"][/MERGETIME]
    meh and after that work it looks like other people have forked the project and have made similar changes... ugh ninj's commit totally butchers the diff - i can't tell what he's changed....
     
  20. Offline

    imaxorz

    I'm using 4.8.1 with iConomy 4.3 (Lind) and it's working perfectly on CB493

    The only thing I have an issues with is exporting and importing, but I don't think it has anything to do with the plug in.

    If try to export while running the server on my PC it works, if I try to export while on my actual server it won't created the shopDB file even though it says "successful."

    My test server is a mirror version of my actual server with all the same plugins/versions. I have no idea why it will work while hosted on my pc, but will not work while hosted on my actual server.
     
  21. Offline

    oxide7

    Ok, I've got
    CB493,
    Iconomy (4+, all of them give the same result, currently using 4.3 since imaxorz said it worked for him)
    DM 4.8.1

    I keep getting this, not sure what I'm missing.
    Says database is locked, not sure what that means, actually I don't know what any of that garble means :D

    Code:
    2011-03-08 19:23:23 [INFO] Starting minecraft server version Beta 1.3
    2011-03-08 19:23:23 [INFO] Loading properties
    2011-03-08 19:23:23 [INFO] Starting Minecraft server on *:25565
    2011-03-08 19:23:23 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-493-g8b5496e-b493jnks (MC: 1.3)
    2011-03-08 19:23:23 [INFO] Preparing level "world"
    2011-03-08 19:23:23 [INFO] Preparing start region
    2011-03-08 19:23:24 [INFO] [Permissions] version [2.5.3] (Phoenix) was Initialized.
    2011-03-08 19:23:24 [INFO] ChatBukkit v0.0.1 is enabled!
    2011-03-08 19:23:24 [INFO] [DynamicMarket] Creating database.
    2011-03-08 19:23:27 [SEVERE] [DynamicMarket]: Error executing statement [CREATE TABLE Market ( id INTEGER PRIMARY KEY AUTOINCREMENT, item INT NOT NULL, subtype INT NOT NULL, name TEXT NOT NULL, count INT NOT NULL, baseprice INT NOT NULL, canbuy INT NOT NULL, cansell INT NOT NULL, stock INT NOT NULL, volatility INT NOT NULL, salestax INT NOT NULL, stockhighest INT NOT NULL, stocklowest INT NOT NULL, stockfloor INT NOT NULL, stockceil INT NOT NULL, pricefloor INT NOT NULL, priceceil INT NOT NULL, jitterperc INT NOT NULL, driftout INT NOT NULL, driftin INT NOT NULL, avgstock INT NOT NULL, class INT NOT NULL, shoplabel TEXT NOT NULL DEFAULT '');CREATE INDEX itemIndex ON Market (item);CREATE INDEX subtypeIndex ON Market (subtype);CREATE INDEX nameIndex ON Market (name);CREATE INDEX shoplabelIndex ON Market (shoplabel)] with sqlite: java.sql.SQLException: database is locked
    2011-03-08 19:23:27 [SEVERE] null loading DynamicMarket v0.4.8.1 (Is it up to date?)
    java.lang.NullPointerException
        at com.gmail.haloinverse.DynamicMarket.MarketItem.<init>(MarketItem.java:96)
        at com.gmail.haloinverse.DynamicMarket.DatabaseMarket.createTable(DatabaseMarket.java:57)
        at com.gmail.haloinverse.DynamicMarket.DatabaseCore.initialize(DatabaseCore.java:34)
        at com.gmail.haloinverse.DynamicMarket.DatabaseCore.initialize(DatabaseCore.java:28)
        at com.gmail.haloinverse.DynamicMarket.DatabaseCore.<init>(DatabaseCore.java:23)
        at com.gmail.haloinverse.DynamicMarket.DatabaseMarket.<init>(DatabaseMarket.java:20)
        at com.gmail.haloinverse.DynamicMarket.DynamicMarket.setup(DynamicMarket.java:171)
        at com.gmail.haloinverse.DynamicMarket.DynamicMarket.onEnable(DynamicMarket.java:105)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:118)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:414)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:187)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:83)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:61)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    2011-03-08 19:23:27 [INFO] [iConomy] Logging is currently disabled.
    2011-03-08 19:23:27 [INFO] [iConomy] v4.3 (Lind) loaded.
    2011-03-08 19:23:27 [INFO] [iConomy] Developed by: [Nijikokun, Coelho]
    2011-03-08 19:23:27 [INFO] [Permissions] version [2.5.3] (Phoenix)  loaded
    2011-03-08 19:23:27 [INFO] [iConomy] Successfully linked with Permissions.
    2011-03-08 19:23:27 [INFO] ScrapBukkit version 0.2.1 is enabled!
    2011-03-08 19:23:27 [INFO] Done (0.388s)! For help, type "help" or "?"
    2011-03-08 19:23:44 [INFO] CONSOLE: Stopping the server..
    2011-03-08 19:23:44 [INFO] Stopping server
    2011-03-08 19:23:44 [INFO] [DynamicMarket] version [0.4.8.1] (Caribou) disabled
    2011-03-08 19:23:44 [INFO] [iConomy] All un-saved account data has been saved, plugin is now disabling.
    2011-03-08 19:23:44 [INFO] [Permissions] version [2.5.3] (Phoenix) disabled successfully.
    2011-03-08 19:23:44 [INFO] Saving chunks
    
     
  22. Offline

    imaxorz

    Post your config file
     
  23. Offline

    Magik

    I had the same error with the latest github source - it happens when the sqlite database is first created

    I had to hack the code to get it to create the database....
    [MERGETIME="1299637375"][/MERGETIME]
    so I tracked down the issue with the database locked when first starting this plugin and using sqlite, and figured it out - HaloInverse forgot to close out his Connection to the sqlite database, and this caused it to keep it locked, and when another connection came through, the first one was still blocking it.

    relevant changes on line 64 of DatabaseMarket.java ( https://github.com/magik/DynamicMarket/commit/4098fd104c9ffcb2831383b2e2a8d19c37618467 )

    Here's a link to my latest compiled jar: https://github.com/downloads/magik/DynamicMarket/DynamicMarket.jar

    I've only tested this against:
    bukkit#432
    craftbukkit#493
    iConomy 4.4.5 (Arcadia)
    Permissions v2.5.3
    [MERGETIME="1299637454"][/MERGETIME]
    try the link to the jar i just posted above?
    [MERGETIME="1299637779"][/MERGETIME]
    great, and just as soon as I finish tidying up, they gotta promote another craftbukkit build.... *sigh* I guess that's what you expect developing for something that's being developed ;)
     
  24. Offline

    imaxorz

    ^ I hope to see your wrap working soon :)
     
  25. Offline

    oxide7

    Ok, with cb493, iconomy4.4.5, and permissions 2.5.3

    and Magik's new jar, i get this.
    Code:
    2011-03-08 20:36:46 [INFO] [DynamicMarket] Creating database.
    2011-03-08 20:36:49 [SEVERE] [DynamicMarket]: Error executing statement [CREATE TABLE Market ( id INTEGER PRIMARY KEY AUTOINCREMENT, item INT NOT NULL, subtype INT NOT NULL, name TEXT NOT NULL, count INT NOT NULL, baseprice INT NOT NULL, canbuy INT NOT NULL, cansell INT NOT NULL, stock INT NOT NULL, volatility INT NOT NULL, salestax INT NOT NULL, stockhighest INT NOT NULL, stocklowest INT NOT NULL, stockfloor INT NOT NULL, stockceil INT NOT NULL, pricefloor INT NOT NULL, priceceil INT NOT NULL, jitterperc INT NOT NULL, driftout INT NOT NULL, driftin INT NOT NULL, avgstock INT NOT NULL, class INT NOT NULL, shoplabel TEXT NOT NULL DEFAULT '');CREATE INDEX itemIndex ON Market (item);CREATE INDEX subtypeIndex ON Market (subtype);CREATE INDEX nameIndex ON Market (name);CREATE INDEX shoplabelIndex ON Market (shoplabel)] with sqlite: java.sql.SQLException: database is locked
    2011-03-08 20:36:49 [SEVERE] null loading DynamicMarket v0.4.8 (Is it up to date?)
    java.lang.NullPointerException
        at com.gmail.haloinverse.DynamicMarket.MarketItem.<init>(MarketItem.java:96)
        at com.gmail.haloinverse.DynamicMarket.DatabaseMarket.createTable(DatabaseMarket.java:57)
        at com.gmail.haloinverse.DynamicMarket.DatabaseCore.initialize(DatabaseCore.java:34)
        at com.gmail.haloinverse.DynamicMarket.DatabaseCore.initialize(DatabaseCore.java:28)
        at com.gmail.haloinverse.DynamicMarket.DatabaseCore.<init>(DatabaseCore.java:23)
        at com.gmail.haloinverse.DynamicMarket.DatabaseMarket.<init>(DatabaseMarket.java:20)
        at com.gmail.haloinverse.DynamicMarket.DynamicMarket.setup(DynamicMarket.java:169)
        at com.gmail.haloinverse.DynamicMarket.DynamicMarket.onEnable(DynamicMarket.java:103)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:118)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:414)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:187)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:83)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:61)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    
    if you wanted the config for DM here it is.

    Code:
    #Minecraft Properties File
    #Tue Mar 08 20:36:08 CST 2011
    max-items-per-sale=64
    mysql-dbengine=MyISAM
    mysql-db=jdbc\:mysql\://localhost\:3306/minecraft
    shop-tag={BKT}[{}Shop{BKT}]{}
    mysql-user=root
    items-db-path=plugins\\DynamicMarket\\
    database-type=sqlite
    mysql-pass=pass
    max-items-per-purchase=64
    
     
  26. Offline

    Magik

  27. Offline

    imaxorz


    What did you use for economy-plugin=
     
  28. Offline

    Magik

    @oxide7

    hrm... that's odd... this is your first time using DynamicMarket correct? If that is the case, can you try deleting your plugins/DynamicMarket/shop.db file and restarting the server?
    [MERGETIME="1299638900"][/MERGETIME]
    @imaxorz

    economy-plugin=iconomy3
     
  29. Offline

    imaxorz


    Hmm tried that too and this is what I get using iConomy 4.4.5 and your latest .jar



    21:49:26 [SEVERE] com/nijiko/coelho/iConomy/system/Bank loading DynamicMarket v0
    .4.8 (Is it up to date?)
    java.lang.NoClassDefFoundError: com/nijiko/coelho/iConomy/system/Bank
    at com.gmail.haloinverse.DynamicMarket.DynamicMarket.connectToiConomy(Dy
    namicMarket.java:280)
    at com.gmail.haloinverse.DynamicMarket.DynamicMarket.connectEconomy(Dyna
    micMarket.java:253)
    at com.gmail.haloinverse.DynamicMarket.DynamicMarket.setupEconomy(Dynami
    cMarket.java:238)
    at com.gmail.haloinverse.DynamicMarket.DynamicMarket.onEnable(DynamicMar
    ket.java:105)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:118)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader
    .java:414)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage
    r.java:187)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:83)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:61)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
    at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.ClassNotFoundException: com.nijiko.coelho.iConomy.system.Ba
    nk
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
    java:30)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 14 more


    >
     
  30. Offline

    Magik

    hrm.... that's very odd... you are SURE you are using 4.4.5 ? Can you post a full server bootup log with that error included?
     
  31. Offline

    imaxorz

    Just double checked it twice.

    http://pastebin.com/wXgaVk8z
     

Share This Page