Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-60231

JIRA Tutorial [Creating a project template] caused error creating a project

    XMLWordPrintable

Details

    • 5
    • We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      NOTE: This suggestion is for JIRA Server. Using JIRA Cloud? See the corresponding suggestion.

      Problem Definition

      This tutorial was last tested with JIRA 6.0.7. as per official tutorial guide at Tutorial - Creating a Project Template.

      With further testing on JIRA Core 7.1.0 with sdk version 6.2.4, enabled add-on causing error on project creation.

      In atlassian-jira.log, messages below can be seen.

      2016-03-17 22:32:15,269 Spring DM Context Creation Timer WARN      [o.e.g.b.e.i.dependencies.startup.DependencyWaiterApplicationContextExecutor] Timeout occurred before finding service dependencies for [NonValidatingOsgiBundleXmlApplicationContext(bundle=com.atlassian.plugins.tutorial.my-project-template-tests, config=osgibundle:/META-INF/spring/*.xml)]
      2016-03-17 22:32:15,284 Spring DM Context Creation Timer ERROR      [c.a.p.osgi.factory.OsgiPlugin] Plugin 'com.atlassian.plugins.tutorial.my-project-template-tests' never resolved service '&myComponent' with filter '(objectClass=com.atlassian.plugins.tutorial.api.MyPluginComponent)'
      2016-03-17 22:32:15,313 Spring DM Context Creation Timer ERROR      [c.a.p.osgi.factory.OsgiPlugin] Unable to start the plugin container for plugin 'com.atlassian.plugins.tutorial.my-project-template-tests'
      org.springframework.context.ApplicationContextException: Application context initialization for 'com.atlassian.plugins.tutorial.my-project-template-tests' has timed out waiting for (objectClass=com.atlassian.plugins.tutorial.api.MyPluginComponent)
      	at org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.timeout(DependencyWaiterApplicationContextExecutor.java:489)
      	at org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.access$000(DependencyWaiterApplicationContextExecutor.java:54)
      	at org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$WatchDogTask.run(DependencyWaiterApplicationContextExecutor.java:109)
      	at java.util.TimerThread.mainLoop(Timer.java:555)
      	at java.util.TimerThread.run(Timer.java:505)
      2016-03-17 22:32:15,452 Spring DM Context Creation Timer ERROR      [o.e.g.b.e.internal.support.ExtenderConfiguration] Application context refresh failed (NonValidatingOsgiBundleXmlApplicationContext(bundle=com.atlassian.plugins.tutorial.my-project-template-tests, config=osgibundle:/META-INF/spring/*.xml))
      org.springframework.context.ApplicationContextException: Application context initialization for 'com.atlassian.plugins.tutorial.my-project-template-tests' has timed out waiting for (objectClass=com.atlassian.plugins.tutorial.api.MyPluginComponent)
      	at org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.timeout(DependencyWaiterApplicationContextExecutor.java:489)
      	at org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.access$000(DependencyWaiterApplicationContextExecutor.java:54)
      	at org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$WatchDogTask.run(DependencyWaiterApplicationContextExecutor.java:109)
      	at java.util.TimerThread.mainLoop(Timer.java:555)
      	at java.util.TimerThread.run(Timer.java:505)
      2016-03-17 22:32:15,470 Spring DM Context Creation Timer ERROR      [o.e.g.b.e.i.dependencies.startup.DependencyWaiterApplicationContextExecutor] Unable to create application context for [com.atlassian.plugins.tutorial.my-project-template-tests], unsatisfied dependencies: Dependency on [(objectClass=com.atlassian.plugins.tutorial.api.MyPluginComponent)] (from bean [&myComponent])
      org.springframework.context.ApplicationContextException: Application context initialization for 'com.atlassian.plugins.tutorial.my-project-template-tests' has timed out waiting for (objectClass=com.atlassian.plugins.tutorial.api.MyPluginComponent)
      	at org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.timeout(DependencyWaiterApplicationContextExecutor.java:489)
      	at org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.access$000(DependencyWaiterApplicationContextExecutor.java:54)
      	at org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$WatchDogTask.run(DependencyWaiterApplicationContextExecutor.java:109)
      	at java.util.TimerThread.mainLoop(Timer.java:555)
      	at java.util.TimerThread.run(Timer.java:505)
      2016-03-17 22:32:15,487 UpmAsynchronousTaskManager:thread-1 ERROR admin 1346x345x2 11h3jao 0:0:0:0:0:0:0:1 /rest/plugins/1.0/installed-marketplace [c.a.plugin.manager.PluginEnabler] Unable to start the following plugins due to timeout while waiting for plugin to enable: com.atlassian.plugins.tutorial.my-project-template-tests
      2016-03-17 22:35:33,058 http-nio-7100-exec-8 ERROR admin 1355x1744x1 11h3jao 0:0:0:0:0:0:0:1 /rest/project-templates/1.0/templates [c.a.p.r.c.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: com.atlassian.plugin.PluginException: Icon file for 'icon' does not exist at location: images/my-template-icon.png
      com.atlassian.util.concurrent.LazyReference$InitializationException: com.atlassian.plugin.PluginException: Icon file for 'icon' does not exist at location: images/my-template-icon.png
      	at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:149)
      	at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:112)
      	at com.atlassian.util.concurrent.ResettableLazyReference.get(ResettableLazyReference.java:92)
      	at com.atlassian.jira.project.template.descriptor.ProjectTemplateModuleDescriptor.getModule(ProjectTemplateModuleDescriptor.java:103)
      	at com.atlassian.jira.project.template.ProjectTemplateManagerImpl.toProjectTemplate(ProjectTemplateManagerImpl.java:74)
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
      	at java.util.Iterator.forEachRemaining(Iterator.java:116)
      	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
      	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
      	at com.atlassian.jira.project.template.ProjectTemplateManagerImpl.getProjectTemplates(ProjectTemplateManagerImpl.java:43)
      	... 3 filtered
      	at java.lang.reflect.Method.invoke(Method.java:497)
      	at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
      	at com.sun.proxy.$Proxy290.getProjectTemplates(Unknown Source)
      	... 3 filtered
      	at java.lang.reflect.Method.invoke(Method.java:497)
      	at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:136)
      	at com.sun.proxy.$Proxy290.getProjectTemplates(Unknown Source)
      	at com.atlassian.jira.projecttemplates.service.ProjectTemplateServiceImpl.getProjectTemplatesGroupedByProjectType(ProjectTemplateServiceImpl.java:147)
      	at com.atlassian.jira.projecttemplates.service.ProjectTemplateServiceImpl.getProjectTemplatesGroupedByType(ProjectTemplateServiceImpl.java:102)
      	at com.atlassian.jira.projecttemplates.rest.ProjectTemplatesResource.getProjectTemplates(ProjectTemplatesResource.java:74)
      	... 3 filtered
      	at java.lang.reflect.Method.invoke(Method.java:497)
      	... 18 filtered
      	at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:154)
      	... 1 filtered
      	at com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:68)
      	... 86 filtered
      	at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:70)
      	... 15 filtered
      	at com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:37)
      	... 74 filtered
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: com.atlassian.plugin.PluginException: Icon file for 'icon' does not exist at location: images/my-template-icon.png
      	at com.atlassian.jira.project.template.descriptor.ProjectTemplateModuleDescriptor.createIconFor(ProjectTemplateModuleDescriptor.java:177)
      	at com.atlassian.jira.project.template.descriptor.ProjectTemplateModuleDescriptor.createModuleFromXml(ProjectTemplateModuleDescriptor.java:131)
      	at com.atlassian.jira.project.template.descriptor.ProjectTemplateModuleDescriptor.access$100(ProjectTemplateModuleDescriptor.java:37)
      	at com.atlassian.jira.project.template.descriptor.ProjectTemplateModuleDescriptor$1.create(ProjectTemplateModuleDescriptor.java:59)
      	at com.atlassian.jira.project.template.descriptor.ProjectTemplateModuleDescriptor$1.create(ProjectTemplateModuleDescriptor.java:56)
      	at com.atlassian.util.concurrent.LazyReference$Sync.run(LazyReference.java:325)
      	at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:143)
      	... 235 more
      

      Steps to reproduce:

      1. follow the guide here
      2. upload the .jar file or .obr file to the application and make sure it's enabled

      Expected result

      User is able to create a new project with my-project-template

      Actual result

      User is getting an error to create project, no project templates are available at all

      Workaround

      User needs to disable the add-on to be able to use the default project templates.

      Suggested Solution

      Please update the documentation and make sure the code to be compatible with latest JIRA version.

      Attachments

        Issue Links

          Activity

            People

              mpaisley Mel Paisley
              michin Michelle Chin
              Votes:
              4 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: