1 Reply Latest reply on Aug 6, 2003 12:43 AM by frito

    Loading class after re-deploy

    errorken

      I have this:

      1 ear file:

      Which contains a jar file and a war.

      The war file has 1 simple servlet wich looksup a session bean located in the jar file and executes the start() method on it.

      The jar file has 1 session bean (like said above) with a start() method in its remote interface. The start() method looks like this:

      public String start(Connector c)
      {
      try
      {
      Class cc= Class.forName("fgov.ksz.classes.transform.TransformerHttpXmlManageReferences");
      Transformer t =(Transformer)cc.newInstance();
      return "Success";
      }catch(Exception e) {System.err.println("Error:"+e);}
      return null;
      }

      Next, I have a seperate jar file (wich is not in de ear) . This jar file contains the class used in the code above (so; fgov.ksz......)

      In other words, the session bean inside the ear file tries to load the class wich is deployed by the seperate jar file.

      when I deploy the ear file and the the jar file everything goes fine. I get "success" as result in my browser. However, if I re-deploy the ear file and re-run the servlet I get "null" because there occurs a class-cast exception.

      Why is this ? does JBoss undeploys something wrong ? ...