1 Reply Latest reply on Apr 29, 2003 9:00 AM by Jon Martin Solaas

    3.0.7 deployment error

    Jon Martin Solaas Newbie

      I have an app, deployed as an EAR. It worked fine on 3.0.6. On 3.0.7, however, it seems I can only instantiate ejbs from jsp-pages (via a taglib) just after jboss restart. If I deploy a new version of the ear, the ejb's will not be instantiated due to a class cast exception, until I restart jboss again. Using the same ejb from a normal java-client works just fine all the time, as far as I can see.

      I'm running jboss/jetty version. The ejb's in question are session facades in front of cmp 2.0 ejbs. I get a class cast exeption, and my code looks like this:

      public SesCMS getSesCmsBean() throws EJBUtilsException {
      System.err.println("EJBUtils.getSesCmsBean");
      try { return ((SesCMSHome)PortableRemoteObject.narrow(getInitialContext().lookup("SesCMS"),
      SesCMSHome.class)).create() ;
      } catch (Exception e) {
      e.printStackTrace();
      throw new EJBUtilsException("Couldn't get SesCmsBean due to: " + e.getMessage());
      }
      }

      The actual error is:

      2003-04-29 14:41:43,390 ERROR [STDERR] EJBUtils.getSesCmsBean
      2003-04-29 14:41:43,390 ERROR [STDERR] java.lang.ClassCastException
      2003-04-29 14:41:43,390 ERROR [STDERR] at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:293)
      2003-04-29 14:41:43,406 ERROR [STDERR] at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
      2003-04-29 14:41:43,406 ERROR [STDERR] at no.solaas.aprosjekt.utils.EJBUtils.getSesCmsBean(EJBUtils.java:52)
      2003-04-29 14:41:43,406 ERROR [STDERR] at no.solaas.aprosjekt.web.taglib.ContentList.doStartTag(ContentList.java:68)
      2003-04-29 14:41:43,406 ERROR [STDERR] at org.apache.jsp.page$jsp._jspService(page$jsp.java:427)
      2003-04-29 14:41:43,406 ERROR [STDERR] at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
      2003-04-29 14:41:43,406 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      2003-04-29 14:41:43,421 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
      2003-04-29 14:41:43,421 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
      2003-04-29 14:41:43,421 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
      2003-04-29 14:41:43,421 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      2003-04-29 14:41:43,421 ERROR [STDERR] at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
      2003-04-29 14:41:43,421 ERROR [STDERR] at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
      2003-04-29 14:41:43,421 ERROR [STDERR] at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558)
      2003-04-29 14:41:43,421 ERROR [STDERR] at org.mortbay.http.HttpContext.handle(HttpContext.java:1714)
      2003-04-29 14:41:43,421 ERROR [STDERR] at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:507)
      2003-04-29 14:41:43,421 ERROR [STDERR] at org.mortbay.http.HttpContext.handle(HttpContext.java:1664)
      2003-04-29 14:41:43,421 ERROR [STDERR] at org.mortbay.http.HttpServer.service(HttpServer.java:863)
      2003-04-29 14:41:43,421 ERROR [STDERR] at org.jboss.jetty.Jetty.service(Jetty.java:460)
      2003-04-29 14:41:43,421 ERROR [STDERR] at org.mortbay.http.HttpConnection.service(HttpConnection.java:775)
      2003-04-29 14:41:43,437 ERROR [STDERR] at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939)
      2003-04-29 14:41:43,437 ERROR [STDERR] at org.mortbay.http.HttpConnection.handle(HttpConnection.java:792)
      2003-04-29 14:41:43,437 ERROR [STDERR] at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201)
      2003-04-29 14:41:43,437 ERROR [STDERR] at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
      2003-04-29 14:41:43,437 ERROR [STDERR] at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)
      2003-04-29 14:41:43,437 ERROR [STDERR] no.solaas.aprosjekt.utils.exception.EJBUtilsException: Couldn't get SesCmsBean due to: null
      2003-04-29 14:41:43,437 ERROR [STDERR] at no.solaas.aprosjekt.utils.EJBUtils.getSesCmsBean(EJBUtils.java:61)
      2003-04-29 14:41:43,437 ERROR [STDERR] at no.solaas.aprosjekt.web.taglib.ContentList.doStartTag(ContentList.java:68)
      2003-04-29 14:41:43,437 ERROR [STDERR] at org.apache.jsp.page$jsp._jspService(page$jsp.java:427)
      2003-04-29 14:41:43,437 ERROR [STDERR] at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
      2003-04-29 14:41:43,437 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      2003-04-29 14:41:43,437 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
      2003-04-29 14:41:43,437 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
      2003-04-29 14:41:43,453 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
      2003-04-29 14:41:43,453 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      2003-04-29 14:41:43,453 ERROR [STDERR] at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
      2003-04-29 14:41:43,453 ERROR [STDERR] at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
      2003-04-29 14:41:43,453 ERROR [STDERR] at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558)
      2003-04-29 14:41:43,453 ERROR [STDERR] at org.mortbay.http.HttpContext.handle(HttpContext.java:1714)
      2003-04-29 14:41:43,453 ERROR [STDERR] at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:507)
      2003-04-29 14:41:43,468 ERROR [STDERR] at org.mortbay.http.HttpContext.handle(HttpContext.java:1664)
      2003-04-29 14:41:43,468 ERROR [STDERR] at org.mortbay.http.HttpServer.service(HttpServer.java:863)
      2003-04-29 14:41:43,468 ERROR [STDERR] at org.jboss.jetty.Jetty.service(Jetty.java:460)
      2003-04-29 14:41:43,468 ERROR [STDERR] at org.mortbay.http.HttpConnection.service(HttpConnection.java:775)
      2003-04-29 14:41:43,468 ERROR [STDERR] at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939)
      2003-04-29 14:41:43,468 ERROR [STDERR] at org.mortbay.http.HttpConnection.handle(HttpConnection.java:792)
      2003-04-29 14:41:43,468 ERROR [STDERR] at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201)
      2003-04-29 14:41:43,468 ERROR [STDERR] at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
      2003-04-29 14:41:43,468 ERROR [STDERR] at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)