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: Referencing JCA Admin Object
Date Fri, 18 Nov 2005 21:33:35 GMT
I've updated ResourceReference to provide more useful information on 
the exact cause of error.

thanks
david jencks

On Nov 18, 2005, at 12:18 PM, David Jencks wrote:

>
> On Nov 18, 2005, at 8:52 AM, Richard wrote:
>
>> Thanks again David,
>>  
>> I apologize for not sending the cause the first time.  I scanned the 
>> stack too quickly and missed it.  It is below.  For some reson is is 
>> complainging my impl class does not realize my interface.  I'm 
>> certain it does. Also, I've looked several times to make sure I have 
>> not mistyped something.  I am assuming that the classes are all 
>> verified at deployment time.  I feel like I am missing something 
>> obvious ;-)
>>  
>>  
>> I added some printf's to my impl class and I see the setters getting 
>> called.  So I know it is the right type that is added to JNDI.  These 
>> beans do not need to implement any specific interface do they; as 
>> long as they implement the interface I prescribed in my connector I 
>> should be good to go.  Any ideas would be greatly appreciated.
>>  
>>  
>> Caused by: java.lang.ClassCastException: Proxy does not implement 
>> expected inter
>> face interface com.abc.Interface
>>         at 
>> org.apache.geronimo.naming.reference.ResourceReference.getContent(Res
>> ourceReference.java :61)
>>         at 
>> org.apache.geronimo.naming.java.ReadOnlyContext.lookup(ReadOnlyContex
>> t.java:220)
>
> I think there are 2 possibilities: one is that there is an error in 
> perhaps the ra.xml or the plan and the wrong interface is specified 
> somewhere, and the other is that the interface is being loaded twice 
> in 2 different classloaders.
>
> Aside from just looking again, if you post the ra.xml and the plan I 
> will review them.  I think it's more likely that there are 2 
> classloaders involved.  Is the interface in question in 2 jars, such 
> as in the adapter itself and in the ejb jar?  I usually find the 
> source of these problems by putting a breakpoint at the source of the 
> exception and carefully examining the objects and classloaders 
> involved.  I'll look into adding some more helpful analysis code that 
> will provide more useful information.
>
> thanks
> david jencks
>


Mime
View raw message