[Error]Start Login/GameServer

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
Locked
avatar7
Posts: 30
Joined: Fri Aug 07, 2009 11:10 pm

Error: Could not find or load main class com.l2jserver.login

Post by avatar7 »

If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision 5079:
L2JDP Revision 8541:

I have a serious problem which I can't figure out what's causing it. Until recently, I was able to compile new updates just fine and both login and game servers would start up just fine. After applying the last updates 2 days ago, I'm not longer able to start up either the login or game servers. I get this error in the command prompt console as soon as I run startLoginServer.bat:

Error: Could not find or load main class com.l2jserver.loginserver.L2LoginServer

Likewise for startGameServer.bat.

When I replace the new l2jserver.jar or l2jlogin.jar files with the previous builds, all runs fine, so it must be something to do with the way those files get built. What is puzzling is that the latest revisions compile just fine in Eclipse, even though the verison change log update throws the following message in the console window:

getChangelogDateVersion:
[exec] Result: 1
[exec] Result: 1

When I check the l2jdp-version.properties and l2j-version.properties files, they have this inside instead of the version numbers:

version=svn: The path '.' appears to be part of a Subversion 1.7 or greater
working copy. Please upgrade your Subversion client to use this
working copy.
builddate=13/11/2011 17:43

Apart from that, the project builds OK, no warnings, no errors. I've tried a complete uninstall (using microsoft install clean up utility and CCleaner) and reinstall of Java JDK, eclipse, subclipse, a fresh repository download, etc. etc., but it's of no use.

What could be the cause? Is it the verison change failing or is it something else I'm missing? And if it's the above thing, how can I fix it?

I really hope someone can help out, because I've ran out of options to try.
User avatar
MELERIX
L2j Veteran
L2j Veteran
Posts: 6667
Joined: Sat Sep 23, 2006 11:31 pm
Location: Chile
Contact:

Re: Error: Could not find or load main class com.l2jserver.l

Post by MELERIX »

first check the guides: viewtopic.php?f=2&t=10719

due may be you forgot to install something, or you are using outdated software.

other related issue is that probably you forgot to update your repositories to SVN 1.7.x

so, if you use Eclipse do a right click in your repository, then select Team --> Upgrade

NOTE: you need to do this in each repository you have.
avatar7
Posts: 30
Joined: Fri Aug 07, 2009 11:10 pm

Re: Error: Could not find or load main class com.l2jserver.l

Post by avatar7 »

I did everything right, I've done it so many times already, and I also rechecked everything step by step to make sure. I'm not missing any step and in fact, as I said, the project actually builds OK and produces the build folder, with all files in it, etc. The only different thing is that message about changelog and the missing version numbers in the file.

By running Team->Upgrade you mean the option available when you right click on a project, right? I tried that with L2J_DataPack_BETA and I get this error:

org.apache.subversion.javahl.ClientException: Invalid operation on the current working directory
svn: Can't upgrade 'E:\eclipse_new_workspace\L2J_DataPack_BETA' as it is not a pre-1.7 working copy directory
Can't find an entry
svn: Missing default entry

org.apache.subversion.javahl.ClientException: Invalid operation on the current working directory
svn: Can't upgrade 'E:\eclipse_new_workspace\L2J_DataPack_BETA' as it is not a pre-1.7 working copy directory
Can't find an entry
svn: Missing default entry

Likewise for L2J_Server_BETA.
I suppose it means it's already upgraded? If not, I don't really understand what it could mean.
avatar7
Posts: 30
Joined: Fri Aug 07, 2009 11:10 pm

Re: Error: Could not find or load main class com.l2jserver.l

Post by avatar7 »

I just Googled about the error which I get when I try to do Team->Upgrade and it's very likely it's already up to date. I suppose that's because I downloaded and reinstalled everything from scratch, so there is no need to update/upgrade anything. At least that's how it appears to be, but I don't really know, the whole thing doesn't make much sense.
avatar7
Posts: 30
Joined: Fri Aug 07, 2009 11:10 pm

Re: Error: Could not find or load main class com.l2jserver.l

Post by avatar7 »

I think I narrowed down the problem. Even though I've installed SlikSVN, the SVN Interface Client field in the preferences of Eclipse is blank and there's nothing available in the drop down menu that I can select. I'm not sure how to solve it though, I'll try uninstalling SlikSVN, cleaning the registry and installing it again and see what happens.
avatar7
Posts: 30
Joined: Fri Aug 07, 2009 11:10 pm

Re: Error: Could not find or load main class com.l2jserver.l

Post by avatar7 »

Cleaning up any remains of SilkSVN, including older registry entries, then reinstalling it and also installing only the required parts of Subclipse finally made the thing work!

I suppose something must've gone wrong when I updated to the latest version a few days ago.
L2Imprada
Posts: 42
Joined: Tue Nov 03, 2009 9:54 am

[Error]Start Login/GameServer

Post by L2Imprada »

If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision Number: Newest from svn
L2JDP Revision Number: Newest from svn
But l2j-version.properties gives:
#
version = svn: E155036: Working copy 'C:\Users\Myrdin\workspace\L2J_Server_BETA' is too old (format 10, created by Subversion 1.6)
builddate=28/01/2012 17:59

