ahmedsuffian / aionxemu

Automatically exported from code.google.com/p/aionxemu
0 stars 0 forks source link

mysql5.MySQL5LegionDAO:551 - Can't check if legionId 157555, is used. java.sql.SQLException: Column 'legionId' not found. #198

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Core revision:
r226
Bug description:
[ERROR 2011-03-28 23:28:47] mysql5.MySQL5LegionDAO:551 - Can't check if 
legionId 157555, is used.
java.sql.SQLException: Column 'legionId' not found.
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1075)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:989)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:984)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:929)
        at com.mysql.jdbc.ResultSetImpl.findColumn(ResultSetImpl.java:1144)
        at com.mysql.jdbc.ResultSetImpl.getInt(ResultSetImpl.java:2813)
        at org.apache.commons.dbcp.DelegatingResultSet.getInt(DelegatingResultSet.java:275)
        at org.apache.commons.dbcp.DelegatingResultSet.getInt(DelegatingResultSet.java:275)
        at mysql5.MySQL5LegionDAO.isLegionIdUsed(MySQL5LegionDAO.java from JavaSourceFromFile:548)
        at mysql5.MySQL5LegionDAO.saveNewAnnouncement(MySQL5LegionDAO.java from JavaSourceFromFile:308)
        at gameserver.services.LegionService.storeNewAnnouncement(LegionService.java:1122)
        at gameserver.services.LegionService.changeAnnouncement(LegionService.java:1093)
        at gameserver.services.LegionService.handleLegionRequest(LegionService.java:1317)
        at gameserver.network.aion.clientpackets.CM_LEGION.runImpl(CM_LEGION.java:153)
        at gameserver.network.aion.AionClientPacket.run(AionClientPacket.java:64)
        at com.aionemu.commons.utils.concurrent.ExecuteWrapper.execute(ExecuteWrapper.java:54)
        at gameserver.taskmanager.FIFORunnableQueue.removeAndExecuteFirst(FIFORunnableQueue.java:28)
        at gameserver.taskmanager.FIFOExecutableQueue.run(FIFOExecutableQueue.java:65)
        at com.aionemu.commons.utils.concurrent.ExecuteWrapper.execute(ExecuteWrapper.java:54)
        at com.aionemu.commons.utils.concurrent.ExecuteWrapper.run(ExecuteWrapper.java:39)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)

Original issue reported on code.google.com by wildsisop@gmail.com on 28 Mar 2011 at 7:33

GoogleCodeExporter commented 9 years ago
This error is caused by an irregularity in your database. Check the tabal 
"Legions" and column "Id" error check that id "157555".

Original comment by donacion...@gmail.com on 28 Mar 2011 at 9:36

GoogleCodeExporter commented 9 years ago
I have this error too

Original comment by carles.d...@gmail.com on 29 Mar 2011 at 12:49

GoogleCodeExporter commented 9 years ago
Make sure that your Legions table has the  'Id' column. If not, i suggest you 
run the table creation script:

CREATE TABLE IF NOT EXISTS `legions` (
  `id` int(11) NOT NULL,
  `name` varchar(16) NOT NULL,
  `rank` int(11) NOT NULL DEFAULT '0',
  `oldrank` int(11) NOT NULL DEFAULT '0',
  `level` int(1) NOT NULL DEFAULT '1',
  `contribution_points` INT NOT NULL DEFAULT '0',
  `legionar_permission2` int(11) NOT NULL DEFAULT '64',
  `centurion_permission1` int(11) NOT NULL DEFAULT '104',
  `centurion_permission2` int(11) NOT NULL DEFAULT '8',
  `disband_time` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `name_unique` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Original comment by alejsimp...@gmail.com on 29 Mar 2011 at 2:20

GoogleCodeExporter commented 9 years ago
Or have you altered this table in any manner that you added the column 
LegionID??

Original comment by alejsimp...@gmail.com on 29 Mar 2011 at 2:31

GoogleCodeExporter commented 9 years ago
My mistake, apply fix and report result.

Original comment by ZeroSign...@gmail.com on 29 Mar 2011 at 2:04

Attachments:

GoogleCodeExporter commented 9 years ago
In your patch - 
Index: MySQL5LegionDAO.java
===================================================================
--- MySQL5LegionDAO.java    (revision 227)
+++ MySQL5LegionDAO.java    (working copy)
@@ -545,10 +545,10 @@
             s.setInt(1, legionId);

that legionId is correct or should also be replaced with id?

Original comment by wildsisop@gmail.com on 30 Mar 2011 at 5:35

GoogleCodeExporter commented 9 years ago
Committed Revision 232.

Original comment by ZeroSign...@gmail.com on 31 Mar 2011 at 11:47

GoogleCodeExporter commented 9 years ago

Original comment by ZeroSign...@gmail.com on 6 Apr 2011 at 1:56