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

Newly Created Project Fails During Creation Causing Project Not Able to be Used or Deleted

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

      Note

      This issue is not replicable thus far, however, there are cases reported having the same behavior.

      Issue Symptom

      Project created, seen in the list of project in project administration page, but when trying to access or delete. It is presented with error message:

      No project could be found with key $projectkey
      

      No visible error in the logs, just some information stating after the redirection to the project page:

      current-@400000005370d5d333c303c4 2014-05-12 15:08:09,856 TP-Processor15 ERROR user 908x449316x2 esy4ek 141.0.34.138,131.103.27.100 /rest/project-templates/1.0/templates [jersey.spi.container.ContainerResponse] Mapped exception to response: 500 (Internal Server Error)
      current:@400000005370d5d333c30b94 javax.ws.rs.WebApplicationException: java.lang.IllegalArgumentException: No local entity with key 'projectkey' and type 'class com.atlassian.applinks.application.jira.JiraProjectEntityTypeImpl' exists
      current-@400000005370d5d333c30f7c 	at com.atlassian.jira.projecttemplates.rest.ProjectTemplatesResource.createProjectFromFormRequest(ProjectTemplatesResource.java:125)
      current-@400000005370d5d333ca0c8c 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      

      Suspect:

      Some interruption (maybe network) causing the project creation to halt. But there is not enough information in the logs that might determine that.

      Workaround

      If you are using JIRA Cloud, please raise an issue at support.atlassian.com, with a date and time that you would like a restart to occur. Support will grab the logs and restart the instance to resolve the problem.

      If you are using JIRA Server the following KB Article lists work around methods to attempt.

            [JRASERVER-38275] Newly Created Project Fails During Creation Causing Project Not Able to be Used or Deleted

            Thanks for the informations

            Athanasios Bladis added a comment - Thanks for the informations

            Yes that's correct athanasios.bladis

            Oswaldo Hernandez (Inactive) added a comment - Yes that's correct athanasios.bladis

            Hello Oswaldo Hernandez,

            the installed version at BMW is 6.2.9, thats means we need to upgrade our version right?

            BR

            Athanasios Bladis

            Athanasios Bladis added a comment - Hello Oswaldo Hernandez, the installed version at BMW is 6.2.9, thats means we need to upgrade our version right? BR Athanasios Bladis

            Hi athanasios.bladis,

            As per my previous comment, I can confirm the issue here was addressed in JIRA 6.4.3.

            If you are still seeing a problem in your instance, could you please create a support ticket at https://support.atlassian.com? That way we can provide you with support specific to your circumstances and with higher security. The credentials should be the same as for this site (https://jira.atlassian.com).

            Regards,

            Oswaldo Hernández.
            JIRA Bugmaster.
            [Atlassian].

            Oswaldo Hernandez (Inactive) added a comment - Hi athanasios.bladis , As per my previous comment, I can confirm the issue here was addressed in JIRA 6.4.3. If you are still seeing a problem in your instance, could you please create a support ticket at https://support.atlassian.com? That way we can provide you with support specific to your circumstances and with higher security. The credentials should be the same as for this site ( https://jira.atlassian.com ). Regards, Oswaldo Hernández. JIRA Bugmaster. [Atlassian] .

            Hi m.hoogenboom,

            I can confirm that the issue here was indeed fixed in JIRA 6.4.3 with the upgrade to atlassian-cache library to version 2.5.8.

            From your comment I can see that you are seeing a problem whilst creating the project from your plugin's code whilst calling the lower level ProjectManager API. My suspicion is that you might not be clearing all caches that need to be cleaned up / are clearing the cache at the wrong time, but without further context into your code and what you are doing it's difficult to tell what's going on. I would rely on the higher-level ProjectService API instead.

            Having said this, it would be better for you to create a question on answers.atlassian.com with more details ad this looks like a developer support question rather than a bug in the product on first sight.

            Regards,

            Oswaldo Hernández.
            JIRA Bugmaster.
            [Atlassian].

            Oswaldo Hernandez (Inactive) added a comment - Hi m.hoogenboom , I can confirm that the issue here was indeed fixed in JIRA 6.4.3 with the upgrade to atlassian-cache library to version 2.5.8. From your comment I can see that you are seeing a problem whilst creating the project from your plugin's code whilst calling the lower level ProjectManager API. My suspicion is that you might not be clearing all caches that need to be cleaned up / are clearing the cache at the wrong time, but without further context into your code and what you are doing it's difficult to tell what's going on. I would rely on the higher-level ProjectService API instead. Having said this, it would be better for you to create a question on answers.atlassian.com with more details ad this looks like a developer support question rather than a bug in the product on first sight. Regards, Oswaldo Hernández. JIRA Bugmaster. [Atlassian] .

            M Hoogenboom added a comment - - edited

            I happen to see the same issue today in JIRA 6.4.4 with the following code in my jira plugin:
            project = projectManager.createProject(projectName, projectKey.toUpperCase(), projectDescription,
            leader.getKey(), projectURL, new Long( AssigneeTypes.UNASSIGNED));
            }
            //... setting schemes according to template ...
            projectManager.refresh();

            I'm interested in the fix, as it was apparently not fixed in 6.4.4.

            Creating a new project (with the default Create Project menu option) resolves the problem, but that's not really an option. I would expect that "projectManager.refresh() would solve it too. Note that I did not have this issue on the Jira 6.4.4 development (atlas-run) environment.

            M Hoogenboom added a comment - - edited I happen to see the same issue today in JIRA 6.4.4 with the following code in my jira plugin: project = projectManager.createProject(projectName, projectKey.toUpperCase(), projectDescription, leader.getKey(), projectURL, new Long( AssigneeTypes.UNASSIGNED)); } //... setting schemes according to template ... projectManager.refresh(); I'm interested in the fix, as it was apparently not fixed in 6.4.4. Creating a new project (with the default Create Project menu option) resolves the problem, but that's not really an option. I would expect that "projectManager.refresh() would solve it too. Note that I did not have this issue on the Jira 6.4.4 development (atlas-run) environment.

            Hello, i m facing the same problem, what was the workaround? Clearing of the Jira internal Cache?

            Athanasios Bladis added a comment - Hello, i m facing the same problem, what was the workaround? Clearing of the Jira internal Cache?

            crf added a comment - - edited

            The issue should be fully resolved for JIRA Cloud and JIRA Server customers.

            Edit: The deployment to JIRA Cloud had to be delayed due to incompatible code in one of the add-ons that is available there. We expect to be able to address this for the next deployment, but for the time being this error can still occur in JIRA Cloud. See CACHE-123 for more information.

            For JIRA Data Center customers, it is still technically possible if two projects are created at once from two different nodes of the cluster. The partial fix implemented here should greatly reduce the occurrences of the problem for JDC customers as well, but a complete, cluster-safe fix is not possible until CACHE-106 and CACHE-108 have been completely resolved.

            crf added a comment - - edited The issue should be fully resolved for JIRA Cloud and JIRA Server customers. Edit: The deployment to JIRA Cloud had to be delayed due to incompatible code in one of the add-ons that is available there. We expect to be able to address this for the next deployment, but for the time being this error can still occur in JIRA Cloud. See CACHE-123 for more information. For JIRA Data Center customers, it is still technically possible if two projects are created at once from two different nodes of the cluster. The partial fix implemented here should greatly reduce the occurrences of the problem for JDC customers as well, but a complete, cluster-safe fix is not possible until CACHE-106 and CACHE-108 have been completely resolved.

            crf added a comment -

            It is random because it is a race condition. The problem is due to a concurrency problem (see CACHE-106 and CACHE-108 for details). Creating another completely different project works because it resets the two caches that are involved, and the original project that seems to have failed comes along for the ride.

            As ohernandez@atlassian.com indicated above, the original fix targeting 6.4.2 had to be reverted due to unacceptable performance impact. I am working on an improved solution that I expect to deliver in 6.4.3, though it is always possible for unforeseen problems to interfere with that plan.

            crf added a comment - It is random because it is a race condition. The problem is due to a concurrency problem (see CACHE-106 and CACHE-108 for details). Creating another completely different project works because it resets the two caches that are involved, and the original project that seems to have failed comes along for the ride. As ohernandez@atlassian.com indicated above, the original fix targeting 6.4.2 had to be reverted due to unacceptable performance impact. I am working on an improved solution that I expect to deliver in 6.4.3, though it is always possible for unforeseen problems to interfere with that plan.

            @Jason Brison's most recent edit:
            Is that common place? I only experience a "failed" project every ten projects or so and I can't even say that it's that regular. It's more random as I've seen it. Thus creating a new project typically doesn't have any retributions to me.

            Steven F Behnke added a comment - @Jason Brison's most recent edit: Is that common place? I only experience a "failed" project every ten projects or so and I can't even say that it's that regular. It's more random as I've seen it. Thus creating a new project typically doesn't have any retributions to me.

              gtanczyk Grzegorz Tanczyk (Inactive)
              rgee Richie Gee (Inactive)
              Affected customers:
              48 This affects my team
              Watchers:
              92 Start watching this issue

                Created:
                Updated:
                Resolved: