tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ml...@roinet.com
Subject Re: pulling my hair out re: EJB in tomcat
Date Mon, 01 Oct 2001 14:29:24 GMT

>On Fri, 28 Sep 2001 mlamb@roinet.com wrote:
>
>> Now I just keep getting the "java.lang.ClassCastException:
>> javax.naming.NameClassPair" on the sample's line:
>>
>>           Object ref  = jndiContext.lookup("interest/Interest");
>
>are you actually getting the classcast there?  or on a subsequent line
>where its something like
>
>          InterestHome iHome = (InterestHome) ref;
>
>?  Does doing a
>
>          InterestHome iHome = (InterestHome) PortableRemoteObject.narrow(
>                              jndiContext.lookup("interest/Interest"),
>                              InterestHome.class);


Unfortunately, it's definitely happening during the lookup.  If the lookup
were to succeed, it would continue t0:
         InterestHome home = (InterestHome)
PortableRemoteObject.narrow(ref, InterestHome.class);
But it's not getting there.

- Marty



Mime
View raw message