> > I'm using JDK1.3.1 and have run into the same problem wiht JNDI
> > where i get a ClassCastException when i do a
> >
> > Thing t = (Thing) ctx.lookup("name");

sure that shouldn't be something like:

    ThingHome thingHome = (ThingHome) ctx.lookup("name");

?  thats what normally happens if you're looking up an EJB - is it an ejb,
or something else?

Otherwise, you could use java's reflection stuff to look at what the class
is and what interfaces it implements which might provide some clues.

hth
dim

> >
> >
> > i have no idea why it happens. I know for sure that the class is a
> "Thing".
> >
> > the Exception occurs when  i do a lookup from a different JVM than
wihtin
> > JBoss.
> >
> > I've never found a solution.
> >
> >
> > frank
> >
> > -----Original Message-----
> > From: Burkhard Vogel [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, July 01, 2002 9:37 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [JBoss-user] ClassCastException
> >
> >
> > Hi,
> > I'm guessing you are on JDK 1.4 and you hit a JDK bug. Try
> > usersys = (UserSysMatch) key;
> > hth,
> > Burkhard
> >
> > ----- Original Message -----
> > From: "Conover, Ryan" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Monday, July 01, 2002 8:51 AM
> > Subject: [JBoss-user] ClassCastException
> >
> >
> > > I am using JBoss-2.4.4.  When I return a collection from an entity
bean
> > 1.1
> > > spec,  I get a Class Cast Exception whenever I try to cast it from an
> > Object
> > > to an Integer. using the following code.
> > >
> > > Collection returnedlist = usersyshome.findByUsername(this.Username);
> > > UserSysMatch usersys = null;
> > >
> > > Iterator syss = returnedlist.iterator();
> > > int sysarr[] = new int[returnedlist.size()];
> > > int x = 0;
> > > while(syss.hasNext()){
> > >           Object key = syss.next();
> > >
> > >    /********************* The following line is where I get a Class
Cast
> > > Exception ********************************8
> > >           usersys = (UserSysMatch) PortableRemoteObject.narrow(key,
> > > UserSysMatch.class);
> > >           System.out.println("SysID" + key.intValue());
> > >           UserSysMatch usersys = usersyshome.findByPrimaryKey(key);
> > >           sysarr[x] = usersys.getSysId();
> > >           x++;
> > > }
> > >
> > >
> > > Any ideas I would Appreciate it.
> > >
> > > Thanks,
> > >
> > > Ryan Conover
> > > [EMAIL PROTECTED]
> > > [EMAIL PROTECTED]
> > > http://www.pitt.edu/~rscst25/
> > >
> > >
> > >
> > >
> > > -------------------------------------------------------
> > > This sf.net email is sponsored by:ThinkGeek
> > > Welcome to geek heaven.
> > > http://thinkgeek.com/sf
> > > _______________________________________________
> > > JBoss-user mailing list
> > > [EMAIL PROTECTED]
> > > https://lists.sourceforge.net/lists/listinfo/jboss-user
> > >
> >
> >
> >
> > -------------------------------------------------------
> > This sf.net email is sponsored by:ThinkGeek
> > Welcome to geek heaven.
> > http://thinkgeek.com/sf
> > _______________________________________________
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/jboss-user
> >
> >
> > -------------------------------------------------------
> > This sf.net email is sponsored by:ThinkGeek
> > Welcome to geek heaven.
> > http://thinkgeek.com/sf
> > _______________________________________________
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/jboss-user
> >
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
No, I will not fix your computer.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to