Error Executing Transaction #2


  • Defect
  • Accepted
Open
Assigned to _ForgeUser1494830
  • t2wave created this issue Dec 27, 2012

    What steps will reproduce the problem?
    1. Use /visit <woldname> to visit any world

    What is the expected output? What do you see instead?
    Prefer no errors. It isn't the end of the world but it kind of clutters up the log.

    What version of the product are you using?
    1.0.7

    Do you have an error log of what happened?
    2012-12-27 22:04:03 [SEVERE] Error executing transaction
    javax.persistence.OptimisticLockException: Data has changed. updated [0] rows sql[update locations set x=?, y=?, z=?, yaw=?, pitch=? where group_name=? and player=? and world=? and x=? and y=? and z=? and yaw=? and pitch=?] bind[null]
        at com.avaje.ebeaninternal.server.persist.dml.DmlHandler.checkRowCount(DmlHandler.java:123)
        at com.avaje.ebeaninternal.server.persist.dml.UpdateHandler.execute(UpdateHandler.java:106)
        at com.avaje.ebeaninternal.server.persist.dml.DmlBeanPersister.execute(DmlBeanPersister.java:105)
        at com.avaje.ebeaninternal.server.persist.dml.DmlBeanPersister.update(DmlBeanPersister.java:85)
        at com.avaje.ebeaninternal.server.persist.DefaultPersistExecute.executeUpdateBean(DefaultPersistExecute.java:110)
        at com.avaje.ebeaninternal.server.core.PersistRequestBean.executeNow(PersistRequestBean.java:531)
        at com.avaje.ebeaninternal.server.core.PersistRequestBean.executeOrQueue(PersistRequestBean.java:557)
        at com.avaje.ebeaninternal.server.persist.DefaultPersister.update(DefaultPersister.java:430)
        at com.avaje.ebeaninternal.server.persist.DefaultPersister.saveEnhanced(DefaultPersister.java:343)
        at com.avaje.ebeaninternal.server.persist.DefaultPersister.saveRecurse(DefaultPersister.java:315)
        at com.avaje.ebeaninternal.server.persist.DefaultPersister.save(DefaultPersister.java:282)
        at com.avaje.ebeaninternal.server.core.DefaultServer.save(DefaultServer.java:1577)
        at com.avaje.ebeaninternal.server.core.DefaultServer.save(DefaultServer.java:1567)
        at org.tyrannyofheaven.bukkit.Excursion.dao.AvajeExcursionDao$2.run(AvajeExcursionDao.java:88)
        at org.tyrannyofheaven.bukkit.Excursion.util.transaction.TransactionRunnable.doInTransaction(TransactionRunnable.java:76)
        at org.tyrannyofheaven.bukkit.Excursion.util.transaction.RetryingAvajeTransactionStrategy.execute(RetryingAvajeTransactionStrategy.java:69)
        at org.tyrannyofheaven.bukkit.Excursion.util.transaction.TransactionRunnable.run(TransactionRunnable.java:63)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:679)

    Please provide any additional information below.
    Despite the error the plugin appears to function properly.

  • t2wave added the tags New Defect Dec 27, 2012
  • t2wave posted a comment Dec 27, 2012

    Forgot to note that we are running 1.4.6-R0.1

  • _ForgeUser1494830 posted a comment Dec 28, 2012

    Thanks for the report. A couple questions:

    What database do you have configured in bukkit.yml? I'm curious whether you're using SQLite or a "real" database (MySQL, PostgreSQL, etc.).

    Does this occur every time someone uses /visit? Or just occasionally?

    Lastly, if you're using a real database, is that database shared between multiple Bukkit servers?

    Anyway, thanks again for the report. Unfortunately, there's no real fix for this other than the plugin trying the update again. It's hardcoded to retry once, which has been enough up until now (even for my other plugins). The only thing I can do is increase the retry count. But I guess I can make it configurable as well.

    Dev build #199+ will have this potential fix/new option. (And will also be included in version 1.0.8+ eventually.)

  • _ForgeUser1494830 removed a tag New Dec 28, 2012
  • _ForgeUser1494830 added a tag Accepted Dec 28, 2012
  • t2wave posted a comment Dec 28, 2012

    We are using MySQL.

    The error occurs every time a player uses /visit. Curiously it does not occur if we use Essentials /sudo function or run the command through a CommandHelper alias.

    The database is not shared between servers.

  • _ForgeUser1494830 posted a comment Dec 28, 2012

    Thanks for the answers. The fact that it happens every time means something is very wrong — most likely your database is rounding the player's position data (x, y, z, yaw, pitch) which causes the UPDATE statement to fail/not match.

    In fact, I don't think this plugin is actually working for you as it only saves the position of the player the first time they use it. Does this seem to be the case?

    I'll have to try something new with the way locations are saved/updated. I'll see what I can do within a day or two.

  • t2wave posted a comment Dec 28, 2012

    You'll have to forgive me. I just double checked the bukkit.yml and we are using sqlite.

    The plugin appears to work as it brings me back to the location I left from no matter how many times I use it. That said it clearly is having an issue of some kind.


To post a comment, please login or register a new account.