[JBoss-user] ClassCastException on redeploy of .ear

2002-11-03 Thread John Snyder



Hello 
all,Using jboss-3.0.0_tomcat-4.0.3, I am trying to access a Session bean 
called Registration from within a servlet, both of which are part of an 
application called pc, deployed as pc.ear. 
Here is the code I’m using to do it:

Context 
jndiContext = getInitialContext();Object ref = 
jndiContext.lookup("RegistrationHomeRemote");RegistrationHomeRemote 
registrationHome = 
(RegistrationHomeRemote)PortableRemoteObject.narrow(ref,RegistrationHomeRemote.class); 
RegistrationRemote registration = registrationHome.create(); 
registration.remove();

Everything works fine when I start jboss fresh and deploy the ear. 
However, as soon as I make a change to any file and re-deploy the ear, I get a 
ClassCastException at the third line. 
I’m totally stumped – why would it work on initial deployment, then stop 
working on re-deployment??? Any 
help would be most appreciated.

My 
deployment configuration files are as follows:

ejb.jar:sessiondisplay-nameRegistration/display-name 
ejb-nameRegistration/ejb-name 
homecom.pc.ejb.session.interfaces.RegistrationHomeRemote/homeremotecom.pc.ejb.session.interfaces.RegistrationRemote/remoteejb-classcom.pc.ejb.session.beans.RegistrationBean/ejb-classsession-typeStateful/session-typetransaction-typeContainer/transaction-type 
/sessionjboss.xml:sessionejb-nameRegistration/ejb-namejndi-nameRegistrationHomeRemote/jndi-name/sessionweb.xml:servletservlet-nameRegistrationServlet/servlet-nameservlet-classcom.pc.servlets.RegistrationServlet/servlet-class/servletejb-refejb-ref-nameRegistration/ejb-ref-nameejb-ref-typeSession/ejb-ref-typehomeRegistrationHomeRemote/homeremoteRegistrationRemote/remoteejb-linkRegistration/ejb-link/ejb-refjboss-web.xml:ejb-refejb-ref-nameRegistration/ejb-ref-namejndi-namepc/RegistrationHomeRemote/jndi-name/ejb-ref


Re: [JBoss-user] ClassCastException on redeploy of .ear

2002-11-03 Thread Scott M Stark



Bug in 3.0.0. Upgrade to 3.0.4.

Scott StarkChief Technology 
OfficerJBoss Group, LLC

  - Original Message - 
  From: 
  John Snyder 
  
  To: [EMAIL PROTECTED] 
  
  Sent: Sunday, November 03, 2002 9:31 
  AM
  Subject: [JBoss-user] ClassCastException 
  on redeploy of .ear
  
  Hello 
  all,Using jboss-3.0.0_tomcat-4.0.3, I am trying to access a Session 
  bean called Registration from within a servlet, both of which are part of an 
  application called pc, deployed as pc.ear. Here is the code I’m using to do 
  it:
  
  Context jndiContext = getInitialContext();Object ref = 
  jndiContext.lookup("RegistrationHomeRemote");RegistrationHomeRemote 
  registrationHome = 
  (RegistrationHomeRemote)PortableRemoteObject.narrow(ref,RegistrationHomeRemote.class); 
  RegistrationRemote registration = registrationHome.create(); 
  registration.remove();
  
  Everything works fine when I start jboss fresh and deploy the ear. 
  However, as soon as I make a change to any file and re-deploy the ear, I get a 
  ClassCastException at the third line. 
  I’m totally stumped – why would it work on initial deployment, then 
  stop working on re-deployment??? 
  Any help would be most appreciated.
  
  My 
  deployment configuration files are as follows:
  
  ejb.jar:sessiondisplay-nameRegistration/display-name 
  ejb-nameRegistration/ejb-name 
  homecom.pc.ejb.session.interfaces.RegistrationHomeRemote/homeremotecom.pc.ejb.session.interfaces.RegistrationRemote/remoteejb-classcom.pc.ejb.session.beans.RegistrationBean/ejb-classsession-typeStateful/session-typetransaction-typeContainer/transaction-type 
  /sessionjboss.xml:sessionejb-nameRegistration/ejb-namejndi-nameRegistrationHomeRemote/jndi-name/sessionweb.xml:servletservlet-nameRegistrationServlet/servlet-nameservlet-classcom.pc.servlets.RegistrationServlet/servlet-class/servletejb-refejb-ref-nameRegistration/ejb-ref-nameejb-ref-typeSession/ejb-ref-typehomeRegistrationHomeRemote/homeremoteRegistrationRemote/remoteejb-linkRegistration/ejb-link/ejb-refjboss-web.xml:ejb-refejb-ref-nameRegistration/ejb-ref-namejndi-namepc/RegistrationHomeRemote/jndi-name/ejb-ref