2 Replies Latest reply on Mar 29, 2013 10:05 PM by Johnny Wern

    Getting exceptions on restarts

    Johnny Wern Newbie

      I have just migrated my application to JBOSS 7.1.1 and I'm running into problems.  Hopefully somebody can help me with my problem. I have finished migrating and my applications seem to be running ok so far. However, when I shut down the server and restart, I get

       

      Caused by: java.lang.NoSuchMethodError: org.jgroups.jmx.JmxConfigurator.registerChannel(Lorg/jgroups/JChannel;Ljavax/management/MBeanServer;Ljava/lang/String;)Lorg/jgroups/jmx/JChannel;

          at org.jboss.cache.TreeCache.registerChannelInJmx(TreeCache.java:6677) [jboss-cache-jdk50.jar:1.4.1.SP4]

          at org.jboss.cache.TreeCache._createService(TreeCache.java:1476) [jboss-cache-jdk50.jar:1.4.1.SP4]

          at org.jboss.cache.TreeCache.createService(TreeCache.java:1388) [jboss-cache-jdk50.jar:1.4.1.SP4]

          at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:245) [jboss-system.jar:4.0.3 (build: CVSTag=JBoss_4_0_3 date=200510042341)]

          at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:173) [jboss-system.jar:4.0.3 (build: CVSTag=JBoss_4_0_3 date=200510042341)]

          at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:265) [jboss-system.jar:4.0.3 (build: CVSTag=JBoss_4_0_3 date=200510042341)]

          at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:181) [jboss-system.jar:4.0.3 (build: CVSTag=JBoss_4_0_3 date=200510042341)]

          at org.hibernate.cache.TreeCacheProvider.start(TreeCacheProvider.java:75) [hibernate3.jar:3.2.5.ga]

          at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:183) [hibernate3.jar:3.2.5.ga]

          at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294) [hibernate3.jar:3.2.5.ga]

          at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915) [hibernate-annotations.jar:3.2.5.ga]

          at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:816) [spring-orm.jar:2.5.2]

          at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:734) [spring-orm.jar:2.5.2]

          at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211) [spring-orm.jar:2.5.2]

          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1333) [spring-beans.jar:2.5.2]

          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1299) [spring-beans.jar:2.5.2]

          ... 23 more

       

      But, if I "Disable" and then "Enable" again, it works again without errors. Does anybody know why this is happening?

      Here's my jboss-deployment-structure:

       

      <jboss-deployment-structure>

       

        <deployment>

              <exclusions> 

                  <module name="org.hibernate" />

                  <module name="org.jgroups" /> 

              </exclusions>

        </deployment>

       

      </jboss-deployment-structure>

       

      Could it be that the jboss-deployment-structure xml file is not read on server restart but rather only on "Enable"? Thanks.

        • 1. Re: Getting exceptions on restarts
          Tomaz Cerar Master

          Hi,

           

          can you post what jars do you have in lib of your application.

          you can get that by running jar tf <name-of-deployment>

           

           

          What is really fishy in your stacktrace is that you have jboss-system.jar from jboss 4.0.3 in your lib.

          This is basicly where your problem originates from, but if you show us your libs we might be able to help you bit more.

           

           

           

          --

          tomaz

          • 2. Re: Getting exceptions on restarts
            Johnny Wern Newbie

            I'm using an older version of that jar because I need MBean support.  Here's the full stack trace. From below, you can see that JBoss 7 jar is calling it. Thanks for replying. Your help is greatly appreciated:

             

            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1302) [spring-beans.jar:2.5.2]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:463) [spring-beans.jar:2.5.2]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:404) [spring-beans.jar:2.5.2]
            at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.6.0_25]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:375) [spring-beans.jar:2.5.2]
            at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:263) [spring-beans.jar:2.5.2]
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:170) [spring-beans.jar:2.5.2]
            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:260) [spring-beans.jar:2.5.2]
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:184) [spring-beans.jar:2.5.2]
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:163) [spring-beans.jar:2.5.2]
            at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:424) [spring-beans.jar:2.5.2]
            at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729) [spring-context.jar:2.5.2]
            at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381) [spring-context.jar:2.5.2]
            at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:254) [spring-web.jar:2.5.2]
            at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:198) [spring-web.jar:2.5.2]
            at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) [spring-web.jar:2.5.2]
            at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) [jbossweb-7.0.13.Final.jar:]
            at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.13.Final.jar:]
            at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
            at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
            at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
            at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_25]
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_25]
            at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_25]

            Caused by: java.lang.NoSuchMethodError: org.jgroups.jmx.JmxConfigurator.registerChannel(Lorg/jgroups/JChannel;Ljavax/management/MBeanServer;Ljava/lang/String;)Lorg/jgroups/jmx/JChannel;

            at org.jboss.cache.TreeCache.registerChannelInJmx(TreeCache.java:6677) [jboss-cache-jdk50.jar:1.4.1.SP4]
            at org.jboss.cache.TreeCache._createService(TreeCache.java:1476) [jboss-cache-jdk50.jar:1.4.1.SP4]
            at org.jboss.cache.TreeCache.createService(TreeCache.java:1388) [jboss-cache-jdk50.jar:1.4.1.SP4]
            at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:245) [jboss-system.jar:4.0.3 (build: CVSTag=JBoss_4_0_3 date=200510042341)]
            at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:173) [jboss-system.jar:4.0.3 (build: CVSTag=JBoss_4_0_3 date=200510042341)]
            at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:265) [jboss-system.jar:4.0.3 (build: CVSTag=JBoss_4_0_3 date=200510042341)]
            at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:181) [jboss-system.jar:4.0.3 (build: CVSTag=JBoss_4_0_3 date=200510042341)]
            at org.hibernate.cache.TreeCacheProvider.start(TreeCacheProvider.java:75) [hibernate3.jar:3.2.5.ga]
            at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:183) [hibernate3.jar:3.2.5.ga]
            at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294) [hibernate3.jar:3.2.5.ga]
            at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915) [hibernate-annotations.jar:3.2.5.ga]
            at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:816) [spring-orm.jar:2.5.2]
            at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:734) [spring-orm.jar:2.5.2]
            at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211) [spring-orm.jar:2.5.2]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1333) [spring-beans.jar:2.5.2]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1299) [spring-beans.jar:2.5.2]
            ... 23 more