0 Replies Latest reply on Apr 4, 2012 5:02 PM by Tim Eapen

    JBoss Hangs When Instantiating Spring Beans

    Tim Eapen Newbie

      I have an application that currently deploys successfully in Tomcat.  I am trying to deploy it in a JBoss 5.1.0.GA  container. When I do this, JBoss reads Spring's configuration and tries to pre-instantiate all of the defined singletons. 

       

       

      We see the following line in the log:

       

          INFO  [main] support.DefaultListableBeanFactory - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@50f02987: defining beans
      

       

      JBoss then just hangs.  There are no exceptions in the server logs.

       

       

      The following thread dump seems to indicate a thread is halted with some kind of class loading issue.

       

       

      Thread Dump

       

       

          main" prio=6 tid=0x0000000005e80800 nid=0x444 runnable [0x0000000007309000]
              java.lang.Thread.State: RUNNABLE
                at java.lang.ClassLoader.defineClass1(Native Method)
                at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
                at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
                at org.jboss.classloader.spi.base.BaseClassLoader.access$200(BaseClassLoader.java:63)
                at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:572)
                at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:532)
                at java.security.AccessController.doPrivileged(Native Method)
                at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:530)
                - locked <0x00000000c60d7e80> (a org.jboss.classloader.spi.base.BaseClassLoader)
                at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:507)
                at org.jboss.classloader.spi.base.BaseDelegateLoader.loadClass(BaseDelegateLoader.java:134)
                at org.jboss.classloader.spi.base.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:452)
                at org.jboss.classloader.spi.base.ClassLoaderManager.nextTask(ClassLoaderManager.java:251)
                at org.jboss.classloader.spi.base.ClassLoaderManager.process(ClassLoaderManager.java:150)
                at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:265)
                at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1119)
                at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:798)
                at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:441)
                - locked <0x00000000c60d7e80> (a org.jboss.classloader.spi.base.BaseClassLoader)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
                at java.lang.Class.getDeclaredMethods0(Native Method)
                at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
                at java.lang.Class.privateGetPublicMethods(Class.java:2547)
                at java.lang.Class.getMethods(Class.java:1410)
                at java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1284)
                - locked <0x00000000c1eb0aa0> (a java.lang.Object)
                at java.beans.Introspector.getTargetMethodInfo(Introspector.java:1158)
                at java.beans.Introspector.getBeanInfo(Introspector.java:408)
                at java.beans.Introspector.getBeanInfo(Introspector.java:167)
                at java.beans.Introspector.getBeanInfo(Introspector.java:230)
                at java.beans.Introspector.<init>(Introspector.java:389)
                at java.beans.Introspector.getBeanInfo(Introspector.java:167)
                at java.beans.Introspector.getBeanInfo(Introspector.java:230)
                at java.beans.Introspector.<init>(Introspector.java:389)
                at java.beans.Introspector.getBeanInfo(Introspector.java:167)
                at org.springframework.beans.CachedIntrospectionResults.<init>(CachedIntrospectionResults.java:224)
                at org.springframework.beans.CachedIntrospectionResults.forClass(CachedIntrospectionResults.java:149)
                at org.springframework.beans.BeanWrapperImpl.getCachedIntrospectionResults(BeanWrapperImpl.java:305)
                at org.springframework.beans.BeanWrapperImpl.getPropertyDescriptors(BeanWrapperImpl.java:312)
                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.filterPropertyDescriptorsForDependencyCheck(AbstractAutowireCapableBeanFactory.java:1208)
                - locked <0x00000000cc79c448> (a java.util.HashMap)
                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1069)
                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
      
      

       

      Does anyone have any insight?