Page 1 of 2

Gracia Epilogue - Could not restore container error

Posted: Fri Dec 25, 2009 8:54 pm
by Lineage
If you want to receive support we need this info to help you properly.
ยป Find Revision
L2J Revision Number: 3701
L2JDP Revision Number: 6780

After updating a live server, im getting this error on console while it loads:

Code: Select all

L2World: (136 by 136) World Region Grid set up.could not restore container:java.lang.NullPointerException        at com.l2jserver.gameserver.model.ClanWarehouse.getOwner(ClanWarehouse.java:38)        at com.l2jserver.gameserver.model.ClanWarehouse.getOwner(ClanWarehouse.java:22)        at com.l2jserver.gameserver.model.itemcontainer.ItemContainer.restore(ItemContainer.java:617)        at com.l2jserver.gameserver.model.L2Clan.<init>(L2Clan.java:185)        at com.l2jserver.gameserver.datatables.ClanTable.<init>(ClanTable.java:88)        at com.l2jserver.gameserver.datatables.ClanTable.<init>(ClanTable.java:55)        at com.l2jserver.gameserver.datatables.ClanTable$SingletonHolder.<clinit>(ClanTable.java:517)        at com.l2jserver.gameserver.datatables.ClanTable.getInstance(ClanTable.java:63)        at com.l2jserver.gameserver.instancemanager.ClanHallManager.load(ClanHallManager.java:106)        at com.l2jserver.gameserver.instancemanager.ClanHallManager.<init>(ClanHallManager.java:60)        at com.l2jserver.gameserver.instancemanager.ClanHallManager.<init>(ClanHallManager.java:35)        at com.l2jserver.gameserver.instancemanager.ClanHallManager$SingletonHolder.<clinit>(ClanHallManager.java:248)        at com.l2jserver.gameserver.instancemanager.ClanHallManager.getInstance(ClanHallManager.java:46)        at com.l2jserver.gameserver.GameServer.<init>(GameServer.java:209)        at com.l2jserver.gameserver.GameServer.main(GameServer.java:503)
Any ideas what could be causing this?

Re: Gracia Epilogue - Could not restore container error

Posted: Fri Dec 25, 2009 8:57 pm
by janiii
some clan doesnt have an existing leader. check your clan_data table.

Re: Gracia Epilogue - Could not restore container error

Posted: Fri Dec 25, 2009 9:11 pm
by Lineage
I thought so since I was getting some java errors in console before the update, regarding some clans with no leader.

All clans in clan_data have a leader, I think the issue might be in characters table but im not sure how to trace the problematic clans since there are over 3000 clans!

Anyway, any idea what could have caused the character to lose "leadership" in characters table, yet still leader in clan_data?

Thanks!

Re: Gracia Epilogue - Could not restore container error

Posted: Fri Dec 25, 2009 9:16 pm
by BiggBoss
in a try / catch block, add a System.out or logger on catch with the char name, so you will get the stack trace with the char name, and with that, check the clan :roll:

Re: Gracia Epilogue - Could not restore container error

Posted: Fri Dec 25, 2009 9:29 pm
by janiii
or run this sql query (it will show you all clans that have no leader from the characters table):

Code: Select all

SELECT * FROM clan_data WHERE leader_id NOT IN (SELECT charId FROM characters);

Re: Gracia Epilogue - Could not restore container error

Posted: Fri Dec 25, 2009 9:33 pm
by Lineage
Thanks but I already used the following and it worked fine :)

Code: Select all

SELECT charId FROM characters WHERE clan_privs = 0 AND charId IN (SELECT leader_id FROM clan_data);

Re: Gracia Epilogue - Could not restore container error

Posted: Fri Dec 25, 2009 9:44 pm
by Lineage
Hmm, I used your query Janii just to be sure and guess what, I got zero results. Yet the one I wrote, showed me 11 characters with no clan privilages, yet leaders according to clan_data

Now im assuming this could happen when clan leadership is changed ingame and maybe the core is not updating the leader_id in clan_data!!?

I will go check the core files to be sure.

Re: Gracia Epilogue - Could not restore container error

Posted: Fri Dec 25, 2009 11:41 pm
by JIV
it still show that error after you check sql with that script?

Re: Gracia Epilogue - Could not restore container error

Posted: Sat Dec 26, 2009 1:09 pm
by Lineage
While tracking down clans with wrong leader or no leader at all, I found out that I have 6 clans with no leaders/members!!

So I cleaned the dead clans with:

Code: Select all

DELETE FROM clan_data WHERE clan_id NOT IN (SELECT clanid FROM characters);
The error used to come up in console 4 times, after using the query above, now it shows 3 times.

Anyway, It would be great to add the query above to IdFactory so it would do the cleaning on each restart.

I still have clans with members but no leaders, I cant just delete it so I will fix it manually and see if the errors are gone from console.

Re: Gracia Epilogue - Could not restore container error

Posted: Sat Dec 26, 2009 1:48 pm
by Lineage
No more errors in console regarding clans.

1) Deleted dead clans that have no leaders and no members:

Code: Select all

DELETE FROM clan_data WHERE clan_id NOT IN (SELECT clanid FROM characters);
2) Trace down clans with members BUT no leaders. Clan_data will help us do this:

Code: Select all

SELECT charId FROM characters WHERE clan_privs = 0 AND charId IN (SELECT leader_id FROM clan_data);
Now we have a list of characters that should be leader "according to clan_data", yet in characters table it has no clanid and no privs.

I manually edited characters table and gave each character the proper clan_id and clan_privs = 16777214

3) You can ease your work when to comes to clan_privs by using this query:

Code: Select all

UPDATE characters SET clan_privs = 16777214 WHERE charId IN (SELECT leader_id FROM clan_data);
Anyway, hope this helps others who might run into this error, and I still think we should have this in the IDFactory:

Code: Select all

DELETE FROM clan_data WHERE clan_id NOT IN (SELECT clanid FROM characters);

Re: Gracia Epilogue - Could not restore container error

Posted: Sun Jan 31, 2010 12:12 am
by atecubanos
Hello in updade for epilogue server working perfect one debug and not fixed ! i find clans not leader and more ! all querys executed ! and problem not fixed
one idea!
remenber all tables perfects problem is in clan i dont know
Image

Thanks ideas

Re: Gracia Epilogue - Could not restore container error

Posted: Sun Jan 31, 2010 12:20 am
by JIV

Re: Gracia Epilogue - Could not restore container error

Posted: Sun Jan 31, 2010 12:34 am
by atecubanos
Great now show Could not restore clan warehouse for ClanId: 268505274

why not I think now the problem was easy to solve for those who are doing updade! commit ^ ^
thanks

Re: Gracia Epilogue - Could not restore container error

Posted: Sun Jan 31, 2010 12:35 am
by JIV
and what was wrong with that clan?

Re: Gracia Epilogue - Could not restore container error

Posted: Sun Jan 31, 2010 12:42 am
by atecubanos
Nothing !
:shock:
1 one player and clan inative ! clan deleted :)

hey sendo for me your msn our icq in pm private
i am apocalipce
remenber ??
generaldilios ai i am apocalipce
* Dilios AI
* @author JIV, Sephiroth, Apocalipce