2 Replies Latest reply on May 11, 2011 5:51 PM by kthegeek

    Reload a Class in a jar file

    kthegeek Newbie

      Hi ,

       

      Without the restarting the JBoss server , how can we reload a class file in a jar file ?

      The jar is a deployable component .There are other wars and jars which are depending on this jar file .

      We have an issue and want to fix it and reload that class file alone

      We are using jboss 4.0.5 .

       

      Thanks,

      Karthik

        • 1. Reload a Class in a jar file
          Peter Johnson Master

          That cannot be done. If the class is an EJB, or is only referenbced by EJBs, you could redeploy the entire JAR (assuming EJBs and the class in question are in the same JAR) and the EJBs should redeploy along with the new class. If the class is a simple class (not an EJB), or is in a library JAR, then you will have to restart.

          1 of 1 people found this helpful
          • 2. Reload a Class in a jar file
            kthegeek Newbie

            Hi Peter ,

             

             

            The class is in EJB Jar .i used the redeploy option in the Main Deployer [Jmx console] and reployed the EJB jar

            Then i reloaded all the war files which refers to the classes in th EJB jar.The changes made in the class is reflected

             

            But i get an error in other places

            java.lang.ClassCastException

            at com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:229)

            at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)

            at org.apache.jsp.index_jsp._jspService(org.apache.jsp.index_jsp:57)

            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)