Page 1 of 1

RegisterGameServer.sh error

Posted: Sun Nov 08, 2009 8:46 pm
by wtfmejt
Hello there iam trying to generate a hexid for my server and iam getting this error

Debian-50-lenny-64-LAMP:/brutality/login# sh RegisterGameServer.sh
FATAL: Failed to load default translation.

After alot of googleing and searching here I found no solution to my problem.

I traced the error to this file http://www.l2jserver.com/trac/browser/t ... ister.java

Apparently it does not get the Locale correctly from my system does anybody know a work around?

Thanks for your time guys

Re: RegisterGameServer.sh error

Posted: Sun Nov 08, 2009 8:50 pm
by JIV
its just random hex, just put same to hexid.txt and same in to DB.

or
use parameter --language <locale>
Sets the app to use the specified locale, overriding auto-detection

Re: RegisterGameServer.sh error

Posted: Sun Nov 08, 2009 8:54 pm
by wtfmejt
aaah okei thx I liked the idea with entering it directly into the db :) out of curiosity how can i run

java -Djava.util.logging.config.file=console.cfg -cp ./../libs/*:l2jserver.jar net.sf.l2j.gsregistering.GameServerRegister

and add the parameter to it?:) I tried various combinations but failed

thank you!

Re: RegisterGameServer.sh error

Posted: Sat Mar 06, 2010 9:42 pm
by gio
Same problem here..
I always get this:
FATAL: Failed to load default translation.

Re: RegisterGameServer.sh error

Posted: Sun Mar 28, 2010 11:29 am
by certa
im having this same problem with the .bat on win server 2k3 i also cannot get eclipse x64 to recognize i have java x64 installed

Re: RegisterGameServer.sh error

Posted: Sun Mar 28, 2010 8:14 pm
by dav999
Hey men, i've the same problem, registering the server i get the message:
FATAL: Failed to load default translation
The problem is in the file: BaseGameServerRegister, it seems to be a localization issue connected to an error to get the bundle, but i dont know how to solve it.
Modifing the code in this way:

Code: Select all

                 ResourceBundle bundle = null;		try		{   			if (locale == null)			{				locale = Locale.getDefault();				//locale=Locale.ENGLISH; [color=#FF0000]//force the locale value[/color]			}			//JOptionPane.showMessageDialog(null, locale.toString()); [color=#FF0000]//show me what u find[/color]			bundle = ResourceBundle.getBundle("gsregister.GSRegister", locale, LanguageControl.INSTANCE);		}		catch (Throwable t)		{			//System.out.println("FATAL: Failed to load default translation."); [color=#FF0000]//old code[/color]			System.out.println(""+t.toString()); [color=#FF0000]//my code[/color] 			System.exit(666);		} 
I get the text of the exception:

java.util.MissingResourceException: Can't find bundle for base name gsregister.GSRegister, locale it_IT

Can anyone help me/us?

Some info:
I'm a winxp user, i'm using eclipse 3.5.2 (with subclipse plugin), mysql 5.1, navicat e tortoise svn as in the guide.
I've tried to force "locale" variable to english (i'm Italian), but it doesn't work. q_Q

Re: RegisterGameServer.sh error

Posted: Sun Mar 28, 2010 8:35 pm
by dav999
I think the problem is in the method:

ResourceBundle.getBundle("gsregister.GSRegister", locale, LanguageControl.INSTANCE);

in the LanguageControl.INSTANCE part that u can find in the package com.l2jserver.i18n file LanguageControl.java :

here it is the code:

Code: Select all

 @Overridepublic ResourceBundle newBundle(String baseName, Locale locale, String format, ClassLoader loader, boolean reload) throws IllegalAccessException, InstantiationException, IOException	{		if (baseName == null || locale == null || format == null || loader == null)		{			throw new NullPointerException();		}		ResourceBundle bundle = null;		if (format.equals("java.properties"))		{			format = "properties";			String bundleName = toBundleName(baseName, locale);			String resourceName = LANGUAGES_DIRECTORY + toResourceName(bundleName, format);			InputStream stream = new FileInputStream(resourceName);			if (stream != null)			{				BufferedInputStream bis = new BufferedInputStream(stream);				try				{					bundle = new PropertyResourceBundle(bis);				}				finally				{					bis.close();				}			}		}		return bundle;	}

Re: RegisterGameServer.sh error

Posted: Sun Mar 28, 2010 10:29 pm
by certa
I think I found the problem http://www.youtube.com/watch?v=elT9dMoKbmM&NR=1 watch how he copys his data pack and server I did mine the way it said on this site, which was extremely confusing.

Re: RegisterGameServer.sh error

Posted: Mon Mar 29, 2010 1:26 am
by dav999
Ok, I solved it.
U need two things to do.

1- modify and make (ex. export the project in a jar file) the file LanguageControl.java (u can find it in the package com.l2jserver.i18n) changing the code line:

Code: Select all

public static final String LANGUAGES_DIRECTORY = "../languages/";
in

Code: Select all

public static final String LANGUAGES_DIRECTORY = "./languages/";
put the file "LanguageControl.class" u got into the "l2jserver.jar" overwriting the older one;

2- copy the folder "languages" (u can take it from l2jserver code svn) into ur loginserver folder;

NB: In the end, to be sure all works, u need a folder configuration like this:

unit:\many_folders\server_root_folder\l2_gameserver1(2,3,4...)
unit:\many_folders\server_root_folder\loginserver\languages
unit:\many_folders\server_root_folder\libs

Be sure the file "servername.xml" is in ur login folder.

Re: RegisterGameServer.sh error

Posted: Mon Mar 29, 2010 6:31 am
by rocoder
wtfmejt wrote:Hello there iam trying to generate a hexid for my server and iam getting this error

Debian-50-lenny-64-LAMP:/brutality/login# sh RegisterGameServer.sh
FATAL: Failed to load default translation.

After alot of googleing and searching here I found no solution to my problem.

I traced the error to this file http://www.l2jserver.com/trac/browser/t ... ister.java

Apparently it does not get the Locale correctly from my system does anybody know a work around?

Thanks for your time guys
dude generate you hexid in your pc...copy in gs/config after that open it copy hexid and paste it in db gameservers table
HF!

Re: RegisterGameServer.sh error

Posted: Mon Mar 29, 2010 6:34 am
by janiii
rocoder wrote:dude generate you hexid in your pc...copy in gs/config after that open it copy hexid and paste it in db gameservers table
HF!
did you even read what is his problem? pls do not spam forum with offtopic and flaming advices. dav999 already solved his problem. pls read whole topic before posting. thanks.

Re: RegisterGameServer.sh error

Posted: Mon Mar 29, 2010 2:42 pm
by rocoder
janiii wrote:
rocoder wrote:dude generate you hexid in your pc...copy in gs/config after that open it copy hexid and paste it in db gameservers table
HF!
did you even read what is his problem? pls do not spam forum with offtopic and flaming advices. dav999 already solved his problem. pls read whole topic before posting. thanks.
is not my fault because somebody write in a old topic... anyway I diden't spam