java.lang.NoSuchMethodError: net.sf.ehcache.distribution.EventMessage.<init>(ILjava/io/Serializable;Lnet/sf/ehcache/Element;)V

Terracotta Project Issue Tracker | Ilya Kikoin | 2 years ago
  1. 0

    These are the relevant parts of my ehcache.xml: <cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.jgroups.JGroupsCacheManagerPeerProviderFactory" properties="channel=ehcache^connect=UDP(mcast_addr=231.12.21.132;mcast_port=45566;ip_ttl=32; mcast_send_buf_size=150000;mcast_recv_buf_size=80000): PING(timeout=2000;num_initial_members=6): MERGE2(min_interval=5000;max_interval=10000): FD_SOCK:VERIFY_SUSPECT(timeout=1500): pbcast.NAKACK(gc_lag=10;retransmit_timeout=3000): UNICAST(timeout=5000): pbcast.STABLE(desired_avg_gossip=20000): FRAG: pbcast.GMS(join_timeout=5000;join_retry_timeout=2000;shun=false;print_local_addr=false)" propertySeparator="^" /> <cache name="sampleRepicatedCache2" maxEntriesLocalHeap="10" eternal="false" timeToIdleSeconds="100" timeToLiveSeconds="100"> <cacheEventListenerFactory class="net.sf.ehcache.distribution.jgroups.JGroupsCacheReplicatorFactory" properties="replicateAsynchronously=true, replicatePuts=true, replicateUpdates=true, replicateUpdatesViaCopy=false, replicateRemovals=true,asynchronousReplicationIntervalMillis=1000"/> </cache> The synchronization crashes with this: Exception in thread "main" java.lang.NoSuchMethodError: net.sf.ehcache.distribution.EventMessage.<init>(ILjava/io/Serializable;Lnet/sf/ehcache/Element;)V at net.sf.ehcache.distribution.jgroups.JGroupEventMessage.<init>(JGroupEventMessage.java:86) at net.sf.ehcache.distribution.jgroups.JGroupsCacheReplicator.replicatePutNotification(JGroupsCacheReplicator.java:203) at net.sf.ehcache.distribution.jgroups.JGroupsCacheReplicator.notifyElementPut(JGroupsCacheReplicator.java:144) at net.sf.ehcache.event.RegisteredEventListeners.internalNotifyElementPut(RegisteredEventListeners.java:192) at net.sf.ehcache.event.RegisteredEventListeners.notifyElementPut(RegisteredEventListeners.java:170) at net.sf.ehcache.Cache.notifyPutInternalListeners(Cache.java:1631) at net.sf.ehcache.Cache.putInternal(Cache.java:1601) at net.sf.ehcache.Cache.put(Cache.java:1526) at net.sf.ehcache.Cache.put(Cache.java:1491) I checked the source code of these classes, net.sf.ehcache.distribution.jgroups.JGroupEventMessage constructor calls the net.sf.ehcache.distribution.EventMessage constructor: public JGroupEventMessage(int event, Serializable key, Element element, String cacheName) { super(event, key, element); this.cacheName = cacheName; this.asyncTime = -1; } which is: public EventMessage(Ehcache cache, Serializable key) { this.cache = cache; this.key = key; } apparently, this can't work. Just to be sure, I extracted the class files and decompiled them, and that is the code.

    Terracotta Project Issue Tracker | 2 years ago | Ilya Kikoin
    java.lang.NoSuchMethodError: net.sf.ehcache.distribution.EventMessage.<init>(ILjava/io/Serializable;Lnet/sf/ehcache/Element;)V
  2. 0

    These are the relevant parts of my ehcache.xml: <cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.jgroups.JGroupsCacheManagerPeerProviderFactory" properties="channel=ehcache^connect=UDP(mcast_addr=231.12.21.132;mcast_port=45566;ip_ttl=32; mcast_send_buf_size=150000;mcast_recv_buf_size=80000): PING(timeout=2000;num_initial_members=6): MERGE2(min_interval=5000;max_interval=10000): FD_SOCK:VERIFY_SUSPECT(timeout=1500): pbcast.NAKACK(gc_lag=10;retransmit_timeout=3000): UNICAST(timeout=5000): pbcast.STABLE(desired_avg_gossip=20000): FRAG: pbcast.GMS(join_timeout=5000;join_retry_timeout=2000;shun=false;print_local_addr=false)" propertySeparator="^" /> <cache name="sampleRepicatedCache2" maxEntriesLocalHeap="10" eternal="false" timeToIdleSeconds="100" timeToLiveSeconds="100"> <cacheEventListenerFactory class="net.sf.ehcache.distribution.jgroups.JGroupsCacheReplicatorFactory" properties="replicateAsynchronously=true, replicatePuts=true, replicateUpdates=true, replicateUpdatesViaCopy=false, replicateRemovals=true,asynchronousReplicationIntervalMillis=1000"/> </cache> The synchronization crashes with this: Exception in thread "main" java.lang.NoSuchMethodError: net.sf.ehcache.distribution.EventMessage.<init>(ILjava/io/Serializable;Lnet/sf/ehcache/Element;)V at net.sf.ehcache.distribution.jgroups.JGroupEventMessage.<init>(JGroupEventMessage.java:86) at net.sf.ehcache.distribution.jgroups.JGroupsCacheReplicator.replicatePutNotification(JGroupsCacheReplicator.java:203) at net.sf.ehcache.distribution.jgroups.JGroupsCacheReplicator.notifyElementPut(JGroupsCacheReplicator.java:144) at net.sf.ehcache.event.RegisteredEventListeners.internalNotifyElementPut(RegisteredEventListeners.java:192) at net.sf.ehcache.event.RegisteredEventListeners.notifyElementPut(RegisteredEventListeners.java:170) at net.sf.ehcache.Cache.notifyPutInternalListeners(Cache.java:1631) at net.sf.ehcache.Cache.putInternal(Cache.java:1601) at net.sf.ehcache.Cache.put(Cache.java:1526) at net.sf.ehcache.Cache.put(Cache.java:1491) I checked the source code of these classes, net.sf.ehcache.distribution.jgroups.JGroupEventMessage constructor calls the net.sf.ehcache.distribution.EventMessage constructor: public JGroupEventMessage(int event, Serializable key, Element element, String cacheName) { super(event, key, element); this.cacheName = cacheName; this.asyncTime = -1; } which is: public EventMessage(Ehcache cache, Serializable key) { this.cache = cache; this.key = key; } apparently, this can't work. Just to be sure, I extracted the class files and decompiled them, and that is the code.

    Terracotta Project Issue Tracker | 2 years ago | Ilya Kikoin
    java.lang.NoSuchMethodError: net.sf.ehcache.distribution.EventMessage.<init>(ILjava/io/Serializable;Lnet/sf/ehcache/Element;)V
  3. 0

    Error Integreting Icefaces + Acegi

    Icesoft | 7 years ago | xsiyez
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationProcessingFilter' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'authenticationManager' while setting bean property 'authenticationManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'daoAuthenticationProvider' while setting bean property 'providers' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'daoAuthenticationProvider' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot create inner bean 'org.acegisecurity.providers.dao.cache.EhCacheBasedUserCache#1f78040' of type [org.acegisecurity.providers.dao.cache.EhCacheBasedUserCache] while setting bean property 'userCache'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.acegisecurity.providers.dao.cache.EhCacheBasedUserCache#1f78040' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot create inner bean 'org.springframework.cache.ehcache.EhCacheFactoryBean#1171b26' of type [org.springframework.cache.ehcache.EhCacheFactoryBean] while setting bean property 'cache'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cache.ehcache.EhCacheFactoryBean#1171b26' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: net.sf.ehcache.Cache.<init>(Ljava/lang/String;ILnet/sf/ehcache/store/MemoryStoreEvictionPolicy;ZLjava/lang/String;ZJJZJLnet/sf/ehcache/event/RegisteredEventListeners;Lnet/sf/ehcache/bootstrap/BootstrapCacheLoader;I)V
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    spring security 3配置ACL时报java.lang.NoSuchMethodError: net.sf.ehcache.Cache.<init> - '水' 库 - 博客频道 - CSDN.NET

    csdn.net | 1 year ago
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'aclCache' defined in ServletContext resource [/WEB-INF/applicationContext-security-acl.xml]: Cannot resolve reference to bean 'aclEhCache' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'aclEhCache' defined in ServletContext resource [/WEB-INF/applicationContext-security-acl.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: net.sf.ehcache.Cache.<init>(Ljava/lang/String;ILnet/sf/ehcache/store/MemoryStoreEvictionPolicy;ZLjava/lang/String;ZJJZJLnet/sf/ehcache/event/RegisteredEventListeners;Lnet/sf/ehcache/bootstrap/BootstrapCacheLoader;II)V
  6. 0

    Messages posted by rune66

    terracotta.org | 11 months ago
    java.lang.NoSuchMethodError: net.sf.ehcache.Ehcache.getStatistics()Lnet/sf/ehcache/Statistics;

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NoSuchMethodError

      net.sf.ehcache.distribution.EventMessage.<init>(ILjava/io/Serializable;Lnet/sf/ehcache/Element;)V

      at net.sf.ehcache.distribution.jgroups.JGroupEventMessage.<init>()
    2. JGroups Replication
      JGroupsCacheReplicator.notifyElementPut
      1. net.sf.ehcache.distribution.jgroups.JGroupEventMessage.<init>(JGroupEventMessage.java:86)
      2. net.sf.ehcache.distribution.jgroups.JGroupsCacheReplicator.replicatePutNotification(JGroupsCacheReplicator.java:203)
      3. net.sf.ehcache.distribution.jgroups.JGroupsCacheReplicator.notifyElementPut(JGroupsCacheReplicator.java:144)
      3 frames
    3. Ehcache
      Cache.put
      1. net.sf.ehcache.event.RegisteredEventListeners.internalNotifyElementPut(RegisteredEventListeners.java:192)
      2. net.sf.ehcache.event.RegisteredEventListeners.notifyElementPut(RegisteredEventListeners.java:170)
      3. net.sf.ehcache.Cache.notifyPutInternalListeners(Cache.java:1631)
      4. net.sf.ehcache.Cache.putInternal(Cache.java:1601)
      5. net.sf.ehcache.Cache.put(Cache.java:1526)
      6. net.sf.ehcache.Cache.put(Cache.java:1491)
      6 frames