It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Error while creating a project using jira 7

Method: 

ProjectCreationData.Builder pcdBuilder = new ProjectCreationData.Builder();
pcdBuilder.withName("test").withKey("EX").withDescription("Testing").withType("business").withProjectTemplateKey("com.atlassian.jira-core-project-templates:jira-core-project-management").withUrl("abc").withAssigneeType(12345678910L).withAvatarId(12545678910L);
ProjectCreationData pcd = pcdBuilder.build();

CreateProjectValidationResult newProjectVR = projectService
.validateCreateProject(user, // User
pcd 
); 

Log trace : 

2017-05-08 04:49:06,593 http-nio-8080-exec-14 uri:/secure/SDEProjectAdmin.jspa username:kadhikar ERROR [o.a.c.c.C.[.[localhost].[/].[action]] Servlet.service() for servlet [action] in context with path [] threw exception [java.lang.IllegalArgumentException: Invalid module key specified: ] with root cause
java.lang.IllegalArgumentException: Invalid module key specified:
at com.atlassian.plugin.ModuleCompleteKey.<init>(ModuleCompleteKey.java:49)
at com.atlassian.plugin.ModuleCompleteKey.<init>(ModuleCompleteKey.java:29)
at com.atlassian.plugin.manager.ProductPluginAccessorBase.getEnabledPluginModule(ProductPluginAccessorBase.java:165)
at com.atlassian.plugin.manager.ForwardingPluginAccessor.getEnabledPluginModule(ForwardingPluginAccessor.java:50)
at com.atlassian.plugin.manager.EnabledModuleCachingPluginAccessor.getEnabledPluginModule(EnabledModuleCachingPluginAccessor.java:39)
at com.atlassian.plugin.manager.ForwardingPluginAccessor.getEnabledPluginModule(ForwardingPluginAccessor.java:50)
at com.atlassian.plugin.manager.ProductPluginAccessor.getEnabledPluginModule(ProductPluginAccessor.java:17)
at com.atlassian.extension.plugins.ExtensionAccessingPluginAccessor.getEnabledPluginModule(ExtensionAccessingPluginAccessor.java:169)
at com.atlassian.jira.project.template.ProjectTemplateManagerImpl.findByKeyVisible(ProjectTemplateManagerImpl.java:99)
at com.atlassian.jira.project.template.ProjectTemplateManagerImpl.getProjectTemplate(ProjectTemplateManagerImpl.java:48)
at com.atlassian.jira.bc.project.DefaultProjectService.validateProjectTypeAndTemplate(DefaultProjectService.java:650)
at com.atlassian.jira.bc.project.DefaultProjectService.isValidAllProjectData(DefaultProjectService.java:634)
at com.atlassian.jira.bc.project.DefaultProjectService.validateCreateProject(DefaultProjectService.java:280)
at com.amd.jira.admin.sde.ProjectCloner.cloneProject(ProjectCloner.java:172)
at com.amd.jira.admin.sde.CreateSDEProject.doExecute(CreateSDEProject.java:120)
... 1 filtered
at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:63)
... 7 filtered
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
... 19 filtered
at com.atlassian.ams.shipit.servlet.filter.TomcatThreadFilter.doFilter(TomcatThreadFilter.java:70)
... 3 filtered
at

1 answer

0 votes

This looks like your code is feeding a function a string that contains invalid data for a module key.  Check the template key doesn't need to be encoded, and look at the url as well.

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you