Page 1 of 2

Multiple errors...

Posted: Wed Nov 17, 2010 1:00 pm
by pokiokio
If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision 4417
L2JDP Revision 7666

Okay...I just downloaded the latest freya rev, I modded the core, nothing outside gameserver. I compiled, made a new folder and unzipped everything. I installed the DB, fixed the configs, ran the server and it gave me that error:

Code: Select all

Starting L2J Game Server. Exception in thread "main" java.lang.NoClassDefFoundError: com/l2jserver/gameserver/GameServerCaused by: java.lang.ClassNotFoundException: com.l2jserver.gameserver.GameServer         at java.net.URLClassLoader$1.run(Unknown Source)        at java.security.AccessController.doPrivileged(Native Method)        at java.net.URLClassLoader.findClass(Unknown Source)        at java.lang.ClassLoader.loadClass(Unknown Source)        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)        at java.lang.ClassLoader.loadClass(Unknown Source)Caused by: java.io.IOException: invalid header field        at java.util.jar.Attributes.read(Unknown Source)        at java.util.jar.Manifest.read(Unknown Source)        at java.util.jar.Manifest.<init>(Unknown Source)        at java.util.jar.JarFile.getManifestFromReference(Unknown Source)        at java.util.jar.JarFile.getManifest(Unknown Source)        at sun.misc.URLClassPath$JarLoader$2.getManifest(Unknown Source)        at java.net.URLClassLoader.defineClass(Unknown Source)        at java.net.URLClassLoader.access$000(Unknown Source)        ... 6 moreCould not find the main class: com.l2jserver.gameserver.GameServer.  Program will exit. Server terminated abnormaly
I compiled a new fresh core, deleted old zips and it gave me the same error so, it's not my fault.

I have TONS of old server revs and every single one of them works perfectly. I also have tried the first Freya rev via the nightly releases when it first came out and it worked ok.

Please help.

P.S: I have searched but no solution...

Re: Multiple errors...

Posted: Wed Nov 17, 2010 1:46 pm
by janiii
no, it is not our fault, you are doing something wrong. check wrong path to l2jserver.jar in you startup script.

Re: Multiple errors...

Posted: Wed Nov 17, 2010 1:57 pm
by pokiokio
janiii wrote:no, it is not our fault, you are doing something wrong. check wrong path to l2jserver.jar in you startup script.

Code: Select all

./../libs/*;l2jserver.jar com.l2jserver.gameserver.GameServer
That?

EDIT: To me it looks like it wants me to put the jar in the libs folder, so I did, and I replaced the one on the GS folder, same thing...

Re: Multiple errors...

Posted: Wed Nov 17, 2010 2:14 pm
by kotk
pokiokio wrote:

Code: Select all

./../libs/*;l2jserver.jar com.l2jserver.gameserver.GameServer
You sure that is a ;? Should be a :

Re: Multiple errors...

Posted: Wed Nov 17, 2010 2:16 pm
by pokiokio
kotk wrote: You sure that is a ;? Should be a :
I tried it and the error is shorter O.o

Code: Select all

Starting L2J Game Server. Exception in thread "main" java.lang.NoClassDefFoundError: com/l2jserver/gameserver/GameServerCaused by: java.lang.ClassNotFoundException: com.l2jserver.gameserver.GameServer         at java.net.URLClassLoader$1.run(Unknown Source)        at java.security.AccessController.doPrivileged(Native Method)        at java.net.URLClassLoader.findClass(Unknown Source)        at java.lang.ClassLoader.loadClass(Unknown Source)        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)        at java.lang.ClassLoader.loadClass(Unknown Source)Could not find the main class: com.l2jserver.gameserver.GameServer.  Program will exit. Server terminated abnormaly  server terminated

Re: Multiple errors...

Posted: Wed Nov 17, 2010 2:20 pm
by kotk
And you put the l2jserver.jar back in the gameserver directory?

Re: Multiple errors...

Posted: Wed Nov 17, 2010 2:22 pm
by pokiokio
kotk wrote:And you put the l2jserver.jar back in the gameserver directory?
Of course I did.

Re: Multiple errors...

Posted: Wed Nov 17, 2010 2:28 pm
by kotk
Can you post your GameServer_loop.sh?

Re: Multiple errors...

Posted: Wed Nov 17, 2010 2:46 pm
by pokiokio
kotk wrote:Can you post your GameServer_loop.sh?
I'm not using Linux but...here you go.

Code: Select all

#!/bin/bash # exit codes of GameServer:#  0 normal shutdown#  2 reboot attempt while :; do    [ -f log/java0.log.0 ] && mv log/java0.log.0 "log/`date +%Y-%m-%d_%H-%M-%S`_java.log"    [ -f log/stdout.log ] && mv log/stdout.log "log/`date +%Y-%m-%d_%H-%M-%S`_stdout.log"    java -Djava.util.logging.manager=com.l2jserver.util.L2LogManager -Xms1024m -Xmx1024m -cp ./../libs/*:l2jserver.jar com.l2jserver.gameserver.GameServer > log/stdout.log 2>&1    [ $? -ne 2 ] && break#   /etc/init.d/mysql restart    sleep 10done 
the .bat:

Code: Select all

@echo offtitle Game Server Console:startecho Starting L2J Game Server.echo.REM -------------------------------------REM Default parameters for a basic server.java -Djava.util.logging.manager=com.l2jserver.util.L2LogManager -Xms1024m -Xmx1024m -cp ./../libs/*;l2jserver.jar com.l2jserver.gameserver.GameServerREMREM If you have a big server and lots of memory, you could experiment for example withREM java -server -Xmx1536m -Xms1024m -Xmn512m -XX:PermSize=256m -XX:SurvivorRatio=8 -Xnoclassgc -XX:+AggressiveOptsREM If you are having troubles on server shutdown (saving data),REM add this to startup paramethers: -Djava.util.logging.manager=com.l2jserver.L2LogManager. Example:REM java -Djava.util.logging.manager=com.l2jserver.util.L2LogManager -Xmx1024m -cp ./../libs/*;l2jserver.jar com.l2jserver.gameserver.GameServerREM -------------------------------------if ERRORLEVEL 2 goto restartif ERRORLEVEL 1 goto errorgoto end:restartecho.echo Admin Restart ...echo.goto start:errorecho.echo Server terminated abnormalyecho.:endecho.echo server terminatedecho.pause 
EDIT: I tried the l2jserver.jar of the nightly build and it ran ok but I don't get why mine and even the clean compiled core won't work...

Re: Multiple errors...

Posted: Wed Nov 17, 2010 5:30 pm
by kotk
Sorry, in Linux mode right now. Glad you tracked it down to your Build.

Re: Multiple errors...

Posted: Wed Nov 17, 2010 5:39 pm
by _DS_
Wrong current directory.

Re: Multiple errors...

Posted: Wed Nov 17, 2010 6:10 pm
by pokiokio
_DS_ wrote:Wrong current directory.
What do you mean?

Re: Multiple errors...

Posted: Wed Nov 17, 2010 8:38 pm
by _DS_
You need to change directory to the l2jserver's (where jar reside) because scripts use relative paths.

Re: Multiple errors...

Posted: Thu Nov 18, 2010 3:48 am
by tukune
startGameServer.bat

Code: Select all

  @echo off+ cd /d %~dp0  title Game Server Console  :start  echo Starting L2J Game Server.
try it

Re: Multiple errors...

Posted: Thu Nov 18, 2010 12:17 pm
by pokiokio
tukune wrote:startGameServer.bat

Code: Select all

  @echo off+ cd /d %~dp0  title Game Server Console  :start  echo Starting L2J Game Server.
try it
Tried it, still same.