0 Replies Latest reply on Jun 25, 2014 9:21 AM by Madhu Garimilla

    CLI command - module remove command doesn't work

    Madhu Garimilla Newbie

      Here are the steps describing the problem.

       

      I am using EAP 6.1.0 GA environment

       

      1. I have added a jboss module using CLI command (module add --name=com.abc.xyz.module --resources=abc.jar)

      2. Module got added successfully.

      3. In my code which is inside another Jboss modules, I tried to load one of the classes which is part of the above module using the following code.

       

      1. ModuleIdentifier moduleId = ModuleIdentifier.fromString("com.abc.xyz.module:main"); 
      2. Module module = Module.getModuleFromCallerModuleLoader(moduleId); 
      3. Class<?> clob1 = module.getClassLoader().loadClass("com.abc.xyz.module.TestService"); 

       

      4. Now, when i tried to remove the module(added in step1) using CLI command (module remove --name=com.abc.xyz.module) Then it is failing with the error.

           Failed to delete C:\EAP_Workspace\sandbox\parent\server\target\project\jboss\modules\com\abc\xyz\module\main\abc.jar

       

      Is there a way to forcefully delete or unload a module? Any module which we deploy will be used in some or the other way. In any case, if a module is used once we cannot get rid of that module until we stop the jboss and manually delete that module. How can we delete that module with out restarting my jboss?