ClassNotFoundException: com.atlassian...SpacePermissionCondition

Hi,

I have tried to follow this tutorial: https://developer.atlassian.com/confdev/tutorials/space-admin-screens/writing-a-space-admin-screen. My confluence version is 6.0.2.

Unfortunately I was not able to build my project because of the following error (scroll further down for a complete stack trace):

 

java.lang.ClassNotFoundException: com.atlassian.confluence.plugin.descriptor.web.conditions.SpacePermissionCondition

I am rather puzzled by this, because I did find the SpacePermissionCondition.class file in the confluence jar in my target directory. Right next to the SpaceSidebarCondition.class which implements the other condition used in the same tutorial. If I remove the SpacePermissionCondition and leave only the SpaceSidebarCondition in place I get no error.

I have looked at the pom.xml and the atlassian-plugin.xml files in the source code for the tutorial which is located here: https://bitbucket.org/atlassian_tutorial/space-plugin-example, but I could not find anything that seemed relevant to me, which I could be missing.

Other things I have tried: use an older version of confluence, atlas-mvn clean, delete my local maven repository. To no avail.

I can go on without the condition for now, but I would like to use it later on. Also, I would just like to know what's going on. Does someone have an idea what I could be missing?

Thanx in advance for any help on the matter!

Here, as promised, the stack trace:

