0 Replies Latest reply on Feb 27, 2003 11:39 PM by prabal

    Stateless Session Bean working on 3.0.0 but not working on 3

    prabal

      i have a stateless session bean which employs userTransaction, deployed on 3.0.0 and serving request without any exception. when i tried to deploy same bean on 3.0.4 & 3.0.6 the following exception is raised-
      ------------------------
      09:54:18,314 ERROR [LogInterceptor] RuntimeException:
      java.lang.IllegalArgumentException: disconnect(ManagedConnection mc: null, Object c: org.jboss.resource.adapter.jdbc.local.LocalConnection@3c86e9) called with unknown managed connection at org.jboss.resource.connectionmanager.BaseConnectionManager2.unregisterAssociation(BaseConnectionManager2.java:661)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.disconnect(BaseConnectionManager2.java:619)
      ------------------------------------
      the bean method is like this:
      ------------------------------------
      try {
      userTran = sessionContext.getUserTransaction();
      userTran.begin();
      InitialContext ctx1 = new InitialContext();
      Object ref = ctx1.lookup("java:comp/env/ejb/AnalysisMonthCummEJB");
      AnalysisMonthCummLocalHome home = (AnalysisMonthCummLocalHome) PortableRemoteObject.narrow(ref, AnalysisMonthCummLocalHome.class);
      AnalysisMonthCummPK pk = new AnalysisMonthCummPK();

      pk.cCode = analysisMonthCummBean.getCcode();
      pk.month = analysisMonthCummBean.getMonth();
      pk.year = analysisMonthCummBean.getYear();
      try{
      AnalysisMonthCummLocal remote = home.findByPrimaryKey(pk);
      remote.remove();
      }

      catch (ObjectNotFoundException re) {}
      catch (FinderException re) {}

      home.create(analysisMonthCummBean);
      userTran.commit();
      } catch (NamingException ne) {
      throw new EJBException("AnalysisMonthCummSessionEJB :create " + ne);
      } catch (Exception ex) {
      if (userTran != null) {
      userTran.rollback();
      }
      }
      ---------------
      the same bean is also working on 3.2 without error.
      can anybody help me.