Installing UPM 2.7.2 or later on versions of Tomcat prior to 6 fails
Symptoms
- Upgrading the Universal Plugin Manager (or UPM) to 2.7.2 or later
- Using a version of Tomcat prior to 6
- There will be no link to 'Plugins' in the administration section of Confluence after the upgrade, as the Universal Plugin Manager fails to load
- The following stack traces will appear in the logs:
2012-09-15 19:10:47,454 ERROR [FelixDispatchQueue] [osgi.container.felix.FelixOsgiContainerManager] frameworkEvent 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.
... org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
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:70)
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)
at org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:307)
... 47 more
Caused by: 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.velocity.runtime.log.LogManager.createLogChute(LogManager.java:206)
at org.apache.velocity.runtime.log.LogManager.updateLog(LogManager.java:255)
at org.apache.velocity.runtime.RuntimeInstance.initializeLog(RuntimeInstance.java:795)
at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:250)
at org.apache.velocity.app.VelocityEngine.init(VelocityEngine.java:107)
at com.atlassian.templaterenderer.velocity.one.six.internal.VelocityTemplateRendererImpl.<init>(VelocityTemplateRendererImpl.java:66)
... 50 more
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.Lo
g' 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.L
ogConfigurationException: 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.LogConfigurationExcep
tion: 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)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:370)
at org.apache.velocity.runtime.log.CommonsLogLogChute.init(CommonsLogLogChute.java:75)
at org.apache.velocity.runtime.log.LogManager.createLogChute(LogManager.java:157)
... 55 more
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.apach
e.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)
... 60 more
Exception in thread "Spring executor 9" org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'pluginManagerHandler' defined in URL [bundle://122.0:0/META-INF/spring/atlassian-plugins-components.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [com.atlassian.templaterenderer.TemplateRenderer]: : Error creating bean with name 'renderer': FactoryBean threw exception on object creation; nested exception is org.springframework.osgi.service.ServiceUnavailableException: service matching filter=[(objectClass=com.atlassian.templaterenderer.velocity.one.six.VelocityTemplateRenderer)] unavailable; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'renderer': FactoryBean threw exception on object creation; nested exception is org.springframework.osgi.service.ServiceUnavailableException: service matching filter=[(objectClass=com.atlassian.templaterenderer.velocity.one.six.VelocityTemplateRenderer)] unavailable
...
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'renderer': FactoryBean threw exception on object creation; nested exception is org.springframework.osgi.service.ServiceUnavailableException: service matching filter=[(objectClass=com.atlassian.templaterenderer.velocity.one.six.VelocityTemplateRenderer)] unavailable
...
Caused by: org.springframework.osgi.service.ServiceUnavailableException: service matching filter=[(objectClass=com.atlassian.templaterenderer.velocity.one.six.VelocityTemplateRenderer)] unavailable
at org.springframework.osgi.service.importer.support.internal.aop.ServiceDynamicInterceptor.getTarget(ServiceDynamicInterceptor.java:419)
at org.springframework.osgi.service.importer.support.internal.aop.ServiceDynamicInterceptor.afterPropertiesSet(ServiceDynamicInterceptor.java:472)
at org.springframework.osgi.service.importer.support.OsgiServiceProxyFactoryBean.createProxy(OsgiServiceProxyFactoryBean.java:215)
at org.springframework.osgi.service.importer.support.AbstractServiceImporterProxyFactoryBean.getObject(AbstractServiceImporterProxyFactoryBean.java:86)
at org.springframework.osgi.service.importer.support.OsgiServiceProxyFactoryBean.getObject(OsgiServiceProxyFactoryBean.java:161)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport$1.run(FactoryBeanRegistrySupport.java:121)
... 33 more
Cause
This is caused by a bug in the UPM.
Resolution
To resolve this issue you need to upgrade Tomcat to version 6 or later. You can run through the following steps to get the UPM upgraded
- Shutdown Confluence
- Backup your database
- Find the UPM in your database and delete it
- select plugindataid,pluginkey,filename,lastmoddate from plugindata where pluginkey ilike '%upm%';
- delete from plugindata where plugindataid = 'number found in previous step';
- Migrate Tomcat to version 6
- Startup Confluence again, the older, bundled version of the UPM should now load.
- Upgrade the UPM from the UPM as normal, it should now work.
Last modified on Feb 26, 2016
Powered by Confluence and Scroll Viewport.