1 Reply Latest reply on May 16, 2005 2:26 PM by luke skywalker

    jboss3.2 to jboss4 migration

    luke skywalker Newbie

      My beans work in jboss 3.2.1 but not in 4.0.2

      invoking a call to my beans issues a classcastexception ....
      the call is ...
      try {
      Context ctx = new javax.naming.InitialContext();
      Object obj = ctx.lookup("UserSessionLink");
      System.out.println(obj.getClass());
      Object o = javax.rmi.PortableRemoteObject.narrow(obj, UserSessionHome.class);
      System.out.println(o.getClass());
      UserSessionHome userSessionHome = (UserSessionHome)o;
      this.userSession = userSessionHome.create();
      } catch (Exception ex) {
      ex.printStackTrace();
      }

      and the exception is ....


      17:01:18,027 INFO [STDOUT] java.lang.ClassCastException
      17:01:18,029 INFO [STDOUT] at com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:229)
      17:01:18,029 INFO [STDOUT] at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
      17:01:18,030 INFO [STDOUT] at user.session.UserSessionWrapper.getUserSession(UserSessionWrapper.java:139)
      17:01:18,031 INFO [STDOUT] at user.session.UserSessionWrapper.(UserSessionWrapper.java:22)
      17:01:18,031 INFO [STDOUT] at org.apache.jsp.jsp.login_jsp._jspService(org.apache.jsp.jsp.login_jsp:62)
      17:01:18,032 INFO [STDOUT] at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
      17:01:18,033 INFO [STDOUT] at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      17:01:18,033 INFO [STDOUT] at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
      17:01:18,066 INFO [STDOUT] at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
      17:01:18,067 INFO [STDOUT] at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
      17:01:18,067 INFO [STDOUT] at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      17:01:18,068 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      17:01:18,068 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      17:01:18,068 INFO [STDOUT] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
      17:01:18,068 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      17:01:18,068 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      17:01:18,069 INFO [STDOUT] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      17:01:18,069 INFO [STDOUT] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      17:01:18,069 INFO [STDOUT] at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
      17:01:18,069 INFO [STDOUT] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
      17:01:18,069 INFO [STDOUT] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
      17:01:18,069 INFO [STDOUT] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      17:01:18,070 INFO [STDOUT] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      17:01:18,070 INFO [STDOUT] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      17:01:18,070 INFO [STDOUT] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      17:01:18,071 INFO [STDOUT] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
      17:01:18,071 INFO [STDOUT] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
      17:01:18,071 INFO [STDOUT] at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      17:01:18,071 INFO [STDOUT] at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      17:01:18,071 INFO [STDOUT] at java.lang.Thread.run(Thread.java:595)
      17:01:18,072 INFO [STDOUT] Caused by: java.lang.ClassCastException: $Proxy77
      17:01:18,072 INFO [STDOUT] at com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:212)
      17:01:18,072 INFO [STDOUT] ... 29 more




      The getClass prints out
      17:01:18,007 INFO [STDOUT] class $Proxy77

      which perplexes me.

      A google of this throws up foreign pages with reference to UserTransaction which that bean does use internally... Is there any connection between the two and then if not what is going on ?

      Thank you in adv. for anyones help