Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-6880

ClassNotFoundException occur when undeploy notification for server shutdown.

    XMLWordPrintable

Details

    • Hide

      1. Copy the TestDeployer.jar to your EAP5.1.1 server deploy directory
      > cp <repro-dir>/TestDeployer.jar <server-dir>/deploy/
      2. Start the your EAP5.1.1 server.
      3. Shutdown the your EAP5.1.1 server.
      > Ctr+c
      4. You can confirm "Class not found: java.lang.System" errors.

      Show
      1. Copy the TestDeployer.jar to your EAP5.1.1 server deploy directory > cp <repro-dir>/TestDeployer.jar <server-dir>/deploy/ 2. Start the your EAP5.1.1 server. 3. Shutdown the your EAP5.1.1 server. > Ctr+c 4. You can confirm "Class not found: java.lang.System" errors.
    • Hide

      The class loader is undeployed before application undeploy notification for the server shutdown, and become exception when the class that doesn't cache it is called.
      The exception is not occur beforehand by using the class.

      TestDeployer.java - example)
      72: @Override
      73: public void undeploy(DeploymentUnit deploymentUnit) {
      74: String deploymentName = deploymentUnit.getSimpleName();
      ->: System.out.println("##### TestDeployer.undeploy");
      75: if (archiveMap == null)

      { 76: System.out.println("##### TestDeployer.undeploy - archiveMap is null"); 77: System.out.println(deploymentName); 78: }

      else {
      79: String jndiName = archiveMap.get(deploymentName);
      80: if (jndiName != null && jndiName.trim().length() > 0)

      { 81: log.info("TestDeployer.undeploy - jndiName is " + jndiName); 82: }

      83: }
      84: }

      Show
      The class loader is undeployed before application undeploy notification for the server shutdown, and become exception when the class that doesn't cache it is called. The exception is not occur beforehand by using the class. TestDeployer.java - example) 72: @Override 73: public void undeploy(DeploymentUnit deploymentUnit) { 74: String deploymentName = deploymentUnit.getSimpleName(); ->: System.out.println("##### TestDeployer.undeploy"); 75: if (archiveMap == null) { 76: System.out.println("##### TestDeployer.undeploy - archiveMap is null"); 77: System.out.println(deploymentName); 78: } else { 79: String jndiName = archiveMap.get(deploymentName); 80: if (jndiName != null && jndiName.trim().length() > 0) { 81: log.info("TestDeployer.undeploy - jndiName is " + jndiName); 82: } 83: } 84: }
    • NEW

    Description

      In the application that receives the deployment notification, ClassNotFoundException might occur by undeploy notification for the server shutdown.

      ERROR [deployer.TestDeployer] (JBoss Shutdown Hook) Error during undeploy: vfszip:/home/EAP/5.1.1/jboss-eap-5.1/jboss-as/server/default/deployers/jboss-ejb3-metrics-deployer.jar/
      java.lang.NoClassDefFoundError: java/lang/System
      at deployer.TestDeployer.undeploy(TestDeployer.java:76)
      at org.jboss.deployers.plugins.deployers.DeployerWrapper.undeploy(DeployerWrapper.java:204)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doUndeploy(DeployersImpl.java:1484)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doUninstallParentLast(DeployersImpl.java:1391)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.uninstall(DeployersImpl.java:1346)
      at org.jboss.dependency.plugins.AbstractControllerContext.uninstall(AbstractControllerContext.java:354)
      at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:1685)
      at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1295)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:831)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:556)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:702)
      at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:676)
      at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
      at org.jboss.system.server.profileservice.repository.ProfileDeployAction.uninstall(ProfileDeployAction.java:95)
      at org.jboss.system.server.profileservice.repository.AbstractProfileAction.uninstall(AbstractProfileAction.java:70)
      at org.jboss.system.server.profileservice.repository.AbstractProfileService.uninstall(AbstractProfileService.java:417)
      at org.jboss.dependency.plugins.AbstractControllerContext.uninstall(AbstractControllerContext.java:354)
      at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:1685)
      at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1295)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:831)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:556)
      at org.jboss.system.server.profileservice.repository.AbstractProfileService.deactivateProfile(AbstractProfileService.java:448)
      at org.jboss.system.server.profileservice.ProfileServiceBootstrap.deactivateProfiles(ProfileServiceBootstrap.java:381)
      at org.jboss.system.server.profileservice.ProfileServiceBootstrap.shutdown(ProfileServiceBootstrap.java:339)
      at org.jboss.bootstrap.AbstractServerImpl.shutdownServer(AbstractServerImpl.java:571)
      at org.jboss.bootstrap.AbstractServerImpl$ShutdownHook.run(AbstractServerImpl.java:909)
      Caused by: java.lang.ClassNotFoundException: Class not found: java.lang.System
      at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:873)
      at org.jboss.classloader.spi.base.BaseClassLoader.doLoadClass(BaseClassLoader.java:502)
      at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:447)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
      ... 26 more
      Caused by: java.lang.IllegalStateException: BaseClassLoader@38f42ac9

      {vfszip:/home/EAP/5.1.1/jboss-eap-5.1/jboss-as/server/default/deploy/TestDeployer.jar/}

      classLoader is not connected to a domain (probably undeployed?) for class java.lang.System
      at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:857)
      ... 29 more

      Attachments

        Activity

          People

            Unassigned Unassigned
            rhn-support-enagai Eiichi Nagai (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: