• Bug
  • Status: Open
  • 0 Showstopper
  • Resolution:
  • ehcache,ehcache-core
  • infrastructure group
  • Reporter: pdjohe
  • June 24, 2013
  • 0
  • Watchers: 6
  • December 20, 2013

Description

The version 2.7.1 of EHCache does not bundle the org.terracotta.statistics.* package (nor org.terracotta.context…, org.terracotta.modules…). Due to this the following exception is thrown:

Caused by: net.sf.ehcache.CacheException: java.lang.NoClassDefFoundError: org/terracotta/statistics/StatisticsManager
        at net.sf.ehcache.CacheManager.init(CacheManager.java:423) ~[ehcache-core-2.7.1.jar:2.7.1]
        at net.sf.ehcache.CacheManager.<init>(CacheManager.java:266) ~[ehcache-core-2.7.1.jar:2.7.1]
        at net.sf.ehcache.CacheManager.newInstance(CacheManager.java:1082) ~[ehcache-core-2.7.1.jar:2.7.1]
        at net.sf.ehcache.CacheManager.newInstance(CacheManager.java:1026) ~[ehcache-core-2.7.1.jar:2.7.1]
        at net.sf.ehcache.CacheManager.create(CacheManager.java:1001) ~[ehcache-core-2.7.1.jar:2.7.1]
        at org.springframework.cache.ehcache.EhCacheManagerFactoryBean.afterPropertiesSet(EhCacheManagerFactoryBean.java:136) ~[spring-context-support-3.2.3.RELEASE.jar:3.2.3.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1541) ~[spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1479) ~[spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
        ... 102 common frames omitted
Caused by: java.lang.NoClassDefFoundError: org/terracotta/statistics/StatisticsManager
        at net.sf.ehcache.statistics.StatisticBuilder$OperationStatisticBuilder.build(StatisticBuilder.java:79) ~[ehcache-core-2.7.1.jar:2.7.1]
        at net.sf.ehcache.Cache.<init>(Cache.java:260) ~[ehcache-core-2.7.1.jar:2.7.1]
        at net.sf.ehcache.config.ConfigurationHelper.createCache(ConfigurationHelper.java:296) ~[ehcache-core-2.7.1.jar:2.7.1]
        at net.sf.ehcache.config.ConfigurationHelper.createDefaultCache(ConfigurationHelper.java:219) ~[ehcache-core-2.7.1.jar:2.7.1]
        at net.sf.ehcache.CacheManager.configure(CacheManager.java:762) ~[ehcache-core-2.7.1.jar:2.7.1]
        at net.sf.ehcache.CacheManager.doInit(CacheManager.java:463) ~[ehcache-core-2.7.1.jar:2.7.1]
        at net.sf.ehcache.CacheManager.init(CacheManager.java:392) ~[ehcache-core-2.7.1.jar:2.7.1]

The previous 2.7.0 version had these classes present.

Our maven setup must is :

<dependency>
	<groupId>net.sf.ehcache</groupId>
	<artifactId>ehcache</artifactId>
	<version>2.7.0</version>
	<exclusions>
		<exclusion>
			<groupId>net.sf.ehcache.internal</groupId>
			<artifactId>ehcache-terracotta-bootstrap</artifactId>
		</exclusion>
		<exclusion>
			<groupId>org.terracotta.internal</groupId>
			<artifactId>statistics</artifactId>
		</exclusion>
	</exclusions>
</dependency>

as the internal jar files are not publicly available.

Comments

Louis Jacomet Jacomet 2013-06-24

I had a quick look in Maven Central. * 2.7.0 was 6.4M * 2.7.1 is 5.5K Something went very wrong with the release. The published jar does not contain a single class file.

brw 2013-06-24

More info…

Per Hung: “Based on Louis’ comment, I believe 2.7.1 jar was pushed without profile -P fullmode

This is an important issue since we now have a broken release on Maven central.”

brw 2013-06-24

EHC-1044 is related to the way artifacts are deployed to Maven Central. This was corrected this today under INT-2209 by adding the “fullmode” profile to the mvn deploy task. A new RC build is NOT needed as the RC is correct.

I would still like to figure out how to test this so we can avoid these issues in the future.