Gracia Epilogue - Could not restore container error

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
Lineage
Posts: 63
Joined: Thu Jan 31, 2008 7:39 am

Gracia Epilogue - Could not restore container error

Post 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?
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: Gracia Epilogue - Could not restore container error

Post by janiii »

some clan doesnt have an existing leader. check your clan_data table.
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
Lineage
Posts: 63
Joined: Thu Jan 31, 2008 7:39 am

Re: Gracia Epilogue - Could not restore container error

Post 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!
User avatar
BiggBoss
L2j Veteran
L2j Veteran
Posts: 1104
Joined: Wed Apr 15, 2009 3:11 pm
Location: Spain

Re: Gracia Epilogue - Could not restore container error

Post 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:
Image
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: Gracia Epilogue - Could not restore container error

Post 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);
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
Lineage
Posts: 63
Joined: Thu Jan 31, 2008 7:39 am

Re: Gracia Epilogue - Could not restore container error

Post 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);
Lineage
Posts: 63
Joined: Thu Jan 31, 2008 7:39 am

Re: Gracia Epilogue - Could not restore container error

Post 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.
User avatar
JIV
L2j Veteran
L2j Veteran
Posts: 1882
Joined: Sun Jan 06, 2008 8:17 pm
Location: Slovakia
Contact:

Re: Gracia Epilogue - Could not restore container error

Post by JIV »

it still show that error after you check sql with that script?
Lineage
Posts: 63
Joined: Thu Jan 31, 2008 7:39 am

Re: Gracia Epilogue - Could not restore container error

Post 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.
Lineage
Posts: 63
Joined: Thu Jan 31, 2008 7:39 am

Re: Gracia Epilogue - Could not restore container error

Post 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);
User avatar
atecubanos
Posts: 36
Joined: Sun Jul 29, 2007 12:57 am
Contact:

Re: Gracia Epilogue - Could not restore container error

Post 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
Apocalipce
User avatar
JIV
L2j Veteran
L2j Veteran
Posts: 1882
Joined: Sun Jan 06, 2008 8:17 pm
Location: Slovakia
Contact:

Re: Gracia Epilogue - Could not restore container error

Post by JIV »

User avatar
atecubanos
Posts: 36
Joined: Sun Jul 29, 2007 12:57 am
Contact:

Re: Gracia Epilogue - Could not restore container error

Post 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
Apocalipce
User avatar
JIV
L2j Veteran
L2j Veteran
Posts: 1882
Joined: Sun Jan 06, 2008 8:17 pm
Location: Slovakia
Contact:

Re: Gracia Epilogue - Could not restore container error

Post by JIV »

and what was wrong with that clan?
User avatar
atecubanos
Posts: 36
Joined: Sun Jul 29, 2007 12:57 am
Contact:

Re: Gracia Epilogue - Could not restore container error

Post 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
Apocalipce
Post Reply