Add-on:

Linking for Confluence Server

Question:

Linking Not Enabling After Installation Due to Unsupported Java Version

The following stack trace can be seen in the logs:

Exception in thread "ThreadPoolAsyncTaskExecutor::Thread 6" org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [net.customware.confluence.plugin.linking.counter.ChildCounterListener] for bean with name 'childCounterListener' defined in URL [bundle://201.0:0/META-INF/spring/atlassian-plugins-components.xml]: problem with class file or dependent class; nested exception is java.lang.UnsupportedClassVersionError: net/customware/confluence/plugin/linking/counter/ChildCounterListener : 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:885) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) 
at java.lang.Thread.run(Thread.java:619) 

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.