1 Reply Latest reply on Feb 23, 2004 4:09 PM by ian

    ClassLoader woes & getting hard VM Crash on 3.2.1

    ian Newbie

      Env: Win2K , JBoss 3.2.1, JDK 1.4.2

      I have 2 ears being deployed.

      EAR01.ear
       + war01.war
       + sharedservlet.jar
      
      
      EAR02.ear
       + war02.war
       + sharedservlet.jar



      1. Both ears contained the same servlet.class deployed under different URI.
      2. There's a sharedservlet.jar file in both ears which contained a number of EJBs and servlet classes.


      In theory the 2 jars don't share anything except for classpath stuff correct?

      I am getting a hard VM crash with the following condition.

      Deploy any one of the ear on its own, No Crash

      Deploy EAR02.ear first then EAR01.ear --- OK no crash here
      Deploy EAR01.ear first then EAR02.ear --- hard VM crash below.

      Thanks.


      Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x81B7DA3
      Function=JVM_RegisterPerfMethods+0x2C4C3
      Library=D:\hawkCVS\Kenya\Install\JDK\jre\bin\server\jvm.dll
      
      Current Java thread:
       at java.lang.ClassLoader.defineClass0(Native Method)
       at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
       at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
       at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
       at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
       at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
       at java.security.AccessController.doPrivileged(Native Method)
       at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
       at org.jboss.mx.loading.UnifiedClassLoader.findClass(UnifiedClassLoader.java:401)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
       - locked <0x1243c858> (a org.jboss.mx.loading.UnifiedClassLoader3)
       at org.jboss.mx.loading.UnifiedClassLoader.loadClassLocally(UnifiedClassLoader.java:242)
       at org.jboss.mx.loading.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:114)
       at org.jboss.mx.loading.LoadMgr.nextTask(LoadMgr.java:281)
       at org.jboss.mx.loading.UnifiedClassLoader3.loadClass(UnifiedClassLoader3.java:181)
       - locked <0x1243c858> (a org.jboss.mx.loading.UnifiedClassLoader3)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
       at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
       - locked <0x1243c858> (a org.jboss.mx.loading.UnifiedClassLoader3)
       at java.lang.ClassLoader.defineClass0(Native Method)
       at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
       at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
       at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
       at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
       at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
       at java.security.AccessController.doPrivileged(Native Method)
       at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
       at org.jboss.mx.loading.UnifiedClassLoader.findClass(UnifiedClassLoader.java:401)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
       - locked <0x1243c858> (a org.jboss.mx.loading.UnifiedClassLoader3)
       at org.jboss.mx.loading.UnifiedClassLoader.loadClassLocally(UnifiedClassLoader.java:242)
       at org.jboss.mx.loading.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:114)
       at org.jboss.mx.loading.LoadMgr.nextTask(LoadMgr.java:281)
       at org.jboss.mx.loading.UnifiedClassLoader3.loadClass(UnifiedClassLoader3.java:181)
       - locked <0x123715d0> (a org.jboss.mx.loading.UnifiedClassLoader3)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
       at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
       - locked <0x123715d0> (a org.jboss.mx.loading.UnifiedClassLoader3)
       at java.lang.ClassLoader.defineClass0(Native Method)
       at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
       at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
       at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
       at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
       at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
       at java.security.AccessController.doPrivileged(Native Method)
       at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
       at org.jboss.mx.loading.UnifiedClassLoader.findClass(UnifiedClassLoader.java:401)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
       - locked <0x123715d0> (a org.jboss.mx.loading.UnifiedClassLoader3)
       at org.jboss.mx.loading.UnifiedClassLoader.loadClassLocally(UnifiedClassLoader.java:242)
       at org.jboss.mx.loading.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:114)
       at org.jboss.mx.loading.LoadMgr.nextTask(LoadMgr.java:281)
       at org.jboss.mx.loading.UnifiedClassLoader3.loadClass(UnifiedClassLoader3.java:181)
       - locked <0x123715d0> (a org.jboss.mx.loading.UnifiedClassLoader3)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
       at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
       - locked <0x123715d0> (a org.jboss.mx.loading.UnifiedClassLoader3)
       at java.lang.ClassLoader.defineClass0(Native Method)
       at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
       at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
       at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
       at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
       at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
       at java.security.AccessController.doPrivileged(Native Method)
       at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
       at org.jboss.mx.loading.UnifiedClassLoader.findClass(UnifiedClassLoader.java:401)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
       - locked <0x123715d0> (a org.jboss.mx.loading.UnifiedClassLoader3)
       at org.jboss.mx.loading.UnifiedClassLoader.loadClassLocally(UnifiedClassLoader.java:242)
       at org.jboss.mx.loading.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:114)
       at org.jboss.mx.loading.LoadMgr.nextTask(LoadMgr.java:281)
       at org.jboss.mx.loading.UnifiedClassLoader3.loadClass(UnifiedClassLoader3.java:181)
       - locked <0x123715d0> (a org.jboss.mx.loading.UnifiedClassLoader3)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
       at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
       - locked <0x123715d0> (a org.jboss.mx.loading.UnifiedClassLoader3)
       at java.lang.ClassLoader.defineClass0(Native Method)
       at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
       at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
       at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
       at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
       at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
       at java.security.AccessController.doPrivileged(Native Method)
       at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
       at org.jboss.mx.loading.UnifiedClassLoader.findClass(UnifiedClassLoader.java:401)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
       - locked <0x123715d0> (a org.jboss.mx.loading.UnifiedClassLoader3)
       at org.jboss.mx.loading.UnifiedClassLoader.loadClassLocally(UnifiedClassLoader.java:242)
       at org.jboss.mx.loading.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:114)
       at org.jboss.mx.loading.LoadMgr.nextTask(LoadMgr.java:281)
       at org.jboss.mx.loading.UnifiedClassLoader3.loadClass(UnifiedClassLoader3.java:181)
       - locked <0x1243c858> (a org.jboss.mx.loading.UnifiedClassLoader3)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
       - locked <0x10690168> (a java.net.FactoryURLClassLoader)
       at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:575)
       - locked <0x10690168> (a java.net.FactoryURLClassLoader)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
       at org.mortbay.http.ContextLoader.loadClass(ContextLoader.java:214)
       - locked <0x10695470> (a org.mortbay.http.ContextLoader)
       at org.mortbay.http.ContextLoader.loadClass(ContextLoader.java:198)
       - locked <0x10695470> (a org.mortbay.http.ContextLoader)
       at org.mortbay.http.HttpContext.loadClass(HttpContext.java:1317)
       - locked <0x10690048> (a org.jboss.jetty.JBossWebApplicationContext)
       at org.mortbay.jetty.servlet.Holder.start(Holder.java:165)
       at org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:198)
       at org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.java:436)
       at org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplicationHandler.java:150)
       at org.mortbay.jetty.servlet.WebApplicationContext.start(WebApplicationContext.java:442)
       at org.mortbay.j2ee.J2EEWebApplicationContext.start(J2EEWebApplicationContext.java:85)
       at org.jboss.jetty.JBossWebApplicationContext.start(JBossWebApplicationContext.java:89)
       at org.jboss.jetty.Jetty.deploy(Jetty.java:331)
       at org.jboss.jetty.JettyService.performDeploy(JettyService.java:242)
       at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:357)
       - locked <0x11e5c8c0> (a org.jboss.jetty.JettyService)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
       at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
       at $Proxy7.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476)
       - locked <0x11d4bf10> (a org.jboss.deployment.scanner.URLDeploymentScanner)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:20
      0)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:273)
       - locked <0x11d42f68> (a org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread)
       at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:966)
       at $Proxy0.start(Unknown Source)
       at org.jboss.system.ServiceController.start(ServiceController.java:392)
       - locked <0x11c8fd38> (a org.jboss.system.ServiceController)
       at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
       at $Proxy5.start(Unknown Source)
       at org.jboss.deployment.SARDeployer.start(SARDeployer.java:226)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:597)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
       at $Proxy6.deploy(Unknown Source)
       at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:365)
       at org.jboss.system.server.ServerImpl.start(ServerImpl.java:272)
       at org.jboss.Main.boot(Main.java:150)
       at org.jboss.Main$1.run(Main.java:388)
       at java.lang.Thread.run(Thread.java:534)
      
      Dynamic libraries:
      0x00400000 - 0x00406000 D:\hawkCVS\Kenya\Install\JDK\bin\java.exe
      0x77F80000 - 0x77FFB000 C:\WINNT\system32\ntdll.dll
      0x7C2D0000 - 0x7C332000 C:\WINNT\system32\ADVAPI32.dll
      0x7C570000 - 0x7C623000 C:\WINNT\system32\KERNEL32.DLL
      0x77D30000 - 0x77D9E000 C:\WINNT\system32\RPCRT4.DLL
      0x78000000 - 0x78045000 C:\WINNT\system32\MSVCRT.dll
      0x08000000 - 0x082A7000 D:\hawkCVS\Kenya\Install\JDK\jre\bin\server\jvm.dll
      0x77E10000 - 0x77E6F000 C:\WINNT\system32\USER32.dll
      0x77F40000 - 0x77F79000 C:\WINNT\system32\GDI32.dll
      0x77570000 - 0x775A0000 C:\WINNT\system32\WINMM.dll
      0x10000000 - 0x10007000 D:\hawkCVS\Kenya\Install\JDK\jre\bin\hpi.dll
      0x008F0000 - 0x008FE000 D:\hawkCVS\Kenya\Install\JDK\jre\bin\verify.dll
      0x00900000 - 0x00918000 D:\hawkCVS\Kenya\Install\JDK\jre\bin\java.dll
      0x00920000 - 0x0092D000 D:\hawkCVS\Kenya\Install\JDK\jre\bin\zip.dll
      0x24A00000 - 0x24A0F000 D:\hawkCVS\Kenya\Install\JDK\jre\bin\net.dll
      0x75030000 - 0x75044000 C:\WINNT\system32\WS2_32.dll
      0x75020000 - 0x75028000 C:\WINNT\system32\WS2HELP.DLL
      0x782C0000 - 0x782CC000 C:\WINNT\System32\rnr20.dll
      0x77980000 - 0x779A4000 C:\WINNT\system32\DNSAPI.DLL
      0x75050000 - 0x75058000 C:\WINNT\system32\WSOCK32.DLL
      0x77340000 - 0x77353000 C:\WINNT\system32\iphlpapi.dll
      0x77520000 - 0x77525000 C:\WINNT\system32\ICMP.DLL
      0x77320000 - 0x77337000 C:\WINNT\system32\MPRAPI.DLL
      0x75150000 - 0x7515F000 C:\WINNT\system32\SAMLIB.DLL
      0x75170000 - 0x751BF000 C:\WINNT\system32\NETAPI32.DLL
      0x7C340000 - 0x7C34F000 C:\WINNT\system32\SECUR32.DLL
      0x751C0000 - 0x751C6000 C:\WINNT\system32\NETRAP.DLL
      0x77950000 - 0x7797A000 C:\WINNT\system32\WLDAP32.DLL
      0x77A50000 - 0x77B3C000 C:\WINNT\system32\OLE32.DLL
      0x779B0000 - 0x77A4B000 C:\WINNT\system32\OLEAUT32.DLL
      0x773B0000 - 0x773DF000 C:\WINNT\system32\ACTIVEDS.DLL
      0x77380000 - 0x773A3000 C:\WINNT\system32\ADSLDPC.DLL
      0x77830000 - 0x7783E000 C:\WINNT\system32\RTUTILS.DLL
      0x77880000 - 0x7790E000 C:\WINNT\system32\SETUPAPI.DLL
      0x7C0F0000 - 0x7C151000 C:\WINNT\system32\USERENV.DLL
      0x774E0000 - 0x77513000 C:\WINNT\system32\RASAPI32.DLL
      0x774C0000 - 0x774D1000 C:\WINNT\system32\RASMAN.DLL
      0x77530000 - 0x77552000 C:\WINNT\system32\TAPI32.DLL
      0x71710000 - 0x71794000 C:\WINNT\system32\COMCTL32.DLL
      0x70A70000 - 0x70AD5000 C:\WINNT\system32\SHLWAPI.DLL
      0x77360000 - 0x77379000 C:\WINNT\system32\DHCPCSVC.DLL
      0x777E0000 - 0x777E8000 C:\WINNT\System32\winrnr.dll
      0x777F0000 - 0x777F5000 C:\WINNT\system32\rasadhlp.dll
      0x74FD0000 - 0x74FEE000 C:\WINNT\system32\msafd.dll
      0x75010000 - 0x75017000 C:\WINNT\System32\wshtcpip.dll
      0x7CA00000 - 0x7CA23000 C:\WINNT\system32\rsaenh.dll
      0x77440000 - 0x774B8000 C:\WINNT\system32\CRYPT32.dll
      0x77430000 - 0x77440000 C:\WINNT\system32\MSASN1.DLL
      0x77920000 - 0x77943000 C:\WINNT\system32\imagehlp.dll
      0x72A00000 - 0x72A2D000 C:\WINNT\system32\DBGHELP.dll
      0x690A0000 - 0x690AB000 C:\WINNT\system32\PSAPI.DLL
      
      Heap at VM Abort:
      Heap
       def new generation total 6656K, used 4705K [0x10010000, 0x10740000, 0x11c80000)
       eden space 5952K, 77% used [0x10010000, 0x1048e638, 0x105e0000)
       from space 704K, 14% used [0x10690000, 0x106aa120, 0x10740000)
       to space 704K, 0% used [0x105e0000, 0x105e0000, 0x10690000)
       tenured generation total 58304K, used 8556K [0x11c80000, 0x15570000, 0x20010000)
       the space 58304K, 14% used [0x11c80000, 0x124db3f0, 0x124db400, 0x15570000)
       compacting perm gen total 16384K, used 14822K [0x20010000, 0x21010000, 0x24010000)
       the space 16384K, 90% used [0x20010000, 0x20e89910, 0x20e89a00, 0x21010000)
      
      Local Time = Mon Feb 23 13:05:14 2004
      Elapsed Time = 37
      #
      # HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION
      # Error ID : 4F530E43505002EF
      # Please report this error at
      # http://java.sun.com/cgi-bin/bugreport.cgi
      #
      # Java VM: Java HotSpot(TM) Server VM (1.4.2-b28 mixed mode)
      #
      # An error report file has been saved as hs_err_pid2364.log.
      # Please refer to the file for further information.
      #



        • 1. Re: ClassLoader woes & getting hard VM Crash on 3.2.1
          ian Newbie

          OK never mind. Just read up on the UnifiedClassLoader3 & UnifiedLoaderRepository3 stuff and it looks like I need to enable HierarchyLoaderRepository3

          adding the snippet below to METAINF/jboss-app.xml seems to solve the problem.

          <jboss-app>
          <loader-repository>
          something.com:loader=EAR01.ear
          </loader-repository>

          </jboss-app>