[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
ManagementServer problem?  XML
Forum Index -> Ehcache
Author Message
NonSense

neo

Joined: 06/30/2014 00:56:37
Messages: 4
Offline

Hi,

can somebody explain to me what does the following exception mean?
Code:
Caused by: org.hibernate.cache.CacheException: net.sf.ehcache.CacheException: java.lang.RuntimeException: Failed to instantiate ManagementServer.
 	at net.sf.ehcache.hibernate.EhCacheRegionFactory.start(EhCacheRegionFactory.java:89)
 	at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:221)
 	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1341)
 	at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:814)
 	at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:732)
 	at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)
 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
 	... 138 more
 Caused by: net.sf.ehcache.CacheException: java.lang.RuntimeException: Failed to instantiate ManagementServer.
 	at net.sf.ehcache.CacheManager.init(CacheManager.java:419)
 	at net.sf.ehcache.CacheManager.<init>(CacheManager.java:264)
 	at net.sf.ehcache.hibernate.EhCacheRegionFactory.start(EhCacheRegionFactory.java:79)
 	... 145 more
 Caused by: java.lang.RuntimeException: Failed to instantiate ManagementServer.
 	at net.sf.ehcache.management.ManagementServerLoader.register(ManagementServerLoader.java:126)
 	at net.sf.ehcache.CacheManager.initializeManagementService(CacheManager.java:546)
 	at net.sf.ehcache.CacheManager.doInit(CacheManager.java:509)
 	at net.sf.ehcache.CacheManager.init(CacheManager.java:388)
 	... 147 more
 Caused by: java.lang.RuntimeException: Several META-INF/services/net.sf.ehcache.management.ManagementServer found in the classpath, aborting agent start up
 	at net.sf.ehcache.management.ManagementServerLoader.loadOSorEEManagementServer(ManagementServerLoader.java:157)
 	at net.sf.ehcache.management.ManagementServerLoader.register(ManagementServerLoader.java:107)
 	... 150 more

Thx
adahanne

master

Joined: 03/20/2012 23:14:46
Messages: 95
Offline

Hello,
It means that the Management Server, the code that provides a REST API for management and monitoring of your cache managers, found more than 1 file named META-INF/services/net.sf.ehcache.management.ManagementServer in your application classpath - and it's not supposed to happen (it uses underneath a ServiceLoader that determines whether to use the OpenSOurce or Enterprise code)

in a nutshell, it means you have classpath issues : I'd say you have several ehcache jars in your classpath.

If you could list all the jars found in your classpath, and if you provided the version of ehcache embedded, we could help you some more.

And if you are not interested in the Rest API for management and monitoring, you can simply disable it and happily forget this message : in your ehcache.xml :
<managementRESTService enabled="false"/> below your <ehcache ..> tag

NonSense

neo

Joined: 06/30/2014 00:56:37
Messages: 4
Offline

Worked like a charm! Thank you.
 
Forum Index -> Ehcache
Go to:   
Powered by JForum 2.1.7 © JForum Team