diff --git a/hazelcast/src/test/java/com/hazelcast/cache/jsr/JsrTestUtil.java b/hazelcast/src/test/java/com/hazelcast/cache/jsr/JsrTestUtil.java
index <HASH>..<HASH> 100644
--- a/hazelcast/src/test/java/com/hazelcast/cache/jsr/JsrTestUtil.java
+++ b/hazelcast/src/test/java/com/hazelcast/cache/jsr/JsrTestUtil.java
@@ -19,6 +19,7 @@ package com.hazelcast.cache.jsr;
 import com.hazelcast.core.Hazelcast;
 import com.hazelcast.core.HazelcastInstanceNotActiveException;
 import com.hazelcast.instance.HazelcastInstanceFactory;
+import com.hazelcast.util.EmptyStatement;
 
 import javax.cache.Caching;
 import javax.cache.spi.CachingProvider;
@@ -162,6 +163,8 @@ public final class JsrTestUtil {
 
             // return the map size
             return count;
+        } catch (NoClassDefFoundError e) {
+            return -1;
         } catch (Exception e) {
             return -1;
         }
Fixed NoClassDefFoundError in JsrTestUtil.getCachingProviderRegistrySize()