Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ClassCastException

2 views
Skip to first unread message

Jeeva

unread,
Dec 14, 2001, 3:24:30 PM12/14/01
to

Anybody know why might get this exception while trying narrow to the EJBHome:

java.lang.ClassCastException
at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:296)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
at com.mediaocean.util.ejb.EJBHomeFactory.lookupHome(Unknown Source)
at com.mediaocean.util.ejb.EJBHomeFactory.getHome(Unknown Source)

Thanks

Jeeva

unread,
Dec 14, 2001, 3:37:15 PM12/14/01
to

Just to add to that,
App server is WLS6.1sp1 and java version is 1.3

Slava Imeshev

unread,
Dec 16, 2001, 5:38:22 PM12/16/01
to
Hi Jeeva,

It likely happens because you Home interface is in the
system classpath. Make sure that weblogic does not
have your home and remote interfaces in the classpath.

Regards,

Slava Imeshev

"Jeeva" <je...@mediaocean.com> wrote in message
news:3c1a5ffe$1...@newsgroups.bea.com...

Satish A

unread,
Jan 4, 2002, 2:26:05 PM1/4/02
to

Hi Slava,
Can you elaborate this a bit!.. Do you mean the server side or the client side??I
made sure that the Home & Remote interfaces are not present in the System Classpath
on both my client & server weblogic instances. Let me explain my scenario..

My client is a WebApp (JSPs/servlets)- The bean classes are present under WEB-INF/classes
(Home, Remote & EJB classes)

The bean is deployed on another Weblogic instance..

Iam using Weblogic 6.1 sp1.

Thanks in advance,
Satish.

vijay

unread,
Jan 4, 2002, 2:40:25 PM1/4/02
to

Hi, By any chance are you having J2EE jar before weblogic.jar? If so, try removing
the J2EE jar or place it after weblogic.jar

--Vijay

Satish A

unread,
Jan 4, 2002, 3:53:54 PM1/4/02
to

hi Vijay,

I do not have j2ee jar in my classpath!.

Satish.

Krish Khambadkone

unread,
Jan 4, 2002, 4:16:33 PM1/4/02
to

I had the same problem and here is what I did,

- Compile time, make sure that you include the original bean .jar file (mount
jar and do not put it in the lib directory) and DO NOT include the actual home
and remote interface class files in your .war or .ear files
- Runtime, force weblogic to pickup the original bean .jar file by including
it in the classpath in the startweblogic.cmd script for the domain.

--Krish.

Satish A

unread,
Jan 4, 2002, 5:33:18 PM1/4/02
to

Now I get it.. Thanks a lot for your help, Krish..

Satish.

Slava Imeshev

unread,
Jan 4, 2002, 5:44:47 PM1/4/02
to
It's also possible that you have defferent versions of home interface
available for web app and for the ejb container.

Rgards,

Slava Imeshev

"Satish A" <satish.a...@rmkr.com> wrote in message
news:3c3601cd$1...@newsgroups.bea.com...

0 new messages