dev@glassfish.java.net

Re: fixing issue #6854

From: Dies Koper <diesk_at_fast.au.fujitsu.com>
Date: Tue, 18 Aug 2009 09:40:39 +1000

Thanks, Tim!

I was trying to reproduce a problem I saw with GF V2.1(.1) while using
an EJB client in an ACC with the security manager enabled.

I sent an e-mail about this issue to this list before:
http://markmail.org/search/?q=error+when+running+EJB+client+in+ACC+with+security+manager+on&q=list%3Anet.java.dev.glassfish.dev#query:error%20when%20running%20EJB%20client%20in%20ACC%20with%20security%20manager%20on%20list%3Anet.java.dev.glassfish.dev+page:1+mid:lpemobis2u3f5wse+state:results

Is ACC + security manager implemented yet in V3 or is it planned to be?
Do you know who knows more about this function?
I can fix it for V2.1.1 but don't know who to ask to review it.

Thanks,
Dies


Tim Quinn wrote:
> 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