SQL exception while saving olympiad fight.

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
User avatar
xone
Posts: 122
Joined: Thu Nov 05, 2009 5:04 am

SQL exception while saving olympiad fight.

Post by xone »

If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision Number:4206
L2JDP Revision Number:7215


ok got this ....

Code: Select all

SQL exception while saving olympiad fight.com.mysql.jdbc.MysqlDataTruncation: Data truncation: Out of range value for column 'time' at row 1        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3561)        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3495)        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959)        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2113)        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2693)        at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2102)        at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1364)         at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.execute(NewProxyPreparedStatement.java:989)        at com.l2jserver.gameserver.model.olympiad.OlympiadGame.saveResults(OlympiadGame.java:999)        at com.l2jserver.gameserver.model.olympiad.OlympiadGame.validateWinner(OlympiadGame.java:835)        at com.l2jserver.gameserver.model.olympiad.OlympiadGameTask.run(OlympiadGame.java:1134)        at java.lang.Thread.run(Unknown Source) 
User avatar
JIV
L2j Veteran
L2j Veteran
Posts: 1882
Joined: Sun Jan 06, 2008 8:17 pm
Location: Slovakia
Contact:

Re: SQL exception while saving olympiad fight.

Post by JIV »

did you modified olympiad settings?
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: SQL exception while saving olympiad fight.

Post by janiii »

the table definition is wrong. both columns hold time info, so are they different?

Code: Select all

  `start` decimal(20,0) unsigned NOT NULL default '0',  `time` int(10) unsigned NOT NULL default '0',
maybe start was not initiated correctly? imo time column should be able to hold also current time in millis..
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
User avatar
JIV
L2j Veteran
L2j Veteran
Posts: 1882
Joined: Sun Jan 06, 2008 8:17 pm
Location: Slovakia
Contact:

Re: SQL exception while saving olympiad fight.

Post by JIV »

because oly fight on default can take max 5 min or so.
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: SQL exception while saving olympiad fight.

Post by janiii »

then start was not initiated because no oly fight started - disconnected player before teleport?
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
User avatar
JIV
L2j Veteran
L2j Veteran
Posts: 1882
Joined: Sun Jan 06, 2008 8:17 pm
Location: Slovakia
Contact:

Re: SQL exception while saving olympiad fight.

Post by JIV »

yea maybe.
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: SQL exception while saving olympiad fight.

Post by janiii »

then maybe just a check if start is 0, then also fight is 0, else current - start.

Code: Select all

Index: java/com/l2jserver/gameserver/model/olympiad/OlympiadGame.java===================================================================--- java/com/l2jserver/gameserver/model/olympiad/OlympiadGame.java	(revision 4207)+++ java/com/l2jserver/gameserver/model/olympiad/OlympiadGame.java	(working copy)@@ -735,7 +735,9 @@ 		String winner = "draw";  		// Calculate Fight time-		long _fightTime = (System.currentTimeMillis() - _startTime);+		long _fightTime = 0;+		if (_startTime > 0)+			_fightTime = (System.currentTimeMillis() - _startTime);  		if (_playerOne == null && _playerTwo == null) 		{
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
User avatar
JIV
L2j Veteran
L2j Veteran
Posts: 1882
Joined: Sun Jan 06, 2008 8:17 pm
Location: Slovakia
Contact:

Re: SQL exception while saving olympiad fight.

Post by JIV »

User avatar
JIV
L2j Veteran
L2j Veteran
Posts: 1882
Joined: Sun Jan 06, 2008 8:17 pm
Location: Slovakia
Contact:

Re: SQL exception while saving olympiad fight.

Post by JIV »

^^ commit your version.
User avatar
xone
Posts: 122
Joined: Thu Nov 05, 2009 5:04 am

Re: SQL exception while saving olympiad fight.

Post by xone »

Thanks! :D
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: SQL exception while saving olympiad fight.

Post by janiii »

is there a szenario how to reproduce this error?
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
User avatar
xone
Posts: 122
Joined: Thu Nov 05, 2009 5:04 am

Re: SQL exception while saving olympiad fight.

Post by xone »

hmmm don't think so .... when I got home ... my GM was fighting at oly, did alt tab ... error on screen :) ... thats all.
User avatar
Gnacik
L2j Veteran
L2j Veteran
Posts: 925
Joined: Tue Dec 16, 2008 3:49 pm
Location: Wąchock ٩(̾●̮̮̃̾•̃̾)۶ Polska
Contact:

Re: SQL exception while saving olympiad fight.

Post by Gnacik »

just move _startTime = System.currentTimeMillis(); before if (_aborted) return false;, so start time will be set even if fight is aborted.

start time cannot be zero, its timestamp so fights with start=0 in monument will be displayed as 1970-01-01
Post Reply