The Source for Java Technology Collaboration

Home » java.net Forums » GlassFish » GlassFish

Thread: glassfish v2 problems on Turkish locale

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 7 - Last Post: May 22, 2008 12:45 AM by: bilgehan
bilgehan

Posts: 29
glassfish v2 problems on Turkish locale
Posted: Nov 15, 2007 4:55 AM
  Click to reply to this thread Reply

Hi,
I've installed glassfish v2 on windows XP with Turkish locale. Installation was smooth except and i was able to start domain1 without any problems. Start page on port 8080 says Your server is up and running but when i want to access to admin page (on port 4848), i get the following error after login screen. Any application that netbeans tries to deploy on glassfish also fails.


type Exception report
message
descriptionThe server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: java.lang.reflect.InvocationTargetException while attempting to process a 'beforeCreate' event for 'sun_page1'.
root cause
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException while attempting to process a 'beforeCreate' event for 'sun_page1'.
root cause
java.lang.reflect.InvocationTargetException
root cause
java.lang.reflect.UndeclaredThrowableException
root cause
javax.management.AttributeNotFoundException: AdminSessionTimeoutInMinutes


This problem can be resolved by modifying launcher.xml and processlauncher.xml files under glassfish lib folder. You have to add <sysproperty key="user.language" value="tr-TR" /> keys for each process in processlauncher.xml and for each target in launcher.xml.

I think this problem should be added to release notes. Most probable reason for this error is conversion of I to i. In Turkish, lowercase for I is ı and uppercase for i is İ.

As usual, write once run everywhere except Turkey.

Bilgehan

km

Posts: 681
Re: glassfish v2 problems on Turkish locale
Posted: Nov 15, 2007 10:47 AM   in response to: bilgehan
  Click to reply to this thread Reply

Thanks for the tip, but I don't understand why you have to use this private file named processlauncher.xml.

Can you do your experiment by adding the property as: <jvm-options> element in
domain.xml?

Please let me know if possible.

Thanks,
Kedar

bilgehan

Posts: 29
Re: glassfish v2 problems on Turkish locale
Posted: Nov 17, 2007 1:15 PM   in response to: km
  Click to reply to this thread Reply

I was actually searching for a configuration file in lib folder to set jvm options and found these two files. I didn't know the domain.xml file.

Modifying domain.xml file and adding -Duser.language=tr-TR as a jvm-option solves the problem.

Thanks
Bilgehan

vbkraemer

Posts: 280
Re: glassfish v2 problems on Turkish locale
Posted: Feb 14, 2008 10:24 AM   in response to: bilgehan
  Click to reply to this thread Reply

I want to double check something....

In https://glassfish.dev.java.net/issues/show_bug.cgi?id=3851, an engineer is saying that they run into trouble when they run the server with user.language=tr.

In this thread it looks like you are saying that setting the user.language=tr will resolve the problem?

I am confused... It looks like you are saying that setting the user.language to match the default language resolves this... It seems like setting user.language=en or user.language=en-US would be the work-around...

thanks,
vbk

bilgehan

Posts: 29
Re: glassfish v2 problems on Turkish locale
Posted: Feb 15, 2008 7:04 AM   in response to: vbkraemer
  Click to reply to this thread Reply

Hi, i tested on Windows XP with regional settings set to Turkish and Mac OS X 10.4.11 with International settings set to Turkish. After default install, the default page at port 8080 says Your Application Server is now running although there are errors on server.log generated during starting of server. When i try to login into administrator, i get an error after submitting username and password. After modifying the domain.xml and adding -Duser.language=tr-TR, no errors are generated during startup and i can successfully log into administrator. I attached two log files. server_defaultconfig_adminlogin.log is the server log after default installation / startup and trying login to administrator. server_modifiedconfig.log is the server log after modifying the domain.xml and restarting server. There are no errors on the modified configuration.

I think this error is related to letter i and I. I also tested with -Duser.language=en-US option and it solves the problem also.

If the regional settings are set to English, there is no need to modify domain.xml but if the regional settings are set to Turkish, adding -Duser.language=tr-TR or -Duser.language=en-US is needed. In the first case (OS regional settings set to English) i added -Duser.language=tr-TR and didn't get any errors.

Thanks
Bilgehan

vbkraemer

Posts: 280
Re: glassfish v2 problems on Turkish locale
Posted: Feb 15, 2008 8:24 AM   in response to: bilgehan
  Click to reply to this thread Reply

Thanks for providing a detailed response on this.

This is useful stuff, that would have taken a long time to duplicate independently...

vbk

bilgehan

Posts: 29
Re: glassfish v2 problems on Turkish locale
Posted: May 21, 2008 5:18 AM   in response to: vbkraemer
  Click to reply to this thread Reply

> I want to double check something....
>
> In
> https://glassfish.dev.java.net/issues/show_bug.cgi?id=
> 3851, an engineer is saying that they run into
> trouble when they run the server with
> user.language=tr.
>
> In this thread it looks like you are saying that
> setting the user.language=tr will resolve the
> problem?
>
> I am confused... It looks like you are saying that
> setting the user.language to match the default
> language resolves this... It seems like setting
> user.language=en or user.language=en-US would be the
> work-around...
>
> thanks,
> vbk

I noticed something. If i use -Duser.language=tr instead of -Duser.language=tr-TR or -Duser.language=tr_TR, i get an error as in the bug report (3851). I am having similar problems with another java application servers. I have to use tr_TR or tr-TR.

I think adding jvm option -Duser.language=tr is no different than no option on a machine with Turkish locale since the default language is already tr. What is the difference between tr and tr_TR?

Message was edited by: bilgehan

Message was edited by: bilgehan

bilgehan

Posts: 29
Re: glassfish v2 problems on Turkish locale
Posted: May 22, 2008 12:45 AM   in response to: bilgehan
  Click to reply to this thread Reply

I think i understood what is going on here. I was thinking tr_TR or tr-TR as an language option was fixing the startup problem. Actually tr_TR or tr-TR has no meaning as a language option and i think java opts to default en language if it encounters an unknown language option. I tested with meaningless language options such as:

-Duser.language=loremipsum
-Duser.language=qwerty
-Duser.language=asdfg

With all these options, glassfish starts without any problem but if i say -Duser.language=tr, than it fails to start. The reason was explained in the bug report ( https://glassfish.dev.java.net/issues/show_bug.cgi?id=3851 ).




 XML java.net RSS