현상 : java.lang.NoSuchFieldError: attributes 오류 발생

 

원인 : StandardSession 내 attributes 타입 변경

  • 7.0.70 미만 버전 (~7.0.69)
protected Map<String, Object> attributes = new ConcurrentHashMap();
  • 7.0.70 이상 버전 ~ 
protected ConcurrentMap<String, Object> attributes = new ConcurrentHashMap();

 

사례 : https://github.com/magro/memcached-session-manager/releases

1.9.3
@magro magro released this on 7 Jun · 21 commits to master since this release

1.9.3 makes msm compatible with tomcat 8.0.35+ which changed StandardSession.attributes fromMap to ConcurrentMap, which caused a java.lang.NoSuchFieldError: attributes when attributes
were accessed from MemcachedBackupSession (as reported in #301 and #297).

Here's the complete list of changes from 1.9.2 to 1.9.3.

(Tomcat 8 역시 8.0.33에서 8.0.35로 가면서 Map -> ConcurrentMap)