dev@glassfish.java.net

Re: asadmin get throws NoSuchMethodError: java.lang.System.console()Ljava/io/Console;

From: Marina Vatkina <Marina.Vatkina_at_Sun.COM>
Date: Thu, 23 Jul 2009 12:35:14 -0700

Kedar Mhaswade wrote:
>
>
> Marina Vatkina wrote:
>
>> Kedar Mhaswade wrote:
>>
>>>
>>>
>>> Marina Vatkina wrote:
>>>
>>>> Jerome Dochez wrote:
>>>>
>>>>>
>>>>> On Jul 21, 2009, at 6:54 PM, Marina Vatkina wrote:
>>>>>
>>>>>> Jeanfrancois Arcand wrote:
>>>>>>
>>>>>>> Salut,
>>>>>>> Marina Vatkina wrote:
>>>>>>>
>>>>>>>> This is on today's ws (as of 10am+).
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> You need JDK 6 as the default :-) The error should be a little
>>>>>>> more understandable :-)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> That was it. Yes, it's not user-friendly :( - should I file a bug?
>>>>>
>>>>>
>>>>>
>>>>> yes.
>>>>
>>>>
>>>>
>>>> Kedar,
>>>>
>>>> Will https://glassfish.dev.java.net/issues/show_bug.cgi?id=8460
>>>> cover it or is it about something else?
>>>
>>>
>>>
>>> Yes Marina, I do think checking for 1.6 early on during asadmin
>>> startup would
>>> make life much easier. Yes, and 8460 is the right issue number, not
>>> 8480 like
>>> I wrote earlier. Apologies.
>>
>>
>> What is the difference between the 2?
>>
>> In my cases I started GF via java -jar on one terminal (where JDK
>> version was correct), and called asdamin get in another, where it wasn't.
>>
>> So any asadmin call needs to check the version...
>

Kedar,

>
> Marina,
>
> The issue comes when you are using JDK-6 specific api's.
>
> In general, asadmin client is a pure Java client which does not
> require JDK-6, unless:
> - you need to prompt for passwords (which needs java.io.Console).

Does it include 'asadmin get' that in default v3 doesn't need a password? This
is what I was doing when I got the above error.

> - you need to "start" the server which has a somewhat complex
> algorithm to choose the right JDK. As you might know, in start-domain,
> two VM's come into picture. VM1 (the asadmin VM) starts VM2 (the
> server VM). In definitely a few cases, the "java" used by VM1 and
> VM2 is the same! Which means if VM1 is Java 5, VM2 will be too. That
> make server cross (as in Thomas, the tank Engine) and it refuses to
> start.
>
> Thus, in order for you to use Java 5 (i.e. if you must use Java 5)
> you need to know where it is doable.
>
> My recommendation -- kiss Java 5 a goodbye. Use Java 6 everywhere to
> get rid of corner cases and pitfalls.

How about v2.x that some times need to be dealt with?

thanks,
-marina

>
> -Kedar
>
>>
>> thanks,
>> -marina
>>
>>>
>>> -Kedar
>>>
>>>> thanks,
>>>> -marina
>>>>
>>>>>
>>>>>>
>>>>>> thanks,
>>>>>> -marina
>>>>>>
>>>>>>> A+
>>>>>>> -- Jeanfrancois
>>>>>>>
>>>>>>>>
>>>>>>>> thanks,
>>>>>>>> -marina
>>>>>>>>
>>>>>>>>
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>
>>>>>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>>>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>>
>>>>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>