Installing JIRA Importers Plugin on versions of Tomcat prior to 6 fails

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

  • Installing, Enabling or Upgrading the JIRA Importers Plugin (or JIM)
  • Using a version of Tomcat prior to 6
  • The following stack trace will appear in the logs:

atlassian-jira.log に次のメッセージが表示される。

2013-01-14 08:51:08,390 TP-Processor1 INFO localuser 531x1877x1 iyjrff 192.168.185.95 /rest/plugins/1.0/com.atlassian.jira.plugins.jira-importers-plugin-key [atlassian.plugin.util.WaitUntil] Plugins that have yet to be enabled: [com.atlassian.jira.plugins.jira-importers-plugin], 56 seconds remaining
2013-01-14 08:51:08,405 FelixDispatchQueue ERROR      [osgi.container.felix.FelixOsgiContainerManager] Framework error in bundle com.atlassian.templaterenderer.atlassian-template-renderer-velocity16-plugin
org.osgi.framework.ServiceException: Service factory exception: org.apache.velocity.exception.VelocityException: Failed to initialize an instance of org.apache.velocity.runtime.log.CommonsLogLogChute with the current runtime configuration.
	at org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:311)
	at org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:221)
	at org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:295)
...
Caused by: java.lang.RuntimeException: org.apache.velocity.exception.VelocityException: Failed to initialize an instance of org.apache.velocity.runtime.log.CommonsLogLogChute with the current runtime configuration.
	at com.atlassian.templaterenderer.velocity.one.six.internal.VelocityTemplateRendererImpl.<init>(VelocityTemplateRendererImpl.java:77)
	at com.atlassian.templaterenderer.velocity.one.six.internal.VelocityTemplateRendererServiceFactory.getService(VelocityTemplateRendererServiceFactory.java:33)
	at org.springframework.osgi.service.exporter.support.internal.support.PublishingServiceFactory.getService(PublishingServiceFactory.java:105)
...
Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy.  You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy.  You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.) (Caused by org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy.  You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy.  You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.))
	at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
...
Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy.  You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy.  You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.)
	at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:397)
	at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
	... 59 more
Caused by: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy.  You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.
	at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:385) 

原因

This happens because the commons-logging library comes bundled with the JIM, and as this already exists in the Tomcat directory, it causes JIRA to read a duplicate, and consequently fails to initialize the plugin. It appears this is related to the problem described when installing the UPM, as mentioned in the Installing UPM 2.7.2 or later on versions of Tomcat prior to 6 fails knowledge base article.

回避策

There are two workarounds for this problem. You can either replace the Tomcat's common-logging-x.x.x.jar file with commons-logging-1.1.1.jar or you can remove the commons-logging jar from the JIRA Importers Plugin. By updating Tomcat's common-logging, you'll also be able to install the latest UPM releases without facing this issue. If you'd rather hack the JIM jar, however, please follow the steps below:

  1. Download the latest version on the JIRA Importers Plugin
  2. Extract the contents of the jar
  3. Remove the commons-logging-x.x.x.jar file inside the META-INF/lib folder
  4. Zip all the files again
  5. Rename it from jira-importers-plugin-x.x.x.zip to jira-importers-plugin-x.x.x.jar
  6. Navigate to Administration » Plugins, select Upload Plugin and install the modified JIM jar

ソリューション

To resolve this issue you need to upgrade Tomcat to version 6 or later. You can run through the following steps to get the JIRA importers plugin installed/upgraded:

  1. Jira をシャットダウンします。
  2. Remove JIM from your $JIRA_HOME/plugins/installed-plugins directory.

  3. Migrate Tomcat to version 6
  4. Startup JIRA again, the older, bundled version of the JIM should now load.
  5. Upgrade the JIM from the UPM as normal.
Last modified on Mar 30, 2016

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.