admin@glassfish.java.net

Re: multibyte characters in instance names

From: Anissa Lam <anissa.lam_at_oracle.com>
Date: Thu, 27 Jan 2011 16:33:25 -0800

I believe there is problem in 'admin' besides the REST layer. Here is
what i see.
In GUI, I can create and list out standalone instances with multi byte
char. See attached image.
However, if you look at domain.xml, the name is incorrect. It has "??"
instead. In v2, I can see that the multi-byte char is written out
correctly.
v2: <server config-ref="玻璃鱼-config" lb-weight="100" name="玻璃鱼"
node-agent-ref="AAA">

v3: <server name="??" node-ref="localhost-domain1"
config-ref="??-config"></server>

The name is fine as long as you don't stop the server after creating
this instance. I guess it is still in memory ok.

But once you stop the server, I cannot even bring up console.
Caused by: java.util.regex.PatternSyntaxException: Dangling meta
character '?' near index 0
??-config
^
         at java.util.regex.Pattern.error(Pattern.java:1713)
         at java.util.regex.Pattern.sequence(Pattern.java:1878)
         at java.util.regex.Pattern.expr(Pattern.java:1752)
         at java.util.regex.Pattern.compile(Pattern.java:1460)
         at java.util.regex.Pattern.<init>(Pattern.java:1133)
         at java.util.regex.Pattern.compile(Pattern.java:823)
         at java.util.regex.Pattern.matches(Pattern.java:928)
         at java.lang.String.matches(String.java:2090)
         at
com.sun.jsftemplating.el.PermissionChecker.hasPermission(PermissionChecker.java:553)
         at
com.sun.jsftemplating.layout.descriptors.handler.Handler.hasPermission(Handler.java:506)
         at
com.sun.jsftemplating.layout.descriptors.handler.Handler.invoke(Handler.java:430)
         at
com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:420)

So, I think the first step is able to persist this mb char in domain.xml.
I am afraid I will have to touch a lot of pages in GUI, since name
usually is in the endpoint, and needs to be encoded.

Should i file a separate bug against admin for domain.xml persistence ?
This sounds like a blocker issue to me.

ps. I have trouble sending email to admin_at_glassfish.java.net alias.
Every email i sent to the alias is bounced back. Thats why i
specifically 'cc' each of you. Sorry for the duplicate.

thanks
Anissa.


On 1/27/11 2:18 PM, Tom Mueller wrote:
> Created issue 15719.
> http://java.net/jira/browse/GLASSFISH-15719
>
> On 1/27/2011 3:03 PM, Ludovic Champenois wrote:
>> On 1/27/11 12:52 PM, Tom Mueller wrote:
>>> Thanks Anissa for checking on this. So these are bugs then.
>>> Does the REST team want yet another bug filed for the
>>> IllegalArgumentException or should I just tack this on to issue 15705?
>>>
>> yep, and the log file if any
>> Ludo
>>> Thanks.
>>> Tom
>>>
>>> On 1/27/2011 2:14 PM, Anissa Lam wrote:
>>>>
>>>> I just checked, we do support multibyte char in v2. See attached.
>>>>
>>>> Anissa.
>>>>
>>>> On 1/27/11 12:01 PM, Tom Mueller wrote:
>>>>> Today, issue 15706 was filed because of an English error message
>>>>> being generated when multibyte character is used in an instance name.
>>>>> http://java.net/jira/browse/GLASSFISH-15706
>>>>>
>>>>> While looking into this, I was wondering why such an instance name
>>>>> was even allowed since instance names are only supposed to contain
>>>>> letters, numbers and some special characters. As it turns out, the
>>>>> regular expression that is used for validating the name uses "\p{L}"
>>>>> for letters, which means any Unicode character that is a letter, not
>>>>> just ASCII letters. In my test, I was able to create an instance with
>>>>> a multibyte character, but then I couldn't start it or delete it from
>>>>> the console because I get an IllegalArgumentException from the REST
>>>>> interface (see the bug report for details).
>>>>>
>>>>> So my question is this - do we really support creation of instances
>>>>> with multibyte characters in their names?
>>>>>
>>>>> If no, then we need to change the regex that is used to validate the
>>>>> name.
>>>>> If yes, then we might have lots of bug fixing to do to get this to
>>>>> work end-to-end.
>>>>>
>>>>> Does anybody know what 2.1 supports here?
>>>>>
>>>>> Tom
>>>>>
>>>>>
>>>>>
>>



screenshot_06.jpg
(image/jpeg attachment: screenshot_06.jpg)