[INFO] [talledLocalContainer] java.lang.RuntimeException: Unable to enable web fragment
[INFO] [talledLocalContainer]     at com.atlassian.plugin.web.descriptors.AbstractWebFragmentModuleDescriptor.enabled(AbstractWebFragmentModuleDescriptor.java:133)
[INFO] [talledLocalContainer]     at com.atlassian.plugin.web.descriptors.DefaultWebItemModuleDescriptor.enabled(DefaultWebItemModuleDescriptor.java:72)
[INFO] [talledLocalContainer]     at com.atlassian.plugin.web.descriptors.DefaultAbstractWebFragmentModuleDescriptor.enabled(DefaultAbstractWebFragmentModuleDescriptor.java:34)
[INFO] [talledLocalContainer]     at com.atlassian.confluence.plugin.descriptor.web.descriptors.ConfluenceAbstractWebFragmentModuleDescriptor.enabled(ConfluenceAbstractWebFragmentModuleDescriptor.java:26)
[INFO] [talledLocalContainer]     at com.atlassian.plugin.manager.DefaultPluginManager.notifyModuleEnabled(DefaultPluginManager.java:2071)
[INFO] [talledLocalContainer]     at com.atlassian.plugin.manager.DefaultPluginManager.enableConfiguredPluginModule(DefaultPluginManager.java:1845)
[INFO] [talledLocalContainer]     at com.atlassian.plugin.manager.DefaultPluginManager.enableConfiguredPluginModules(DefaultPluginManager.java:1815)
[INFO] [talledLocalContainer]     at com.atlassian.plugin.manager.DefaultPluginManager.addPlugins(DefaultPluginManager.java:1207)
[INFO] [talledLocalContainer]     at com.atlassian.plugin.manager.DefaultPluginManager.scanForNewPlugins(DefaultPluginManager.java:874)
[INFO] [talledLocalContainer]     at com.atlassian.plugin.manager.DefaultPluginManager.installPlugins(DefaultPluginManager.java:773)
[INFO] [talledLocalContainer]     at com.atlassian.confluence.plugin.EventDispatchingPluginController.installPlugins(EventDispatchingPluginController.java:95)
[INFO] [talledLocalContainer]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[INFO] [talledLocalContainer]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[INFO] [talledLocalContainer]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[INFO] [talledLocalContainer]     at java.lang.reflect.Method.invoke(Method.java:498)
[INFO] [talledLocalContainer]     at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
[INFO] [talledLocalContainer]     at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
[INFO] [talledLocalContainer]     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
[INFO] [talledLocalContainer]     at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
[INFO] [talledLocalContainer]     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
[INFO] [talledLocalContainer]     at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
[INFO] [talledLocalContainer]     at com.sun.proxy.$Proxy22.installPlugins(Unknown Source)
[INFO] [talledLocalContainer]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[INFO] [talledLocalContainer]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[INFO] [talledLocalContainer]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[INFO] [talledLocalContainer]     at java.lang.reflect.Method.invoke(Method.java:498)
[INFO] [talledLocalContainer]     at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:134)
[INFO] [talledLocalContainer]     at com.sun.proxy.$Proxy306.installPlugins(Unknown Source)
[INFO] [talledLocalContainer]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[INFO] [talledLocalContainer]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[INFO] [talledLocalContainer]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[INFO] [talledLocalContainer]     at java.lang.reflect.Method.invoke(Method.java:498)
[INFO] [talledLocalContainer]     at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
[INFO] [talledLocalContainer]     at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58)
[INFO] [talledLocalContainer]     at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)
[INFO] [talledLocalContainer]     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
[INFO] [talledLocalContainer]     at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
[INFO] [talledLocalContainer]     at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
[INFO] [talledLocalContainer]     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
[INFO] [talledLocalContainer]     at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56)
[INFO] [talledLocalContainer]     at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39)
[INFO] [talledLocalContainer]     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
[INFO] [talledLocalContainer]     at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)
[INFO] [talledLocalContainer]     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
[INFO] [talledLocalContainer]     at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
[INFO] [talledLocalContainer]     at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
[INFO] [talledLocalContainer]     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
[INFO] [talledLocalContainer]     at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
[INFO] [talledLocalContainer]     at com.sun.proxy.$Proxy2254.installPlugins(Unknown Source)
[INFO] [talledLocalContainer]     at com.atlassian.labs.plugins.quickreload.install.PluginInstallerMechanic.installPluginImmediately(PluginInstallerMechanic.java:185)
[INFO] [talledLocalContainer]     at com.atlassian.labs.plugins.quickreload.install.PluginInstaller.installPluginImmediately(PluginInstaller.java:318)
[INFO] [talledLocalContainer]     at com.atlassian.labs.plugins.quickreload.install.PluginInstaller.attemptInstall(PluginInstaller.java:308)
[INFO] [talledLocalContainer]     at com.atlassian.labs.plugins.quickreload.install.PluginInstaller.loopWaitingForInstallPromises(PluginInstaller.java:232)
[INFO] [talledLocalContainer]     at com.atlassian.labs.plugins.quickreload.install.PluginInstaller.access$000(PluginInstaller.java:36)
[INFO] [talledLocalContainer]     at com.atlassian.labs.plugins.quickreload.install.PluginInstaller$1.run(PluginInstaller.java:75)
[INFO] [talledLocalContainer]     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[INFO] [talledLocalContainer]     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[INFO] [talledLocalContainer]     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[INFO] [talledLocalContainer]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[INFO] [talledLocalContainer]     at java.lang.Thread.run(Thread.java:745)
[INFO] [talledLocalContainer] Caused by: com.atlassian.plugin.PluginParseException: Unable to load the module's display conditions: java.lang.ClassNotFoundException: com.atlassian.confluence.plugin.descriptor.web.conditions.SpacePermissionCondition
[INFO] [talledLocalContainer]     at com.atlassian.plugin.web.descriptors.ConditionElementParser.makeConditionImplementation(ConditionElementParser.java:95)
[INFO] [talledLocalContainer]     at com.atlassian.plugin.web.descriptors.ConditionElementParser.makeConditionImplementation(ConditionElementParser.java:29)
[INFO] [talledLocalContainer]     at com.atlassian.plugin.web.baseconditions.AbstractConditionElementParser.makeCondition(AbstractConditionElementParser.java:116)
[INFO] [talledLocalContainer]     at com.atlassian.plugin.web.descriptors.ConditionElementParser.makeCondition(ConditionElementParser.java:73)
[INFO] [talledLocalContainer]     at com.atlassian.plugin.web.descriptors.ConditionElementParser.makeCondition(ConditionElementParser.java:29)
[INFO] [talledLocalContainer]     at com.atlassian.plugin.web.baseconditions.AbstractConditionElementParser.makeConditions(AbstractConditionElementParser.java:107)
[INFO] [talledLocalContainer]     at com.atlassian.plugin.web.descriptors.ConditionElementParser.makeConditions(ConditionElementParser.java:65)
[INFO] [talledLocalContainer]     at com.atlassian.plugin.web.descriptors.ConditionElementParser.makeConditions(ConditionElementParser.java:29)
[INFO] [talledLocalContainer]     at com.atlassian.plugin.web.baseconditions.AbstractConditionElementParser.makeConditions(AbstractConditionElementParser.java:57)
[INFO] [talledLocalContainer]     at com.atlassian.plugin.web.descriptors.ConditionElementParser.makeConditions(ConditionElementParser.java:57)
[INFO] [talledLocalContainer]     at com.atlassian.plugin.web.descriptors.AbstractWebFragmentModuleDescriptor.makeConditions(AbstractWebFragmentModuleDescriptor.java:72)
[INFO] [talledLocalContainer]     at com.atlassian.plugin.web.descriptors.AbstractWebFragmentModuleDescriptor.enabled(AbstractWebFragmentModuleDescriptor.java:128)
[INFO] [talledLocalContainer]     ... 59 more
[INFO] [talledLocalContainer] Caused by: com.atlassian.plugin.web.conditions.ConditionLoadingException: java.lang.ClassNotFoundException: com.atlassian.confluence.plugin.descriptor.web.conditions.SpacePermissionCondition
[INFO] [talledLocalContainer]     at com.atlassian.confluence.plugin.descriptor.web.ConfluenceWebFragmentHelper.loadConditionClass(ConfluenceWebFragmentHelper.java:56)
[INFO] [talledLocalContainer]     at com.atlassian.confluence.plugin.descriptor.web.ConfluenceWebFragmentHelper.loadCondition(ConfluenceWebFragmentHelper.java:42)
[INFO] [talledLocalContainer]     at com.atlassian.plugin.web.descriptors.AbstractWebFragmentModuleDescriptor$1.create(AbstractWebFragmentModuleDescriptor.java:169)
[INFO] [talledLocalContainer]     at com.atlassian.plugin.web.descriptors.ConditionElementParser.makeConditionImplementation(ConditionElementParser.java:86)
[INFO] [talledLocalContainer]     ... 70 more
[INFO] [talledLocalContainer] Caused by: java.lang.ClassNotFoundException: com.atlassian.confluence.plugin.descriptor.web.conditions.SpacePermissionCondition
[INFO] [talledLocalContainer]     at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:772)
[INFO] [talledLocalContainer]     at org.apache.felix.framework.ModuleImpl.access$200(ModuleImpl.java:73)
[INFO] [talledLocalContainer]     at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1690)
[INFO] [talledLocalContainer]     at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
[INFO] [talledLocalContainer]     at org.apache.felix.framework.ModuleImpl.getClassByDelegation(ModuleImpl.java:634)
[INFO] [talledLocalContainer]     at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1594)
[INFO] [talledLocalContainer]     at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:887)
[INFO] [talledLocalContainer]     at com.atlassian.plugin.osgi.util.BundleClassLoaderAccessor.loadClass(BundleClassLoaderAccessor.java:46)
[INFO] [talledLocalContainer]     at com.atlassian.plugin.osgi.factory.OsgiPluginInstalledHelper.loadClass(OsgiPluginInstalledHelper.java:66)
[INFO] [talledLocalContainer]     at com.atlassian.plugin.osgi.factory.OsgiPlugin.loadClass(OsgiPlugin.java:208)
[INFO] [talledLocalContainer]     at com.atlassian.confluence.plugin.descriptor.web.ConfluenceWebFragmentHelper.loadConditionClass(ConfluenceWebFragmentHelper.java:52)
[INFO] [talledLocalContainer]     ... 73 more

1 answer

Well, my next try to create a space admin screen in an actual project was successful. Still don't know what went wrong the first time, but at leas my problem is gone smile

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

849 views 23 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you