0 Replies Latest reply on Apr 7, 2014 7:15 AM by madhu.garimilla

    CLI - remove module command is getting failed when one of its classes is explicitly loaded.

    madhu.garimilla

      Here are the steps describing the problem.

       

      I am using EAP 6.1 Alpha environment

       

      1. I have added a jboss module using CLI command (module add)

      2. Module got added successfully.

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

       

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

      Note: The above piece of code is not part of the module deployed in step 1

      4. Now, when i tried to remove the module(added in step1) using CLI Then it is failing with the error.

       

      Failed to delete C:\EAP_Workspace\sandbox\parent\server\target\project\jboss\modules\com\abc\xyz\module1\main\demo_e
      dit_user-0.0.1-SNAPSHOT.jar
      

       

      Is there a way to forcefully delete the module? or unload a module?