HazelCast Azure NoClassDefFoundError: net/minidev/json/JSONAware

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: High
    • None
    • Affects Version/s: 6.2.0
    • Component/s: None
    • Severity 2 - Major

      Issue Summary

      Environment

      Atlassian Bitbucket deployment to Azure via Atlassian Azure templates.

      Steps to Reproduce

      1. Following https://confluence.atlassian.com/bitbucketserver/bitbucket-server-config-properties-776640155.html specifying hazelcast.network.azure.client.id, hazelcast.network.azure.client.secret and hazelcast.network.azure.tenant.id ids causes a java.lang.NoClassDefFoundError error and Bitbucket cluster nodes don't start up.

      Expected Results

      Cluster nodes start up and successfully form a Hazelcast cluster.

      Actual Results

      The below exception is thrown in the atlassian-bitbucket.log file:

      Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hazelcast' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: net/minidev/json/JSONAware
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1745)
              ... 5 common frames omitted
      Caused by: java.lang.NoClassDefFoundError: net/minidev/json/JSONAware
              at java.lang.ClassLoader.defineClass1(Native Method)
              at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
              at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
              at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
              at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
              at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
              at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:93)
              at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
              at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
              at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
              at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
              at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
      
      

      Notes

      (Optional - If Necessary)

      Workaround

      Downloaded latest json-smart jar from maven repo (https://mvnrepository.com/artifact/net.minidev/json-smart/2.3) and copied into /opt/atlassian/bitbucket/latest/app/WEB-INF/lib directory and restarted sucessfully.

            Assignee:
            Chandravadan
            Reporter:
            Stephen Montgomery (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: