无法加载 class ‘com.atlassian.confluence.themes.BasicTheme
Couldn’t load the class ‘com.atlassian.confluence.themes.BasicTheme
我是 Confluence 的新手。我使用 Eclipse (neon.3)、Confluence 6.1.1 和 Atlassian SDK 6.2.14。一切都在我的笔记本电脑上。
我正在按照这个简单的示例来测试主题插件。
编写 Confluence 主题
https://developer.atlassian.com/confdev/tutorials/writing-a-confluence-theme
但是,当 运行ning atlas-运行 时,我不断收到此错误:
[INFO] [talledLocalContainer] 2017-04-16 16:33:34,619 INFO [AtlassianEvent::CustomizableThreadFactory-1]
[plugins.synchrony.config.DefaultSynchronyConfigurationManager] retrievePublicKey [Collab editing plugin] Could not retrieve public key for real-time collaboration service at http://localhost:10123/jwt-key with exception: Connect to localhost:10123 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect
[INFO] [talledLocalContainer] 2017-04-16 16:33:39,075 ERROR [localhost-startStop-1] [atlassian.plugin.manager.DefaultPluginManager] enableConfiguredPluginModule There was an error loading the descriptor 'Simple Theme' of plugin 'com.example.plugins.tutorial.confluence.theme-tutorial'. Disabling.
[INFO] [talledLocalContainer] com.atlassian.plugin.module.ModuleClassNotFoundException: Couldn't load the class 'com.atlassian.confluence.themes.BasicTheme'. This could mean that you misspelled the name of the class (double check) or that you're using a class in your plugin that you haven't provided bundle instructions for. See https://developer.atlassian.com/x/mQAN for more details on how to fix this.
[INFO] [talledLocalContainer] at com.atlassian.plugin.module.ClassPrefixModuleFactory.getModuleClass(ClassPrefixModuleFactory.java:46)
[INFO] [talledLocalContainer] at com.atlassian.plugin.module.PrefixDelegatingModuleFactory.guessModuleClass(PrefixDelegatingModuleFactory.java:145)
[INFO] [talledLocalContainer] at com.atlassian.plugin.descriptors.AbstractModuleDescriptor.loadClass(AbstractModuleDescriptor.java:216)
[INFO] [talledLocalContainer] at com.atlassian.plugin.descriptors.AbstractModuleDescriptor.enabled(AbstractModuleDescriptor.java:461)
[INFO] [talledLocalContainer] at com.atlassian.confluence.plugin.descriptor.ThemeModuleDescriptor.enabled(ThemeModuleDescriptor.java:99)
[INFO] [talledLocalContainer] at com.atlassian.plugin.manager.DefaultPluginManager.notifyModuleEnabled(DefaultPluginManager.java:1991)
[INFO] [talledLocalContainer] at com.atlassian.plugin.manager.DefaultPluginManager.enableConfiguredPluginModule(DefaultPluginManager.java:1738)
[INFO] [talledLocalContainer] at com.atlassian.plugin.manager.DefaultPluginManager.enableConfiguredPluginModules(DefaultPluginManager.java:1715)
[INFO] [talledLocalContainer] at com.atlassian.plugin.manager.DefaultPluginManager.enableDependentPlugins(DefaultPluginManager.java:1227)
[INFO] [talledLocalContainer] at com.atlassian.plugin.manager.DefaultPluginManager.addPlugins(DefaultPluginManager.java:1188)
[INFO] [talledLocalContainer] at com.atlassian.plugin.manager.DefaultPluginManager.lateStartup(DefaultPluginManager.java:634)
[INFO] [talledLocalContainer] at com.atlassian.confluence.plugin.ConfluencePluginManager.lateStartup(ConfluencePluginManager.java:147)
[INFO] [talledLocalContainer] at com.atlassian.confluence.plugin.PluginFrameworkContextListener.contextInitialized(PluginFrameworkContextListener.java:79)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4842)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5303)
[INFO] [talledLocalContainer] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
[INFO] [talledLocalContainer] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
[INFO] [talledLocalContainer] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
[INFO] [talledLocalContainer] at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:940)
[INFO] [talledLocalContainer] at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1816)
[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: java.lang.ClassNotFoundException: com.atlassian.confluence.themes.BasicTheme not found by com.example.plugins.tutorial.confluence.theme-tutorial [250]
[INFO] [talledLocalContainer] at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532)
[INFO] [talledLocalContainer] at org.apache.felix.framework.BundleWiringImpl.access0(BundleWiringImpl.java:75)
[INFO] [talledLocalContainer] at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955)
[INFO] [talledLocalContainer] at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
[INFO] [talledLocalContainer] at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1844)
[INFO] [talledLocalContainer] at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:937)
[INFO] [talledLocalContainer] at com.atlassian.plugin.osgi.util.BundleClassLoaderAccessor.loadClass(BundleClassLoaderAccessor.java:45)
[INFO] [talledLocalContainer] at com.atlassian.plugin.osgi.factory.OsgiPluginInstalledHelper.loadClass(OsgiPluginInstalledHelper.java:56)
[INFO] [talledLocalContainer] at com.atlassian.plugin.osgi.factory.OsgiPlugin.loadClass(OsgiPlugin.java:207)
[INFO] [talledLocalContainer] at com.atlassian.plugin.module.ClassPrefixModuleFactory.getModuleClass(ClassPrefixModuleFactory.java:44)
[INFO] [talledLocalContainer]
... 25 more
在上面,你也可以看到这个。不确定是否相关。
[plugins.synchrony.config.DefaultSynchronyConfigurationManager] retrievePublicKey [Collab editing plugin] Could not retrieve public key for real-time collaboration service at http://localhost:10123/jwt-key with exception: Connect to localhost:10123 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect
我该如何解决这个问题?
有人告诉我一个技巧:
创建一个扩展 'com.atlassian.confluence.themes.BasicTheme'.
的空 class
在 pom.xml.
中通过 maven-confluence-plugin 导入更多包或许可以解决这个问题
您似乎在使用 BasicTheme class 时遇到了问题,我认为最好的答案来自 here——在您的 pom.xml
导入中包含主题目录配置:
<Import-Package>
com.atlassian.confluence.themes,
org.springframework.osgi.*;resolution:="optional",
org.eclipse.gemini.blueprint.*;resolution:="optional",
*
</Import-Package>
帮我修好了。
我是 Confluence 的新手。我使用 Eclipse (neon.3)、Confluence 6.1.1 和 Atlassian SDK 6.2.14。一切都在我的笔记本电脑上。
我正在按照这个简单的示例来测试主题插件。
编写 Confluence 主题 https://developer.atlassian.com/confdev/tutorials/writing-a-confluence-theme
但是,当 运行ning atlas-运行 时,我不断收到此错误:
[INFO] [talledLocalContainer] 2017-04-16 16:33:34,619 INFO [AtlassianEvent::CustomizableThreadFactory-1]
[plugins.synchrony.config.DefaultSynchronyConfigurationManager] retrievePublicKey [Collab editing plugin] Could not retrieve public key for real-time collaboration service at http://localhost:10123/jwt-key with exception: Connect to localhost:10123 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect
[INFO] [talledLocalContainer] 2017-04-16 16:33:39,075 ERROR [localhost-startStop-1] [atlassian.plugin.manager.DefaultPluginManager] enableConfiguredPluginModule There was an error loading the descriptor 'Simple Theme' of plugin 'com.example.plugins.tutorial.confluence.theme-tutorial'. Disabling.
[INFO] [talledLocalContainer] com.atlassian.plugin.module.ModuleClassNotFoundException: Couldn't load the class 'com.atlassian.confluence.themes.BasicTheme'. This could mean that you misspelled the name of the class (double check) or that you're using a class in your plugin that you haven't provided bundle instructions for. See https://developer.atlassian.com/x/mQAN for more details on how to fix this.
[INFO] [talledLocalContainer] at com.atlassian.plugin.module.ClassPrefixModuleFactory.getModuleClass(ClassPrefixModuleFactory.java:46)
[INFO] [talledLocalContainer] at com.atlassian.plugin.module.PrefixDelegatingModuleFactory.guessModuleClass(PrefixDelegatingModuleFactory.java:145)
[INFO] [talledLocalContainer] at com.atlassian.plugin.descriptors.AbstractModuleDescriptor.loadClass(AbstractModuleDescriptor.java:216)
[INFO] [talledLocalContainer] at com.atlassian.plugin.descriptors.AbstractModuleDescriptor.enabled(AbstractModuleDescriptor.java:461)
[INFO] [talledLocalContainer] at com.atlassian.confluence.plugin.descriptor.ThemeModuleDescriptor.enabled(ThemeModuleDescriptor.java:99)
[INFO] [talledLocalContainer] at com.atlassian.plugin.manager.DefaultPluginManager.notifyModuleEnabled(DefaultPluginManager.java:1991)
[INFO] [talledLocalContainer] at com.atlassian.plugin.manager.DefaultPluginManager.enableConfiguredPluginModule(DefaultPluginManager.java:1738)
[INFO] [talledLocalContainer] at com.atlassian.plugin.manager.DefaultPluginManager.enableConfiguredPluginModules(DefaultPluginManager.java:1715)
[INFO] [talledLocalContainer] at com.atlassian.plugin.manager.DefaultPluginManager.enableDependentPlugins(DefaultPluginManager.java:1227)
[INFO] [talledLocalContainer] at com.atlassian.plugin.manager.DefaultPluginManager.addPlugins(DefaultPluginManager.java:1188)
[INFO] [talledLocalContainer] at com.atlassian.plugin.manager.DefaultPluginManager.lateStartup(DefaultPluginManager.java:634)
[INFO] [talledLocalContainer] at com.atlassian.confluence.plugin.ConfluencePluginManager.lateStartup(ConfluencePluginManager.java:147)
[INFO] [talledLocalContainer] at com.atlassian.confluence.plugin.PluginFrameworkContextListener.contextInitialized(PluginFrameworkContextListener.java:79)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4842)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5303)
[INFO] [talledLocalContainer] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
[INFO] [talledLocalContainer] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
[INFO] [talledLocalContainer] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
[INFO] [talledLocalContainer] at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:940)
[INFO] [talledLocalContainer] at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1816)
[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: java.lang.ClassNotFoundException: com.atlassian.confluence.themes.BasicTheme not found by com.example.plugins.tutorial.confluence.theme-tutorial [250]
[INFO] [talledLocalContainer] at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532)
[INFO] [talledLocalContainer] at org.apache.felix.framework.BundleWiringImpl.access0(BundleWiringImpl.java:75)
[INFO] [talledLocalContainer] at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955)
[INFO] [talledLocalContainer] at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
[INFO] [talledLocalContainer] at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1844)
[INFO] [talledLocalContainer] at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:937)
[INFO] [talledLocalContainer] at com.atlassian.plugin.osgi.util.BundleClassLoaderAccessor.loadClass(BundleClassLoaderAccessor.java:45)
[INFO] [talledLocalContainer] at com.atlassian.plugin.osgi.factory.OsgiPluginInstalledHelper.loadClass(OsgiPluginInstalledHelper.java:56)
[INFO] [talledLocalContainer] at com.atlassian.plugin.osgi.factory.OsgiPlugin.loadClass(OsgiPlugin.java:207)
[INFO] [talledLocalContainer] at com.atlassian.plugin.module.ClassPrefixModuleFactory.getModuleClass(ClassPrefixModuleFactory.java:44)
[INFO] [talledLocalContainer]
... 25 more
在上面,你也可以看到这个。不确定是否相关。
[plugins.synchrony.config.DefaultSynchronyConfigurationManager] retrievePublicKey [Collab editing plugin] Could not retrieve public key for real-time collaboration service at http://localhost:10123/jwt-key with exception: Connect to localhost:10123 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect
我该如何解决这个问题?
有人告诉我一个技巧:
创建一个扩展 'com.atlassian.confluence.themes.BasicTheme'.
的空 class在 pom.xml.
中通过 maven-confluence-plugin 导入更多包或许可以解决这个问题您似乎在使用 BasicTheme class 时遇到了问题,我认为最好的答案来自 here——在您的 pom.xml
导入中包含主题目录配置:
<Import-Package>
com.atlassian.confluence.themes,
org.springframework.osgi.*;resolution:="optional",
org.eclipse.gemini.blueprint.*;resolution:="optional",
*
</Import-Package>
帮我修好了。