RegisterGameServer.sh error

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
wtfmejt
Posts: 2
Joined: Sun Jun 28, 2009 3:05 pm

RegisterGameServer.sh error

Post 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
User avatar
JIV
L2j Veteran
L2j Veteran
Posts: 1882
Joined: Sun Jan 06, 2008 8:17 pm
Location: Slovakia
Contact:

Re: RegisterGameServer.sh error

Post 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
wtfmejt
Posts: 2
Joined: Sun Jun 28, 2009 3:05 pm

Re: RegisterGameServer.sh error

Post 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!
gio
Posts: 186
Joined: Fri Apr 13, 2007 1:40 am
Contact:

Re: RegisterGameServer.sh error

Post by gio »

Same problem here..
I always get this:
FATAL: Failed to load default translation.
---
L2J = Convert.ToL2J(L2off);
---
certa
Posts: 10
Joined: Mon Mar 15, 2010 5:38 am

Re: RegisterGameServer.sh error

Post 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
dav999
Posts: 3
Joined: Sat Mar 27, 2010 2:27 pm

Re: RegisterGameServer.sh error

Post 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
dav999
Posts: 3
Joined: Sat Mar 27, 2010 2:27 pm

Re: RegisterGameServer.sh error

Post 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;	}
certa
Posts: 10
Joined: Mon Mar 15, 2010 5:38 am

Re: RegisterGameServer.sh error

Post 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.
dav999
Posts: 3
Joined: Sat Mar 27, 2010 2:27 pm

Re: RegisterGameServer.sh error

Post 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.
User avatar
rocoder
Posts: 66
Joined: Thu Feb 04, 2010 8:52 am

Re: RegisterGameServer.sh error

Post 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!
Image
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: RegisterGameServer.sh error

Post 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.
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
User avatar
rocoder
Posts: 66
Joined: Thu Feb 04, 2010 8:52 am

Re: RegisterGameServer.sh error

Post 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
Image
Post Reply