geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: JCA Connector and hidden-classes
Date Tue, 27 May 2008 06:50:12 GMT
I haven't had a chance to look into this yet but someone just reported  
a problem that looks related on the dev list, an apparent bug in our  
classloader -- hidden class filters are ignored by default for classes  
in the system classloader.  Apparently a workaround for this is to  
include this flag on the jvm command line:

-DXorg.apache.geronimo.kernel.config.MPCLSearchOption=safe

Please let us know if this fixes the problem.... I'll also try to look  
at your sample soon.

thanks
david jencks
On May 26, 2008, at 1:56 AM, johnxmas@free.fr wrote:

>
> David,
>
> Sorry for the delay, but I experienced a lot of network problems for  
> quite a
> long time.
>
> I'm joining a "mock" resource adapter you can use to reproduce the  
> problem
> (BTW, I'm using geronimo 2.0.2 with Tomcat 6). My deployment plan  
> specifies
> commons-logging and log4j as hidden-classes). When deploying the RAR
> a method setHostName is called (see ra.xml). I added some code to  
> see what I get
> concerning logging. The following result is written on the console
>
> Geronimo Application Server started
> MockAdapter setting hostName - Log factory is  
> org.apache.commons.logging.LogFact
> ory - loaded from
> file:/D:/geronimo-tomcat6-jee5-2.0.2/lib/commons-logging-1.0.4.jar
> MockAdapter setting hostName - Log is  
> org.apache.geronimo.kernel.log.GeronimoLog
> - loaded from
> file:/D:/geronimo-tomcat6-jee5-2.0.2/lib/geronimo-kernel-2.0.2.jar
>
> which, of course, is not what I expected
>
> Hope the test case can help.  Let me know if you need the sources
>
> Thanks
>
> Jean-Noël
>
>
>
>
>> What geronimo version are you using?  I hope it's not 1.0 :-) (I'd
>> recommend 2.1)
>>
>> I'm not sure why this isn't working yet.  Is there any chance you
>> could lend me your connector or a test case?  The environment element
>> of the geronimo plan might be enough for me to come up with a test if
>> this is not practical.
>>
>> thanks
>> david jencks
>>
>> On Apr 23, 2008, at 12:19 AM, johnxmas wrote:
>>
>>> David,
>>>
>>> Thanks for your help
>>>
>>> I corrected the geronim-ra.xml according to your indications, but I
>
>>> still get the same problem
>>> (load origin is got thru
>>> LogFactory 
>>> .class.getProtectionDomain().getCodeSource().getLocation())
>>>
>>> ---> LOG FACTORY is loaded from file:/D:/geronimo-1.0/lib/commons-
>>> logging-1.0.4.jar
>>>
>>> Jean-Noël
>>>
>>>
>>>> The filter element only takes one package, so you want
>>>>
>>>> <dep:hidden-classes>
>>>>      <dep:filter>org.apache.commons.logging.</dep:filter>
>>>>      <dep:filter>org.apache.log4.</dep:filter>
>>>>   </dep:hidden-classes>
>>>>
>>>> Also its a good idea to include the "." just in case someone has a
>>>> package org.apache.log4jakarta or something that you don't want to
>>>> hide :-)
>>>>
>>>> Let us know if there are additional problems
>>>>
>>>> thanks
>>>> david jencks
>>>>
>>>> On Apr 22, 2008, at 7:50 AM, johnxmas wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> I created my own JCA connector. Wanting to use my own version of
>>>>> commons-logging and log4j,
>>>>> I have embedded in thre RAR the two corresponding jars and, in
>>>>> geronimo-ra.xml, added the following
>>>>> lines
>>>>>
>>>>> <dep:hidden-classes>
>>>>>      <filter>org.apache.commons.logging,org.apache.log4</filter>
>>>>>   </dep:hidden-classes>
>>>>>
>>>>> But, when I deploy the adapter (stand-alone deployment, not thru  
>>>>> an
>>>>> EAR), I do not
>>>>> get the expected result. I traced the code, and discovered that in
>>>>> fact the resources
>>>>> are loaded from the parent
>>>>>
>>>>> ---> LOG FACTORY is loaded from file:/D:/geronimo-1.0/lib/commons-
>>>>> logging-1.0.4.jar
>>>>>
>>>>> If any one has got an explaination....
>>>>>
>>>>> Thanks
>>>>>
>>>>> Jean-Noël
> <MockAdapter.rar>


Mime
View raw message