- Хроники
- Master Class
- Исходники
- Присутствуют
- Сборка
- Shield of the Kingdom (Мобиус)
Такая проблема при перетаскивании или изменения местоположения макросса/шорткарты на основной панели, даёт ошибку что не может записать в базу level.
Пошёл по следам запроса, вроде всё в порядке, в запросе должен отсылается простой инт. В самой таблице тоже на столбец 'level' тип тоже инт,
может тыкните куда копать? за ранее спасибо
[28/10 20:02:37] Could not store character shortcut: (conn=421) Out of range value for column 'level' at row 1
java.sql.SQLSyntaxErrorException: (conn=421) Out of range value for column 'level' at row 1
at org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.createException(ExceptionFactory.java:62)
at org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.create(ExceptionFactory.java:158)
at org.mariadb.jdbc.MariaDbStatement.executeExceptionEpilogue(MariaDbStatement.java:266)
at org.mariadb.jdbc.ClientSidePreparedStatement.executeInternal(ClientSidePreparedStatement.java:229)
at org.mariadb.jdbc.ClientSidePreparedStatement.execute(ClientSidePreparedStatement.java:149)
at org.l2jmobius.gameserver.model.ShortCuts.registerShortCutInDb(ShortCuts.java:95)
at org.l2jmobius.gameserver.model.ShortCuts.registerShortCut(ShortCuts.java:74)
at org.l2jmobius.gameserver.model.actor.Player.registerShortCut(Player.java:1764)
at org.l2jmobius.gameserver.network.clientpackets.RequestShortCutReg.runImpl(RequestShortCutReg.java:154)
at org.l2jmobius.gameserver.network.clientpackets.ClientPacket.run(ClientPacket.java:49)
at org.l2jmobius.commons.threads.RunnableWrapper.run(RunnableWrapper.java:31)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: org.mariadb.jdbc.internal.util.exceptions.MariaDbSqlException: Out of range value for column 'level' at row 1
at org.mariadb.jdbc.internal.util.exceptions.MariaDbSqlException.of(MariaDbSqlException.java:34)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.exceptionWithQuery(AbstractQueryProtocol.java:194)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.exceptionWithQuery(AbstractQueryProtocol.java:177)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.executeQuery(AbstractQueryProtocol.java:321)
at org.mariadb.jdbc.ClientSidePreparedStatement.executeInternal(ClientSidePreparedStatement.java:220)
... 10 more
Caused by: java.sql.SQLException: Out of range value for column 'level' at row 1
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.readErrorPacket(AbstractQueryProtocol.java:1695)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.readPacket(AbstractQueryProtocol.java:1557)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.getResult(AbstractQueryProtocol.java:1520)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.executeQuery(AbstractQueryProtocol.java:318)
... 11 more
java.sql.SQLSyntaxErrorException: (conn=421) Out of range value for column 'level' at row 1
at org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.createException(ExceptionFactory.java:62)
at org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.create(ExceptionFactory.java:158)
at org.mariadb.jdbc.MariaDbStatement.executeExceptionEpilogue(MariaDbStatement.java:266)
at org.mariadb.jdbc.ClientSidePreparedStatement.executeInternal(ClientSidePreparedStatement.java:229)
at org.mariadb.jdbc.ClientSidePreparedStatement.execute(ClientSidePreparedStatement.java:149)
at org.l2jmobius.gameserver.model.ShortCuts.registerShortCutInDb(ShortCuts.java:95)
at org.l2jmobius.gameserver.model.ShortCuts.registerShortCut(ShortCuts.java:74)
at org.l2jmobius.gameserver.model.actor.Player.registerShortCut(Player.java:1764)
at org.l2jmobius.gameserver.network.clientpackets.RequestShortCutReg.runImpl(RequestShortCutReg.java:154)
at org.l2jmobius.gameserver.network.clientpackets.ClientPacket.run(ClientPacket.java:49)
at org.l2jmobius.commons.threads.RunnableWrapper.run(RunnableWrapper.java:31)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: org.mariadb.jdbc.internal.util.exceptions.MariaDbSqlException: Out of range value for column 'level' at row 1
at org.mariadb.jdbc.internal.util.exceptions.MariaDbSqlException.of(MariaDbSqlException.java:34)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.exceptionWithQuery(AbstractQueryProtocol.java:194)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.exceptionWithQuery(AbstractQueryProtocol.java:177)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.executeQuery(AbstractQueryProtocol.java:321)
at org.mariadb.jdbc.ClientSidePreparedStatement.executeInternal(ClientSidePreparedStatement.java:220)
... 10 more
Caused by: java.sql.SQLException: Out of range value for column 'level' at row 1
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.readErrorPacket(AbstractQueryProtocol.java:1695)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.readPacket(AbstractQueryProtocol.java:1557)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.getResult(AbstractQueryProtocol.java:1520)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.executeQuery(AbstractQueryProtocol.java:318)
... 11 more
private void registerShortCutInDb(Shortcut shortcut, Shortcut oldShortCut)
{
if (oldShortCut != null)
{
deleteShortCutFromDb(oldShortCut);
}
try (Connection con = DatabaseFactory.getConnection();
PreparedStatement statement = con.prepareStatement("REPLACE INTO character_shortcuts (charId,slot,page,type,shortcut_id,level,sub_level,class_index) values(?,?,?,?,?,?,?,?)"))
{
statement.setInt(1, _owner.getObjectId());
statement.setInt(2, shortcut.getSlot());
statement.setInt(3, shortcut.getPage());
statement.setInt(4, shortcut.getType().ordinal());
statement.setInt(5, shortcut.getId());
statement.setInt(6, shortcut.getLevel());
statement.setInt(7, shortcut.getSubLevel());
statement.setInt(8, _owner.getClassIndex());
statement.execute();
}
catch (Exception e)
{
LOGGER.log(Level.WARNING, "Could not store character shortcut: " + e.getMessage(), e);
}
}
{
if (oldShortCut != null)
{
deleteShortCutFromDb(oldShortCut);
}
try (Connection con = DatabaseFactory.getConnection();
PreparedStatement statement = con.prepareStatement("REPLACE INTO character_shortcuts (charId,slot,page,type,shortcut_id,level,sub_level,class_index) values(?,?,?,?,?,?,?,?)"))
{
statement.setInt(1, _owner.getObjectId());
statement.setInt(2, shortcut.getSlot());
statement.setInt(3, shortcut.getPage());
statement.setInt(4, shortcut.getType().ordinal());
statement.setInt(5, shortcut.getId());
statement.setInt(6, shortcut.getLevel());
statement.setInt(7, shortcut.getSubLevel());
statement.setInt(8, _owner.getClassIndex());
statement.execute();
}
catch (Exception e)
{
LOGGER.log(Level.WARNING, "Could not store character shortcut: " + e.getMessage(), e);
}
}
может тыкните куда копать? за ранее спасибо
Последнее редактирование: