[jboss-user] [EJB/JBoss] - Re: $Proxy123 cannot be cast to org.omg.CORBA.Object

msecrist do-not-reply at jboss.com
Sat Dec 6 00:03:37 EST 2008


Thanks for the reply.  The WAR file does contain a copy of the EJBClient.jar file stored in the WEB-INF/lib directory so I think it should be able to access it.  The whole thing of course is deployed as an EAR packaged by the Eclipse WTP.  I did a quick check and it seems like the same components are in the WAR packaged in the EAR and deployed to JBoss that doesn't work are the same as those in the WAR packaged and deployed to JBoss.  Oh, and the EAR does also include the EJBClient.jar file outside the WAR file as well.

Home interface

  | /*
  |  * Generated by XDoclet - Do not edit!
  |  */
  | package com.leagueplanet.ejb;
  | 
  | /**
  |  * Home interface for LeagueFacade.
  |  * @generated 
  |  * @wtp generated
  |  */
  | public interface LeagueFacadeHome
  |    extends javax.ejb.EJBHome
  | {
  |    public static final String COMP_NAME="java:comp/env/ejb/LeagueFacade";
  |    public static final String JNDI_NAME="LeagueFacade";
  | 
  |    public com.leagueplanet.ejb.LeagueFacade create()
  |       throws javax.ejb.CreateException,java.rmi.RemoteException;
  | 
  | }
  | 

Local Home

  | /*
  |  * Generated by XDoclet - Do not edit!
  |  */
  | package com.leagueplanet.ejb;
  | 
  | /**
  |  * Local home interface for LeagueFacade.
  |  * @generated 
  |  * @wtp generated
  |  */
  | public interface LeagueFacadeLocalHome
  |    extends javax.ejb.EJBLocalHome
  | {
  |    public static final String COMP_NAME="java:comp/env/ejb/LeagueFacadeLocal";
  |    public static final String JNDI_NAME="LeagueFacadeLocal";
  | 
  |    public com.leagueplanet.ejb.LeagueFacadeLocal create()
  |       throws javax.ejb.CreateException;
  | 
  | }
  | 

Skeleton


  | /*
  |  * Generated by XDoclet - Do not edit!
  |  */
  | package com.leagueplanet.ejb;
  | 
  | /**
  |  * Session layer for LeagueFacade.
  |  * @generated 
  |  * @wtp generated
  |  */
  | public class LeagueFacadeSession
  |    extends com.leagueplanet.ejb.LeagueFacadeBean
  |    implements javax.ejb.SessionBean
  | {
  |    public void ejbActivate() throws javax.ejb.EJBException, java.rmi.RemoteException
  |    {
  | 
  |       super.ejbActivate();
  |    }
  | 
  |    public void ejbPassivate() throws javax.ejb.EJBException, java.rmi.RemoteException
  |    {
  |       super.ejbPassivate();
  |    }
  | 
  |    public void setSessionContext(javax.ejb.SessionContext ctx) throws javax.ejb.EJBException, java.rmi.RemoteException
  |    {
  |       super.setSessionContext(ctx);
  |    }
  | 
  |    public void unsetSessionContext() 
  |    {
  |    }
  | 
  |    public void ejbRemove() throws javax.ejb.EJBException, java.rmi.RemoteException
  |    {
  |       super.ejbRemove();
  |    }
  | 
  | }
  | 

Remote interface


  | /*
  |  * Generated by XDoclet - Do not edit!
  |  */
  | package com.leagueplanet.ejb;
  | 
  | /**
  |  * Remote interface for LeagueFacade.
  |  * @generated 
  |  * @wtp generated
  |  */
  | public interface LeagueFacade
  |    extends javax.ejb.EJBObject
  | {
  | 
  |    public boolean createLeague( com.leagueplanet.model.League newLeague )
  |       throws java.rmi.RemoteException;
  | 
  |    public boolean doesLeagueExist( java.lang.String name )
  |       throws java.rmi.RemoteException;
  | 
  |    public com.leagueplanet.model.Game findGame( long id )
  |       throws java.rmi.RemoteException;
  | 
  |    public com.leagueplanet.model.League findLeague( long id )
  |       throws java.rmi.RemoteException;
  | 
  |    public com.leagueplanet.model.Location findLocation( long id )
  |       throws java.rmi.RemoteException;
  | 
  |    public com.leagueplanet.model.Player findPlayer( long id )
  |       throws java.rmi.RemoteException;
  | 
  |    public com.leagueplanet.model.Schedule findSchedule( long id )
  |       throws java.rmi.RemoteException;
  | 
  |    public com.leagueplanet.model.Team findTeam( long id )
  |       throws java.rmi.RemoteException;
  | 
  |    public java.util.Set getSchedulesForLeague( java.lang.String league )
  |       throws java.rmi.RemoteException;
  | 
  |    public java.lang.String foo( java.lang.String league )
  |       throws java.rmi.RemoteException;
  | 
  | }
  | 

