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

Multiple JIRAs will not run in same JVM

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Medium
    • 3.0 Pro Preview
    • 2.6 Pro, 2.6 Enterprise, 2.6.1 Pro, 2.6.1 Enterprise
    • None

    Description

      Currently if multiple versions of JIRA are running the the same JVM, all instances but the first will fail with worfklow exceptions like the below:

      java.lang.ClassCastException
      at
      com.opensymphony.workflow.config.ConfigLoader.load(ConfigLoader.java:99)
      at
      com.opensymphony.workflow.AbstractWorkflow.loadConfig(AbstractWorkflow.java:829)
      at
      com.opensymphony.workflow.AbstractWorkflow.<init>(AbstractWorkflow.java:78)

      This is caused be the upgrade to OSWorkflow 2.6, which has some ugliness with the way that it loads classes.

      This occurs in ConfigLoader.java from OSWorkflow in the following line:

      if (Thread.currentThread().getContextClassLoader() != null) {
      try

      { factory = (AbstractWorkflowFactory) Class.forName(clazz, true, Thread.currentThread().getContextClassLoader()).newInstance(); //factory = (AbstractWorkflowFactory) Thread.currentThread().getContextClassLoader().loadClass(clazz).newInstance(); }

      catch (ClassNotFoundException e) {
      //fall back to this class' classloader.

      The commented line fixes the problem.

      I will attach a fix - it looks like this will need to go back into OSWorkflow (who should really be using ClassloaderUtils.loadClass() anyhow.

      Attachments

        Issue Links

          Activity

            People

              scott@atlassian.com Scott Farquhar
              scott@atlassian.com Scott Farquhar
              Votes:
              2 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: