Latest stable doesn't work on Linux

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
Post Reply
abramsba
Posts: 14
Joined: Mon Aug 19, 2013 11:52 am

Latest stable doesn't work on Linux

Post by abramsba »

L2J Revision Number: 6166
L2JDP Revision Number: 9911

I know the rules are no forks but I haven't done anything to the code yet, I'm just trying to get a clean run going from the SVN repository.

I'm interested in creating my own fork to handle some custom stuff. Either way I've just downloaded the latest stable listed on the website and I'm running across errors. I've tested this with both the oracle jdk and the openjdk but I haven't had any different results.

The first issue I ran across was that some of the shell scripts were saved with windows line endings, which was causing them not work. This isn't a difficult problem to solve though, just resave the document with unix line endings.

Code: Select all

 bryan@bryan-desktop:~/l2j$ bash database_installer.sh: invalid signal specification: trap: 2database_installer.sh: line 38: $'\r': command not founddatabase_installer.sh: line 39: syntax error near unexpected token `$'{\r''database_installer.sh: line 39: `configure() { 
So that problem was solved, however I'm currently facing another problem which is preventing me from launching the server from a fresh SVN checkout:

Code: Select all

 NPC 35063 class not foundjava.lang.NullPointerException    at com.l2jserver.gameserver.instancemanager.ZoneManager.getAllZones(ZoneManager.java:432)    at com.l2jserver.gameserver.model.entity.Castle.getZone(Castle.java:435)    at com.l2jserver.gameserver.model.entity.Castle.checkIfInZone(Castle.java:428)    at com.l2jserver.gameserver.instancemanager.CastleManager.getCastleIndex(CastleManager.java:169)    at com.l2jserver.gameserver.instancemanager.CastleManager.getCastleIndex(CastleManager.java:160)    at com.l2jserver.gameserver.instancemanager.CastleManager.findNearestCastleIndex(CastleManager.java:68)    at com.l2jserver.gameserver.instancemanager.CastleManager.findNearestCastleIndex(CastleManager.java:63)    at com.l2jserver.gameserver.model.actor.L2Npc.getCastle(L2Npc.java:839)    at com.l2jserver.gameserver.model.actor.instance.L2ArtefactInstance.onSpawn(L2ArtefactInstance.java:55)    at com.l2jserver.gameserver.model.L2Object.spawnMe(L2Object.java:564)    at com.l2jserver.gameserver.model.L2Spawn.initializeNpcInstance(L2Spawn.java:577)    at com.l2jserver.gameserver.model.L2Spawn.doSpawn(L2Spawn.java:484)    at com.l2jserver.gameserver.model.L2Spawn.doSpawn(L2Spawn.java:425)    at com.l2jserver.gameserver.model.L2Spawn.init(L2Spawn.java:382)    at com.l2jserver.gameserver.datatables.SpawnTable.fillSpawnTable(SpawnTable.java:122)    at com.l2jserver.gameserver.datatables.SpawnTable.load(SpawnTable.java:66)    at com.l2jserver.gameserver.datatables.SpawnTable.<init>(SpawnTable.java:56)    at com.l2jserver.gameserver.datatables.SpawnTable$SingletonHolder.<clinit>(SpawnTable.java:304)    at com.l2jserver.gameserver.datatables.SpawnTable.getInstance(SpawnTable.java:299)    at com.l2jserver.gameserver.model.entity.Fort.initNpcs(Fort.java:1229)    at com.l2jserver.gameserver.model.entity.Fort.<init>(Fort.java:273)    at com.l2jserver.gameserver.instancemanager.FortManager.loadInstances(FortManager.java:176)    at com.l2jserver.gameserver.GameServer.<init>(GameServer.java:269)    at com.l2jserver.gameserver.GameServer.main(GameServer.java:470) 
This loops on forever and ever. The first thing I tried to do was just to skip the NPC's in L2Spawn.java by incrementing the counter:

Code: Select all

 //com.l2jserver.gameserver.model.L2Spawn//line 449, doSpawn()catch (Exception e){    _log.log(Level.WARNING, "NPC " + _template.getNpcId() + " class not found", e);}// my addition to keep the counter counting_currentCount++;return mob; 
The program loops now but reports other classes as not found, all of these classes come from an NPC type of "holything." The program reports all "holything"s are missing and later the program comes to a halt when trying to initialize the 4s thing.

The code works fine for me on windows, does anybody know of a known compatibility problem or was this something that wasn't tested properly before being called stabled?
abramsba
Posts: 14
Joined: Mon Aug 19, 2013 11:52 am

Re: Latest stable doesn't work on Linux

Post by abramsba »

The issue with the missing NPC class I solved by removing the spawns in the l2jgs table spawnlist:

Code: Select all

 DELETE FROM spawnlist WHERE location LIKE "%Artefact%"; 
Now I'm facing an issue during initialization, multiple ones actually.
The 4s manager didn't work, so I commented that out.

Code: Select all

//FourSepulchersManager.getInstance().init();
The next crash came from

Code: Select all

//TerritoryWarManager.getInstance();
And even with these out of the way I just keep getting into trouble further down the run:

Code: Select all

 --------------------------------------------------------------------=[ Cache ]Cache[HTML]: Running lazy cacheOlympiad System: Olympiad Game StartedCache[Crest]: 0.000MB on 0 files loaded. (Forget Time: 300s , Capacity: 50)Exception in thread "GeneralSTPool-9" java.lang.ExceptionInInitializerError    at com.l2jserver.gameserver.model.olympiad.OlympiadGameManager.getInstance(OlympiadGameManager.java:60)    at com.l2jserver.gameserver.model.olympiad.Olympiad$1.run(Olympiad.java:489)    at com.l2jserver.gameserver.ThreadPoolManager$RunnableWrapper.run(ThreadPoolManager.java:93)    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)    at java.util.concurrent.FutureTask.run(FutureTask.java:166)    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)    at java.lang.Thread.run(Thread.java:724)Caused by: java.lang.NullPointerException    at com.l2jserver.gameserver.instancemanager.ZoneManager.getAllZones(ZoneManager.java:432)    at com.l2jserver.gameserver.model.olympiad.OlympiadGameManager.<init>(OlympiadGameManager.java:42)    at com.l2jserver.gameserver.model.olympiad.OlympiadGameManager$SingletonHolder.<clinit>(OlympiadGameManager.java:211)    ... 11 moreTeleportLocationTable: Loaded 950 Teleport Location Templates. 