Stack trace


  | 21:56:47,819 INFO  [EjbModule] Deploying Game
  | 21:56:47,991 INFO  [EjbModule] Deploying LeagueFacade
  | 21:56:51,194 INFO  [BaseLocalProxyFactory] Bound EJB LocalHome 'Game' to jndi 'GameLocal'
  | 21:56:51,241 INFO  [ProxyFactory] Bound EJB Home 'Game' to jndi 'Game'
  | 21:56:51,257 INFO  [BaseLocalProxyFactory] Bound EJB LocalHome 'LeagueFacade' to jndi 'LeagueFacadeLocal'
  | 21:56:51,257 INFO  [ProxyFactory] Bound EJB Home 'LeagueFacade' to jndi 'LeagueFacade'
  | 21:56:51,272 INFO  [EJBDeployer] Deployed: file:/C:/jboss-4.2.3.GA/server/all/tmp/deploy/tmp46360LeaguePlanetEAR.ear-contents/LeaguePlanetEJB.jar
  | 21:56:51,335 INFO  [TomcatDeployer] deploy, ctxPath=/LeaguePlanetWeb, warUrl=.../tmp/deploy/tmp46360LeaguePlanetEAR.ear-contents/LeaguePlanetWeb-exp.war/
  | 21:56:51,460 INFO  [EARDeployer] Started J2EE application: file:/C:/jboss-4.2.3.GA/server/all/deploy/LeaguePlanetEAR.ear
  | 21:56:51,803 INFO  [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
  | 21:56:51,850 INFO  [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
  | 21:56:51,882 INFO  [Server] JBoss (MX MicroKernel) [4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181439)] Started in 53s:157ms
  | 21:56:55,053 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
  | java.lang.ClassCastException: $Proxy74 cannot be cast to org.omg.CORBA.Object
  | 	at com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.narrow(Unknown Source)
  | 	at javax.rmi.PortableRemoteObject.narrow(Unknown Source)
  | 	at com.leagueplanet.ejb.LeagueFacadeUtil.lookupHome(LeagueFacadeUtil.java:25)
  | 	at com.leagueplanet.ejb.LeagueFacadeUtil.getHome(LeagueFacadeUtil.java:42)
  | 	at org.apache.jsp.schedule_jsp._jspService(schedule_jsp.java:82)
  | 	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
  | 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  | 	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
  | 	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
  | 	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
  | 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  | 	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  | 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
  | 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
  | 	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
  | 	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
  | 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
  | 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
  | 	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
  | 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  | 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
  | 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
  | 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
  | 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
  | 	at java.lang.Thread.run(Unknown Source)
  | 

And... The JSP result as well

  | org.apache.jasper.JasperException: An exception occurred processing JSP page /schedule.jsp at line 19
  | 
  | 16: <html>
  | 17: <%
  | 18: 
  | 19: 	LeagueFacadeHome h = LeagueFacadeUtil.getHome();
  | 20: 	LeagueFacade l = LeagueFacadeUtil.getHome().create();
  | 21: 	League league = l.findLeague(1);
  | 22: 	Iterator schedules = league.getSchedules()
  | 
  | 
  | Stacktrace:
  | 	org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
  | 	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:415)
  | 	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
  | 	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
  | 	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  | 	org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  | 
  | 
  | root cause 
  | 
  | java.lang.ClassCastException
  | 	com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.narrow(Unknown Source)
  | 	javax.rmi.PortableRemoteObject.narrow(Unknown Source)
  | 	com.leagueplanet.ejb.LeagueFacadeUtil.lookupHome(LeagueFacadeUtil.java:25)
  | 	com.leagueplanet.ejb.LeagueFacadeUtil.getHome(LeagueFacadeUtil.java:42)
  | 
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4194772#4194772

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4194772



More information about the jboss-user mailing list