java.lang.ClassCastException: The field 'singleton' with root name 'CacheManager.singleton' cannot be assigned to a variable of type net/sf/ehcache/CacheManager. This root has a type net.sf.ehcache.CacheManager. Perhaps you have the same root name assigned more than once to variables of different types.

Terracotta | ndhiver | 8 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    Spring, EhCache and Tomcat context restarting

    Terracotta | 8 years ago | ndhiver
    java.lang.ClassCastException: The field 'singleton' with root name 'CacheManager.singleton' cannot be assigned to a variable of type net/sf/ehcache/CacheManager. This root has a type net.sf.ehcache.CacheManager. Perhaps you have the same root name assigned more than once to variables of different types.

    Root Cause Analysis

    1. java.lang.ClassCastException

      The field 'singleton' with root name 'CacheManager.singleton' cannot be assigned to a variable of type net/sf/ehcache/CacheManager. This root has a type net.sf.ehcache.CacheManager. Perhaps you have the same root name assigned more than once to variables of different types.

      at net.sf.ehcache.CacheManager.__tc_getsingleton()
    2. Ehcache
      SingletonEhCacheProvider.start
      1. net.sf.ehcache.CacheManager.__tc_getsingleton(CacheManager.java)
      2. net.sf.ehcache.CacheManager.create(CacheManager.java:370)
      3. net.sf.ehcache.hibernate.SingletonEhCacheProvider.start(SingletonEhCacheProvider.java:123)
      3 frames
    3. Hibernate
      SessionFactoryImpl.<init>
      1. org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:183)
      1 frame
    4. Hibernate
      Configuration.buildSessionFactory
      1. org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
      1 frame
    5. Hibernate
      AbstractSessionFactoryBean.afterPropertiesSet
      1. org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:805)
      2. org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:745)
      3. org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:134)
      3 frames
    6. Spring Beans
      AbstractAutowireCapableBeanFactory_1_674776996_662555251___AW_JoinPoint.proceed
      1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1201)
      2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1171)
      3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.aw$original$_AW_$createBean$_AW_$org_springframework_beans_factory_support_AbstractAutowireCapableBeanFactory(AbstractAutowireCapableBeanFactory.java:425)
      4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory_1_674776996_662555251___AW_JoinPoint.proceed(Unknown Source)
      4 frames
    7. com.tcspring
      GetBeanProtocol.beanNameCflow
      1. com.tcspring.GetBeanProtocol.beanNameCflow(GetBeanProtocol.java:72)
      1 frame
    8. Spring Beans
      DefaultListableBeanFactory.preInstantiateSingletons
      1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory_1_674776996_662555251___AW_JoinPoint.proceed(Unknown Source)
      2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory_1_674776996_662555251___AW_JoinPoint.invoke(Unknown Source)
      3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java)
      4. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
      5. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
      6. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
      7. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
      8. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:284)
      8 frames
    9. Spring Context
      AbstractApplicationContext.refresh
      1. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
      1 frame
    10. Spring
      ContextLoaderListener.contextInitialized
      1. org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244)
      2. org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187)
      3. org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
      3 frames
    11. Glassfish Core
      StandardContext.start
      1. org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
      2. org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
      2 frames
    12. org.apache.catalina
      HTMLManagerServlet.doGet
      1. org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1173)
      2. org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:549)
      3. org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:105)
      3 frames
    13. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
      2. javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      2 frames
    14. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
      5. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
      6. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      7. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
      8. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
      9. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
      9 frames
    15. Grizzly HTTP
      LeaderFollowerWorkerThread.runIt
      1. org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
      2. org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
      3. org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
      4. org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
      4 frames
    16. Tomcat Util
      ThreadPool$ControlRunnable.run
      1. org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
      1 frame
    17. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:595)
      1 frame