and the show stopper:

Code: Select all

 AirShipManager: Loaded 0 private airshipsException in thread "main" java.lang.NullPointerException    at com.l2jserver.gameserver.instancemanager.ZoneManager.getAllZones(ZoneManager.java:432)    at com.l2jserver.gameserver.model.entity.Castle.getZone(Castle.java:435)    at com.l2jserver.gameserver.model.entity.Castle.checkIfInZone(Castle.java:428)    at com.l2jserver.gameserver.instancemanager.CastleManager.getCastleIndex(CastleManager.java:169)    at com.l2jserver.gameserver.instancemanager.CastleManager.getCastleIndex(CastleManager.java:160)    at com.l2jserver.gameserver.model.actor.instance.L2DoorInstance.getCastle(L2DoorInstance.java:339)    at com.l2jserver.gameserver.model.entity.Castle.loadDoor(Castle.java:828)    at com.l2jserver.gameserver.model.entity.Castle.activateInstance(Castle.java:820)    at com.l2jserver.gameserver.instancemanager.CastleManager.activateInstances(CastleManager.java:312)    at com.l2jserver.gameserver.GameServer.<init>(GameServer.java:311)    at com.l2jserver.gameserver.GameServer.main(GameServer.java:470) 
abramsba
Posts: 14
Joined: Mon Aug 19, 2013 11:52 am

Re: Latest stable doesn't work on Linux

Post by abramsba »

I found the issue, it was also reoccuring for me in windows.

I was relying on the datapackroot value in the configuration file so I could keep the two seperate.

I noticed in a few places you're just checking the relative directory paths for certain items.

Code: Select all

 @Overridepublic void load(){    _pets.clear();    // Added Config.DATAPACK_ROOT    parseDirectory(Config.DATAPACK_ROOT + "data/stats/pets/");    _log.info(getClass().getSimpleName() + ": Loaded " + _pets.size() + " Pets.");} 
User avatar
HyperByter
Posts: 28
Joined: Tue Jun 04, 2013 1:26 am
Contact:

Re: Latest stable doesn't work on Linux

Post by HyperByter »

If you are that awesome to make your own "fork" server, why dont you simply fix the issues and continue running your project without logging your progress here..

but since you have downloaded latest beta versions, they might have some issues because there is a lot of rework in progress atm. so dont get confused about it too much, and if there is any error , try solving it yourself to improve your fork skills lol.
abramsba
Posts: 14
Joined: Mon Aug 19, 2013 11:52 am

Re: Latest stable doesn't work on Linux

Post by abramsba »

HyperByter wrote:If you are that awesome to make your own "fork" server, why dont you simply fix the issues and continue running your project without logging your progress here..
Logging my progress? I'm reporting where I'm having difficulties running the code from the stable repository, as I mentioned in my post.
HyperByter wrote:but since you have downloaded latest beta versions, they might have some issues because there is a lot of rework in progress atm. so dont get confused about it too much, and if there is any error , try solving it yourself to improve your fork skills lol.
What the hell is wrong with you?

"Open Source Projects reflect the spirit of collaboration and fun while learning new abilities and gathering community feedback and providing good support for further development."

When a repository is called stable it usually means it works and has been tested. Shell scripts with windows line endings and some directories read from a configuration supplied directory sometimes and others not is not stable. Also, it's not unheard of that a fork can also contribute code back to the project from which it was forked.

Also you've got quite an aggressive attitude for somebody who seems to struggle with basic object oriented topics of java:
viewtopic.php?p=166160#p166160
Illegal modifier for the class CastleBattleLoop; only public, abstract & final are permitted
But I wouldn't be worried about my forking skills though as you should be about your shitty web development skills:
Image
https://sites.google.com/site/l2darkcastles/home ( International )

viewtopic.php?f=69&t=28195

This thread can be closed since the issue has been solved and the code contributed.
Last edited by abramsba on Wed Aug 21, 2013 9:35 am, edited 1 time in total.
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Latest stable doesn't work on Linux

Post by jurchiks »

Keep calm and fix problems.
Unfortunately for you, L2J stable does not mean it's perfectly stable, just that people using those revisions have reported the least problems. Most people probably don't put datapack separately from the core so it would be no wonder if that was missed, though the fix really should be put inside the parseDocument method, not inside each call.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
abramsba
Posts: 14
Joined: Mon Aug 19, 2013 11:52 am

Re: Latest stable doesn't work on Linux

Post by abramsba »

jurchiks wrote:Keep calm and fix problems.
Unfortunately for you, L2J stable does not mean it's perfectly stable, just that people using those revisions have reported the least problems. Most people probably don't put datapack separately from the core so it would be no wonder if that was missed, though the fix really should be put inside the parseDocument method, not inside each call.
I'll check it out, I'll keep posting the updates on the contribution thread instead.
Post Reply