NoClassDefFoundError: com/atlassian/confluence/xml/SafeXmlParserFactory after upgrading WebDav Plugin to 3.0.2

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptoms

  1. WebDAV Plugin is disabled with this error:

    (Auto-migrated image: description temporarily unavailable)
  2. You just upgraded the WebDAV Plugin to 3.0.2 in your Confluence 4.1 instance

The following appears in the atlassian-confluence.log:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 2012-04-19 16:56:08,642 ERROR [Spring executor 15] [extender.internal.activator.ContextLoaderListener] onOsgiApplicationEvent Application context refresh failed (NonValidatingOsgiBundleXmlApplicationContext(bundle=confluence.extra.webdav, config=osgibundle:/META-INF/spring/*.xml)) -- referer: http://127.0.0.1:8417/c417/plugins/servlet/upm | url: /c417/rest/plugins/1.0/ | userName: admin org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'webDavServlet' defined in URL [bundle://102.0:0/META-INF/spring/atlassian-plugins-spring.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.atlassian.confluence.extra.webdav.servlet.ConfluenceWebdavServlet]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: com/atlassian/confluence/xml/SafeXmlParserFactory at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:254) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:925) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:835) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440) 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: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.atlassian.confluence.extra.webdav.servlet.ConfluenceWebdavServlet]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: com/atlassian/confluence/xml/SafeXmlParserFactory at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:115) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87) at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:248) ... 21 more Caused by: java.lang.NoClassDefFoundError: com/atlassian/confluence/xml/SafeXmlParserFactory at com.atlassian.confluence.extra.webdav.servlet.ConfluenceWebdavServlet.<init>(ConfluenceWebdavServlet.java:51) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100) ... 23 more Caused by: java.lang.ClassNotFoundException: com.atlassian.confluence.xml.SafeXmlParserFactory at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526) at org.apache.felix.framework.ExtensionManager$ExtensionManagerModule.getClassByDelegation(ExtensionManager.java:672) at org.apache.felix.framework.resolver.WireImpl.getClass(WireImpl.java:99) at org.apache.felix.framework.ModuleImpl.searchImports(ModuleImpl.java:1345) at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:711) 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) ... 29 more

Cause

The plugin tries to load the com/atlassian/confluence/xml/SafeXmlParserFactory class which does not exist in Confluence 4.1. This is being tracked here: https://studio.plugins.atlassian.com/browse/WBDV-238

Workaround

Uninstall the plugin, and download the v3.0.0 of the plugin from https://marketplace.atlassian.com/plugins/confluence.extra.webdav/version/300 . Reupload the plugin via Confluence Admin >> Plugins >> Install Plugins >> Upload Plugin.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.