我是Confluence的新手。我使用Eclipse(neon.3),Confluence 6.1.1和Atlassian SDK 6.2.14。一切都在我的笔记本电脑上。
我正在按照这个简单的例子来测试一个主题插件。
编写一个Confluence主题 https://developer.atlassian.com/confdev/tutorials/writing-a-confluence-theme
然而,当运行atlas-run时,我不断收到此错误:
[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.access$400(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
如何解决此问题?
答案 0 :(得分:0)
有人告诉我一招:
创建一个扩展'com.atlassian.confluence.themes.BasicTheme'的空类。
可以通过pom.xml中的maven-confluence-plugin导入更多软件包来解决此问题。
答案 1 :(得分:0)
看起来你在使用BasicTheme课程时遇到了麻烦,我认为最好的答案来自here - 包括pom.xml
导入配置中的主题目录:
<Import-Package>
com.atlassian.confluence.themes,
org.springframework.osgi.*;resolution:="optional",
org.eclipse.gemini.blueprint.*;resolution:="optional",
*
</Import-Package>
为我修好了。