Ok, I'm still trying to solve the mystery on the class cast problem on my EJB 2.0
project. I've eliminated a variety of potential causes including the utility class
generated by the annotation mechanisms.
To recap: I have a web application attempting to invoke a session EJB causing the class
cast problem. I've attempted using the following code.
LeagueFacade l = LeagueFacadeUtil.getHome().create();
and
| InitialContext ic = new InitialContext();
| Object ref = ic.lookup(LeagueFacadeHome.JNDI_NAME);
| LeagueFacadeHome h =
(LeagueFacadeHome)PortableRemoteObject.narrow(ref,LeagueFacadeHome.class);
|
Both essentially attempt to do the same thing but both also result in the ultimate
exeption of:
$Proxy123 cannot be cast to org.omg.CORBA.Object
The crux seems to be attempting to invoke an EJB from the web app when they co-reside in
the same JBoss container. I have been able to extract the web app out to a separately
running Tomcat server and it works fine. I have also been able to create a Java program
to locate and invoke the EJB and that works as well. That would suggest that there is
something going on between the web container and the EJB container portions of JBoss.
Isn't JBoss using Tomcat internally though?
As I mentioned, I was able to move on by just extracting the web app to a separately
running process but not knowing exactly why it doesn't work as a full EAR deployed to
JBoss is bothering me.
Having not gotten responses on the previous posts suggest to me one of the following:
1. The problem is so simple it isn't worth answering
2. The problem is so unique, no one has encountered it before
3. I'm not describing the problem adequately to help someone provide an answer easily
(and we all are busy)
I'm happy to keep digging, but I'm running out of resources. I haven't tried
deploying to another container like weblogic yet to see if it is just a JBoss problem.
That may be my next step. I have a hunch it is a config problem but not having any other
references, I'm having a hard time knowing where to look.
Thanks for any ideas folks may have.
Mark
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4194417#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...