Yup! Thats what I get for codeing at 2:30AM!!!

Thanks!

--On Monday, August 28, 2000 10:15 AM -0500 "Schultz, Bob (Consultant)"
<[EMAIL PROTECTED]> wrote:

> Hi, Jim.
>
> This has happened to me on a number of occasions, and usually the problem
> is my failure to include the EJB client stubs in my classpath. I try to
> put these first in the classpath.
>
> Good luck,
>
> Bob
>
> -----Original Message-----
> From: Jim Archer [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 28, 2000 10:05 AM
> To: [EMAIL PROTECTED]
> Subject: Re: ClassCastException when narrowing
>
>
> Thanks, Dan...
>
> Here is the entire app. Its very short...
>
> Jim
>
>
> // TestCrEb.java
>
> import java.rmi.RemoteException;
> import javax.ejb.*;
> import javax.naming.*;
> import javax.rmi.PortableRemoteObject;
>
>
>
> import com.regtek.types.*;
> import com.regtek.eb_ejb_ver11.*;
>
> class TestCrEb {
>     public static void main(String[] args) {
>                 TestCrEb me = new TestCrEb();
>                 me.testCrEb();
>     }
>
>         // ---------------------------------------------------------------
>         public RegnetTag testCrEb()
>         {
>                 RegnetTag returnTag = null;
>
>                 try
>                 {
>                         Context context = new InitialContext();
>
>                         Object homeObject = context.lookup("cr");
>
>                         // Narrow the reference to a Cr.
>                         CrHome home =
> (CrHome)PortableRemoteObject.narrow(homeObject,
> CrHome.class);
>
>                         // Create a new Cr and narrow the reference.
>                         Cr cr =
> (Cr)PortableRemoteObject.narrow(home.create("Tag"), Cr.class);
>
>
>                         String rtnTagString = cr.getTag();
>
>                         RegnetTag rt = new RegnetTag(rtnTagString);
>                         return rt;
>                 }
>                 catch(RemoteException e)
>                 {
>                         System.err.println("RE:System/communication
>                         error: "
> + e.getMessage());
>                 }
>                 catch(NamingException e)
>                 {
>                         System.err.println("NE:Communication error: " +
> e.getMessage());
>                 }
>                 catch(CreateException e)
>                 {
>                         System.err.println("CE:Error creating contact
> record: " +
> e.getMessage());
>                 }
>                 catch(ClassCastException e)
>                 {
>                         System.err.println("CCE:Error narrowing object: "
>                         +
> e.getMessage());
>                 }
>
>                 return null;
>         }
>
> }
>
>
>
>
>
> --On Monday, August 28, 2000 7:53 AM -0600 Dan Hinojosa
> <[EMAIL PROTECTED]> wrote:
>
>> Show us that one line of code (the one with the Portable Remote Object
>> Call).
>> i.e.
>>
>> Customer customer = (Customer)PortableRemoteObject.narrow(...,...)
>>
>> --
>>
>> Dan Hinojosa
>> Java & Lotus Notes Consultant
>> Java Certified Programmer
>>
>> P.O. Box 4675
>> Albuquerque, NM 87196-4675
>> Telephone: (505) 262-0911
>> Email: [EMAIL PROTECTED]
>> WWW: http://www.digitalpriest.com
>>
>> =========================================================================
>> == To unsubscribe, send email to [EMAIL PROTECTED] and include in the
>> body of the message "signoff EJB-INTEREST".  For general help, send email
>> to [EMAIL PROTECTED] and include in the body of the message "help".
>
> =========================================================================
> == To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body of the message "signoff EJB-INTEREST".  For general help, send email
> to [EMAIL PROTECTED] and include in the body of the message "help".
>
> =========================================================================
> == To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body of the message "signoff EJB-INTEREST".  For general help, send email
> to [EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to