Jira Data Center - Compatibility Library for Scheduling

Sa Kan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 31, 2017

I am trying to add some Data Center functionality for my plugin for Scheduling. 

1. First I tried with  atlassian-scheduler-api along with JobRunner and it works perfect.

2. Second, I tried with atlassian-scheduler-compat and I get immediate exception complaining about a null pointer. But it doesn't exactly say what and where. 

It happens at the registration of my JobHandler.  Any idea would be greatly appreciated.

compatibilityPluginScheduler.registerJobHandler(MyScheduledJob.JOB_HANDLER_KEY, myScheduledJobImpl);

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myScheduler' defined in URL [bundle://225.0:0/META-INF/spring/atlassian-plugins-components.xml]: Invocation of init method failed; nested exception is com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.NullPointerException

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)
at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:60)
at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:325)
at org.eclipse.gemini.blueprint.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:290)
at org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:137)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.NullPointerException
at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:149)
at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:112)
at com.atlassian.scheduler.compat.AutoDetectingCompatibilityPluginScheduler.getDelegate(AutoDetectingCompatibilityPluginS

 

1 answer

1 accepted

0 votes
Answer accepted
Sa Kan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 8, 2017

I could resolve this using version upgrades... The error came due to version mismatch I think. Here are the versions I use now. Works fine for compatibility libraries.


<groupId>com.atlassian.scheduler</groupId>
<artifactId>atlassian-scheduler-compat</artifactId>
<version>1.2</version>

<groupId>com.atlassian.beehive</groupId>
<artifactId>beehive-compat</artifactId>
<version>0.1.5</version>

<groupId>com.atlassian.sal</groupId>
<artifactId>sal-api</artifactId>
<version>3.1.0</version>

<groupId>com.atlassian.scheduler</groupId>
<artifactId>atlassian-scheduler-api</artifactId>
<version>1.7.0</version>

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events