dev@glassfish.java.net

Re: fixing issue #6854

From: Tim Quinn <Timothy.Quinn_at_Sun.COM>
Date: Mon, 17 Aug 2009 09:13:32 -0500

Despite my earlier assurance to the contrary, I did allow the same error
to creep into the v3 code base.

The ClientContainer class - indeed all classes that correspond to the
elements in the sun-acc.xml config file - are generated using JAXB
during the build of the appclient/client/acc-config module.

I have just checked in a v3 change to fix this problem. Before I
suggested a change that you might go ahead and make I wanted to be sure
it would be sufficient. I decided I should just check it in rather than
impose on you to do it.

Thanks for catching this.

- Tim

Dies Koper wrote:
> Hi Tim,
>
> I encountered this problem again in last week's GF V3 promoted build:
>
> appclient -client MyAppClient.jar -xml sun-acc.xml
> java.lang.NullPointerException
> at
> org.glassfish.appclient.client.acc.ACCLogger.init(ACCLogger.java:84)
> at
> org.glassfish.appclient.client.acc.ACCLogger.<init>(ACCLogger.java:80
> )
> at
> org.glassfish.appclient.client.AppClientFacade.createBuilder(AppClien
> tFacade.java:357)
> at
> org.glassfish.appclient.client.AppClientFacade.prepareACC(AppClientFa
> cade.java:245)
> at
> org.glassfish.appclient.client.acc.agent.AppClientContainerAgent.prem
> ain(AppClientContainerAgent.java:75)
>
> I tried fixing it myself, but I can't find the source of the following
> class anywhere:
>
> org.glassfish.appclient.client.acc.config.ClientContainer
>
> AppClientFacade obtains the LogService instance from ClientContainer
> and I assume it is returning null.
>
> final AppClientContainer.Builder builder =
> createBuilder(targetServers,
> clientContainer.getLogService(),
> appClientCommandArgs);
>
> Could you take a look or tell me where to look?
>
> Thanks,
> Dies
>
>
> Tim Quinn wrote:
>> Hello, Dies.
>>
>> Dies Koper wrote:
>>> Hi Tim,
>>>
>>> A colleague of mine reported the following issue for V2.1 a while ago.
>>> https://glassfish.dev.java.net/issues/show_bug.cgi?id=6854
>>>
>>> I will try whether it is reproducible on V3 once the appclient command
>>> is added (I'm still using v3-ea-b42 and it's not there), but I couldn't
>>> find ACCLogManager.java so I assume you refactored it out and the
>>> problem won't occur any more?
>>>
>>> In the meantime, may I commit this bug fix to GFv2.1-next? (several
>>> other GF developers have recently asked me to commit changes to this
>>> branch that were not (yet) relevant to the V3 branch).
>>>
>>> Thanks,
>>> Dies
>>>
>>>
>> It seems fine to repair this in 2.1-next.
>> Note that (1) the appclient command is indeed available in the most
>> recent v3 promoted build (b43) and (2) currently logging is
>> controlled using logging.properties. I still need to incorporate the
>> log-service settings from the sun-acc.xml config file into the
>> logging. I'll be sure to not repeat the same error from v2!
>>
>> - Tim
>>
>>
>
>