2 Replies Latest reply on Aug 30, 2004 11:20 AM by astehman

    ClassCastException when accessing Remote EJB with JBoss 3.2.

    Robert Costanzo Newbie

      I just upgraded from JBoss 3.2.2 with Jetty to JBoss 3.2.5 with Tomcat. One issue I am running into is I access a stateless session EJB of one JBoss server from a servlet in another JBoss server. This works fine in my current JBoss. However, with 3.2.5 I get a ClassCastException when it tries to do a narrow:

      java.lang.ClassCastException
      at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:293)
      at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
      at mts.psp.admin.struts.datadelta.DataDeltaSubmitAction.promoteChanges(DataDeltaSubmitAction.java:166)
      at mts.psp.admin.struts.datadelta.DataDeltaSubmitAction.doExecute(DataDeltaSubmitAction.java:88)
      at mts.psp.admin.struts.common.AdminAction.doExecute(AdminAction.java:50)
      at mts.psp.admin.struts.common.AdminSubmitAction.doExecute(AdminSubmitAction.java:39)
      at mts.psp.common.struts.BaseAction.execute(BaseAction.java:77)
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:479)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1421)
      at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:518)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
      ...
      ...

      The two servers are exactly identical, and in fact I get the same issue when I try to just access the same server via RMI. The class I am trying to access exists in only a single JAR which is packaged in my EAR. I am using my own classloader for the EAR, rather than the unified classloader.

      Any help/ideas would be greatly appreciated.