Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Class Not Found Exception WithPlugin (5.4.43)

Yusuf TAMBAG December 13, 2018

Hi,

 

With latest version of Script runner (5.4.43), I've got following class not found error when loading plugin component. I've downgraded to version 5.3.26 and problem disappeared. Also related snippet of my script code is below.

 

-thank you very much

-yusuf

 

Exception (with version 5.4.43)

Caused by: java.lang.NoClassDefFoundError: Unable to load class tr.gov.tubitak.bilgem.yte.jira.groovy.utils.PersonnelInfoExtractor due to missing dependency Ltr/gov/tubitak/bilgem/yte/atlassian/dbservice/services/DatabaseManagerService;
        at org.codehaus.groovy.vmplugin.v5.Java5.configureClassNode(Java5.java:397)

 

Script Snippet:

@WithPlugin ( "tr.gov.tubitak.bilgem.yte.yte-atlassian-dbservice")
class PersonnelInfoExtractor {
...
private final DatabaseManagerService databaseManagerService=ScriptRunnerImpl.getPluginComponent(DatabaseManagerService.class);

 

2 answers

0 votes
Thanos Batagiannis [Adaptavist]
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.
February 28, 2019

Hi guys, 

Your issues may seem to be similar but the root cause is different. 

Notice that @Payne you error message is 

unable to resolve

and your problem relates to SRJIRA-3290, please start watching this issue in order to get updates on it's status.

@Yusuf TAMBAG 

Your error message is 

Unable to load class 

And probably there is an issue with some dependencies in your custom plugin. 

Regards,

Thanos

0 votes
Payne
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.
January 30, 2019

I'm sporadically encountering a similar issue in a Behaviour, referencing the Active Directory Attributes Sync add-on. Sometimes it works just fine, and other times I get:

Script1.groovy: 15: unable to resolve class com.intenso.jira.plugins.admanager.util.ActiveDirectoryAttributeManager
 @ line 15, column 1.
   import com.intenso.jira.plugins.admanager.util.ActiveDirectoryAttributeManager

Script segment:

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.bc.user.search.DefaultUserPickerSearchService
import com.atlassian.jira.ComponentManager
import com.atlassian.jira.bc.JiraServiceContext
import com.atlassian.jira.bc.JiraServiceContextImpl
import com.onresolve.scriptrunner.runner.customisers.WithPlugin
import com.atlassian.jira.issue.customfields.option.Option
import com.atlassian.jira.issue.customfields.option.Options
import com.atlassian.jira.issue.customfields.manager.OptionsManager
import com.atlassian.jira.issue.fields.CustomField
import com.atlassian.jira.issue.fields.config.FieldConfig
import com.atlassian.jira.issue.fields.config.FieldConfigScheme
import com.intenso.jira.plugins.admanager.util.ActiveDirectoryAttributeManager

@WithPlugin("com.intenso.jira.plugins.ad-integration-manager")

 I'm running ScriptRunner 5.4.40 on Jira Server.

Payne
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.
February 28, 2019

I reported my situation to Adaptavist, and they created bug report https://productsupport.adaptavist.com/browse/SRJIRA-3311 As a workaround, they suggest placing the code in a script file on the server, and that has indeed stopped the problem from occurring.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events