Unable to Enable Workbox's Notifications and Tasks - Host Plugin Due to NoClassDefFoundError
In the newer version of Confluence, Notifications and Tasks Plugin is called Workbox Plugin.
症状
- Workbox Icon () is not shown in the dashboard
- Some modules, or even the entire Notifications and Tasks - Host Plugin in
Confluence Admin >> Plugins
is disabled, and cannot be enabled - The Notifications and Tasks - Host Plugin is listed as a User Installed Plugin instead of a System Plugin
- Confluence is being deployed as a webapp in a Tomcat 7 container
The following appears in the atlassian-confluence.log
during startup:
2012-09-21 23:19:41,753 ERROR [Spring executor 1] [plugin.osgi.factory.OsgiPlugin] onSpringContextFailed Unable to start the Spring context for plugin com.atlassian.activeobjects.activeobjects-plugin
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'handler' defined in URL [bundle://26.0:0/META-INF/spring/web-context.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/servlet/ServletContext
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)
at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
at 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.NoClassDefFoundError: javax/servlet/ServletContext
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
at java.lang.Class.privateGetPublicMethods(Class.java:2547)
at java.lang.Class.getMethods(Class.java:1410)
at java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1284)
at java.beans.Introspector.getTargetMethodInfo(Introspector.java:1158)
at java.beans.Introspector.getBeanInfo(Introspector.java:408)
at java.beans.Introspector.getBeanInfo(Introspector.java:167)
at java.beans.Introspector.getBeanInfo(Introspector.java:230)
at java.beans.Introspector.<init>(Introspector.java:389)
at java.beans.Introspector.getBeanInfo(Introspector.java:167)
at java.beans.Introspector.getBeanInfo(Introspector.java:230)
at java.beans.Introspector.<init>(Introspector.java:389)
at java.beans.Introspector.getBeanInfo(Introspector.java:167)
at java.beans.Introspector.getBeanInfo(Introspector.java:230)
at java.beans.Introspector.<init>(Introspector.java:389)
at java.beans.Introspector.getBeanInfo(Introspector.java:167)
at org.springframework.beans.CachedIntrospectionResults.<init>(CachedIntrospectionResults.java:220)
at org.springframework.beans.CachedIntrospectionResults.forClass(CachedIntrospectionResults.java:144)
at org.springframework.beans.BeanWrapperImpl.getCachedIntrospectionResults(BeanWrapperImpl.java:252)
at org.springframework.beans.BeanWrapperImpl.getPropertyDescriptorInternal(BeanWrapperImpl.java:282)
at org.springframework.beans.BeanWrapperImpl.isWritableProperty(BeanWrapperImpl.java:333)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1247)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
... 18 more
Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletContext
at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:772)
at org.apache.felix.framework.ModuleImpl.access$200(ModuleImpl.java:73)
at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1690)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 43 more
When enabling the Host Plugin, the following may appear in the atlassian-confluence.log
:
2013-01-17 15:38:14,755 ERROR [http-bio-8085-exec-9] [atlassian.plugin.manager.DefaultPluginManager] enableConfiguredPluginModule There was an error loading the descriptor 'null' of plugin 'com.atlassian.mywork.mywork-confluence-host-plugin'. Disabling.
-- referer: http://<confluence-url>/confluence/plugins/servlet/upm | url: /confluence/rest/plugins/1.0/com.atlassian.mywork.mywork-confluence-host-plugin-key | userName: admin
java.lang.NullPointerException
at com.atlassian.plugin.webresource.WebResourceModuleDescriptor$1.create(WebResourceModuleDescriptor.java:49)
at com.atlassian.plugin.web.descriptors.ConditionElementParser.makeCondition(ConditionElementParser.java:150)
at com.atlassian.plugin.web.descriptors.ConditionElementParser.makeConditions(ConditionElementParser.java:139)
at com.atlassian.plugin.web.descriptors.ConditionElementParser.makeConditions(ConditionElementParser.java:86)
....
診断
Try to disable all Notifications and Tasks plugins in Confluence Admin >> Plugins
. Then re-enable them by following this sequence:
- Enable the Notifications and Tasks - Common Plugin
- Enable the Notifications and Tasks - Host Plugin
- Enable the Notifications and Tasks - Confluence Provider Plugin
Remember, the 3 plugins have to be enabled in the sequence above, 1 by 1. Then proceed with the following:
- Confluence をシャットダウンします。
- Confluence を実行しているユーザーに confluence-home ディレクトリへの完全な読み取り / 書き込み権限が割り当てられていることを確認します。
- 次のディレクトリを削除します。
これはプラグイン キャッシュ ファイルのみを削除し、プラグインの完全な削除は行いません。これらのディレクトリは、Confluence の次回の起動時に再作成されます。ただし、サードパーティ プラグインによっては、このディレクトリにメタデータを格納している可能性があります。このため、ディレクトリの一時的なバックアップを作成しておくことをおすすめします。<confluence-home>/bundled-plugins
<confluence-home>/plugins-cache
<confluence-home>/plugins-osgi-cache
<confluence-home>/plugins-temp
<confluence-home>/bundled-plugins_language
- Confluence を起動します。
If the issue still persists after Confluence restart, proceed to Resolution below.
原因
The Active Objects plugin cannot be enabled due to missing classes in the Tomcat library. This is normally caused by the fact that Confluence is being deployed as a webapp in a Tomcat 7 container, which is not supported by Confluence 4.3. Please refer to Supported Platforms page for more details.
ソリューション
- Shutdown the Tomcat 7 instance
Deploy Confluence instead, in a Tomcat 6.0.35 container
Startup the Tomcat 6.0.35 instance with Confluence in it