Spidey* Posted May 9, 2015 Posted May 9, 2015 (edited) Hello everybody ! After every server restart clans can't be restored. The error is : Error while restoring clan : java.lang.NullPointerException (This error is repeated for every clan) the next line is : Restored 8 clans from database clan exists in clan_data but is like there is not! It comes from net.sf.l2j.gameserver.model.L2Clan.java and the file is 100% unmodified! I am sure I was using this pack in the past without problems. Now I just re-compiled the source! I was thinking if it's the problem comes from jdk version but I tried to run the server and compile the source with jdk6 , jdk7 and jdk8 Any idea? thank you in advance Edited May 9, 2015 by Spidey*
0 SweeTs Posted May 9, 2015 Posted May 9, 2015 Check log folder for detailed info about the npe. Then check that file and provide the line. And whats the pack.
0 Spidey* Posted May 9, 2015 Author Posted May 9, 2015 the error is not saved in the error log. just another one coming from clans java.lang.NullPointerException at net.sf.l2j.gameserver.model.L2Clan.setLevel(L2Clan.java:805) at net.sf.l2j.gameserver.model.L2Clan.changeLevel(L2Clan.java:2385) at net.sf.l2j.gameserver.model.L2Clan.levelUpClan(L2Clan.java:2359) at net.sf.l2j.gameserver.model.actor.instance.L2VillageMasterInstance.onBypassFeedback(L2VillageMasterInstance.java:155) at net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer.runImpl(RequestBypassToServer.java:350) at net.sf.l2j.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:82) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) 7 Ìáú 2015 2:52:25 ìì net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer runImpl pack is old based in L2jteon as far I remember
0 Spidey* Posted May 9, 2015 Author Posted May 9, 2015 public void setLevel(int level) { _level = level; if(_forum == null) { if(_level >= 2) { _forum = ForumsBBSManager.getInstance().getForumByName("ClanRoot").getChildByName(_name); if(_forum == null) // Line 806 { _forum = ForumsBBSManager.getInstance().createNewForum(_name,ForumsBBSManager.getInstance().getForumByName("ClanRoot"),Forum.CLAN,Forum.CLANMEMBERONLY,getClanId()); } } } } I see it's ok ( I never modified this file , and it was working fine)
0 Spidey* Posted May 9, 2015 Author Posted May 9, 2015 sorry for double post . I tried //pledge setlevel 1 and it works fine //pledge setlevel 2-5 is not! java.lang.NullPointerException at net.sf.l2j.gameserver.model.L2Clan.setLevel(L2Clan.java:805) at net.sf.l2j.gameserver.model.L2Clan.changeLevel(L2Clan.java:2385) at net.sf.l2j.gameserver.handler.admincommandhandlers.AdminPledge.useAd minCommand(AdminPledge.java:120) at net.sf.l2j.gameserver.network.clientpackets.SendBypassBuildCmd.runIm pl(SendBypassBuildCmd.java:68) at net.sf.l2j.gameserver.network.clientpackets.L2GameClientPacket.run(L 2GameClientPacket.java:82) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
0 SweeTs Posted May 9, 2015 Posted May 9, 2015 (edited) Put this if(_forum == null) // Line 806 { _forum = ForumsBBSManager.getInstance().createNewForum(_name,ForumsBBSManager.getInstance().getForumByName("ClanRoot"),Forum.CLAN,Forum.CLANMEMBERONLY,getClanId()); } Under if (_forum != null) if (_forum != null) { if(_forum == null) // Line 806 { _forum = ForumsBBSManager.getInstance().createNewForum(_name,ForumsBBSManager.getInstance().getForumByName("ClanRoot"),Forum.CLAN,Forum.CLANMEMBERONLY,getClanId()); } } Or simply use (fix errors if any) this one public void setLevel(int level) { _level = level; if (_level >= 2 && _forum == null) { final Forum forum = ForumsBBSManager.getInstance().getForumByName("ClanRoot"); if (forum != null) { _forum = forum.getChildByName(_name); if (_forum == null) _forum = ForumsBBSManager.getInstance().createNewForum(_name, ForumsBBSManager.getInstance().getForumByName("ClanRoot"), Forum.CLAN, Forum.CLANMEMBERONLY, _clanId); } } } Edited May 9, 2015 by SweeTs
0 Spidey* Posted May 9, 2015 Author Posted May 9, 2015 I just removed the whole if , I think it's useless and it's ok! thank you for your help
Question
Spidey*
Hello everybody !
After every server restart clans can't be restored.
The error is :
(This error is repeated for every clan)
the next line is :
clan exists in clan_data but is like there is not!
It comes from net.sf.l2j.gameserver.model.L2Clan.java and the file is 100% unmodified!
I am sure I was using this pack in the past without problems. Now I just re-compiled the source!
I was thinking if it's the problem comes from jdk version but I tried to run the server and compile the source with jdk6 , jdk7 and jdk8
Any idea? thank you in advance
Edited by Spidey*8 answers to this question
Recommended Posts