Scaffolding Not Enabling After Installation Due to Unsupported Java Version

Add-on:Scaffolding
Question:

Scaffolding Not Enabling After Installation Due to Unsupported Java Version

The following stack trace can be seen in the logs:

2014-10-13 14:23:35,539 ERROR [ThreadPoolAsyncTaskExecutor::Thread 37][plugin.osgi.factory.OsgiPlugin] onPluginContainerFailed Unable to start the plugin container for plugin net.customware.confluence.plugin.scaffolding
org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class[net.customware.confluence.plugin.scaffolding.admin.AdminConfiguration] for bean with name 'adminConfiguration' defined in URL
[bundle://211.0:1/net/customware/confluence/plugin/scaffolding/admin/AdminConfiguration.class]:

problem with class file or dependent class; nested exception is java.lang.UnsupportedClassVersionError: net/customware/confluence/plugin/scaffolding/admin/AdminConfiguration : Unsupported major.minor version 51.0
at
org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1144)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:524)
at
org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1177)
at
org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:758)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:422)
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)
at
org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
at
org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
...

Answer:

The error you received most probably relates to the Java version that your instance is running on. We built our add-ons in accordance with the current supported Java platform by Atlassian. More information can be read here: Supported Platforms

  1. First, check the Java version your instance is running on:

    java -version
  2.  If the version you're running is lesser than what is recommended by Atlassian in the Supported Platforms page, upgrade your Java to the advised version.