Jump to content
  • 0

Trouble Enabling Community Board On L2J High Five


Question

Posted (edited)

Hello,

 

I'm new to the L2J community but I've managed to get a high five server up and running.

My only problem is that the community board doesn't seem to be working, neither through pressing ALT+B or accessing it from the system menu.

The entire window doesn't show up.

 

The only feedback it gives me is this error:

Client: [Character: Afterburn[268482041] - Account: afterburn - IP: 127.0.0.1] - Failed running: [C] 5E RequestShowBoard ; null
java.lang.NullPointerException
        at handlers.communityboard.HomeBoard.parseCommunityBoardCommand(HomeBoard.java:62)
        at com.l2jserver.gameserver.handler.CommunityBoardHandler.handleParseCommand(CommunityBoardHandler.java:123)
        at com.l2jserver.gameserver.network.clientpackets.RequestShowBoard.runImpl(RequestShowBoard.java:44)
        at com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:69)
        at com.l2jserver.gameserver.network.L2GameClient.run(L2GameClient.java:1133)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

So naturally I looked at line 62 in HomeBoard.java which is this line of code:

html = html.replaceAll("%fav_count%", String.valueOf(getFavoriteCount(activeChar)));

I was hoping to get some help because I've been googling for about 2 days now without any results.

 

Thanks in advance.

 

Edit:

So since it's a null pointer exception I tried looking at the next file in the stack trace (CommunityBoardHandler.java) but I couldn't find it anywhere, so I'm guessing that I'm missing some files.

Anyone know where to get em?

Edited by Afterburn

6 answers to this question

Recommended Posts

  • 0
Posted (edited)

I was using some shifty server and data pack from a YouTube video, so to get the server working at all was a small miracle to me.

I'm now using different ones which are more mainstream you could say, and got the community board to work properly.

So problem solved. (sorta)

 

Thanks for the help though.

Edited by Afterburn
  • 0
Posted

check at the other files too:

CommunityBoardHandler.java:123

)(RequestShowBoard.java:44)

(L2GameClientPacket.java:69

)L2GameClient.java:1133

)ThreadPoolExecutor.java:1142)

ThreadPoolExecutor.java:617)

  • 0
Posted (edited)

Either activeChar is null or getFavoriteCount doesn't handle the null exception correctly.

 

First log activeChar.getName(). If you got a NPE here, don't search deeper, it's that. If not, it's getFavoriteCount content. I guess it returns an int, so return 0 for whatever null missing check - probably a potential .get( part, like there is no data for that activeChar, and as you .get on nothing, you got a NPE while you should check first if .get( == null.

 

I'm lazy to seek the method, those are only guesses.

Edited by Tryskell
Guest
This topic is now closed to further replies.


×
×
  • Create New...