Dont really understand, what the problem is?
-----------------------------------------------------------------

So followed every step without errors, GS created etc. Java 7 installed, JDK + JRE.
Eclipse worked fine etc.
But when started loginserver i got:

Code: Select all

Starting L2J Login Server. Exception in thread "main" java.lang.UnsupportedClassVersionError: com/l2jserver/loginserver/L2LoginServer : Unsupported major.minor version 51.0        at java.lang.ClassLoader.defineClass1(Native Method)        at java.lang.ClassLoader.defineClass(Unknown Source)        at java.security.SecureClassLoader.defineClass(Unknown Source)        at java.net.URLClassLoader.defineClass(Unknown Source)        at java.net.URLClassLoader.access$000(Unknown Source)        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)        at java.lang.ClassLoader.loadClassInternal(Unknown Source)Could not find the main class: com.l2jserver.loginserver.L2LoginServer.  Program will exit. Server terminated abnormaly  server terminated Druk op een toets om door te gaan. . .
Already have been searching for it but couldn't find a solution, so my last chance is asking the big boys themselves 8).

Ty already
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: [Error]Start Login/GameServer

Post by jurchiks »

Is that a fresh checkout?

http://www.google.lv/search?sourceid=ch ... rking+copy
says smth about 'svn upgrade'. You can delete your project and check out again or run this command if you have SVN installed separately.
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.
User avatar
MELERIX
L2j Veteran
L2j Veteran
Posts: 6667
Joined: Sat Sep 23, 2006 11:31 pm
Location: Chile
Contact:

Re: [Error]Start Login/GameServer

Post by MELERIX »

L2Imprada
Posts: 42
Joined: Tue Nov 03, 2009 9:54 am

Re: [Error]Start Login/GameServer

Post by L2Imprada »

SlikSVN reinstalled (after clean), Computer restarted, deleted old project, now doing new checkout, and will build again from start.
Upgrade is impossible because starting from scratch.

Hope anything said above will help the problem. Thanks for moving btw MELERIX.
Will give feedback as soon as my builts and setups are ready.

up: This time got an error by checking out?

An internal error occurred during: "Validating L2J_DataPack_BETA".
Preference node "org.eclipse.wst.validation" has been removed.
L2Imprada
Posts: 42
Joined: Tue Nov 03, 2009 9:54 am

Re: [Error]Start Login/GameServer

Post by L2Imprada »

Still same error, didn't work for me.

up: maybe i've got the wrong subclipse version.. because when i try to update it, it crashes.
up: Reinstalled Eclipse, again with subclipse 1.8 but doesnt crash when i try to update -> says no updates available.
Going to checkout -> Build and we'll see
L2Imprada
Posts: 42
Joined: Tue Nov 03, 2009 9:54 am

Re: [Error]Start Login/GameServer

Post by L2Imprada »

up: Weird problem new problem now.
By running StartLoginServer.bat still the same error as above,
but smart as i am i just ran the l2jserver.jar -> looked into my logs and got this(Last line):

Code: Select all

2012.01.29 22:32:36,034 INFO    1   com.l2jserver.loginserver.L2LoginServer Login Server ready on *:2106 
Which means that it just works, but not by running the .bat, now i've installed everything with the exe files like gsregister, dbregister etc. but if i try to use the bats, none of them works as it should do..
Could there be any problem with my cmd? Or is it the .bat files which aren't equal to my setup or smth ?

My maps: Image
My login folder: Image
Loginserver.bat: Image

Hope you can help me fix it!
Anyway, the build doesn't give the error anymore like avatar7 got in his first post and l2jdp-version.properties give the revision instead of what was in my 1st post.

This whole thing is pretty confusing, so please help :)

up: After a lot research i guess my Java was 32 bit while eclipse etc. running 64 bit, but i had a old jre6 64 bit on my computer left, must be a clear declanation of the errors. Going to try now.
L2Imprada
Posts: 42
Joined: Tue Nov 03, 2009 9:54 am

Re: [Error]Start Login/GameServer

Post by L2Imprada »

Pff, sometimes is the solution so simple, but so far away you can't even be happy when you find it..

For people who have this same problem, stop searching all around the internet, but just check if eclipse,java,subversion all running on the same bit (Windows (32/64)).
Problem fixed, topic can be closed.
Ty for help, although this was a dumb fault of me.
makoo
Posts: 20
Joined: Fri Jan 26, 2007 12:45 pm

Could not find or load main class

Post by makoo »

L2J Server Version=4470
L2JDP Datapack Version=7733

error with everys batchs files : Could not find or load main class com.l2jserver.gameserver.GameServer

if I extract the com from the l2jlogin.jar and put it on libs I can open theses program :
L2JConfig.exe,RegisterGameServer.exe

If I remove the com directory from libs they do not start.

I have java installed :
1.7.0_02 acivated
1.6.0_30 disabled
1.6.0 disabled
MY SQL version : 5.0.27
makoo
Posts: 20
Joined: Fri Jan 26, 2007 12:45 pm

Re: Could not find or load main class

Post by makoo »

Can you help me please ?
Locked