我在一个Eclipse 4 RCP项目中工作,其中包含一个插件包和一个用于单元测试的包片段。目标平台使用Eclipse目标定义(. target文件)定义。Maven with Tycho用于在Eclipse之外构建项目(清单优先,使用.target文件定义目标平台)。
现在我想将 Mockito 包含在目标平台中进行模拟。Eclipse Orbit 提供了一个 org.mockito (1.9.5) 捆绑包。它取决于org.hamcrest(也可以在Orbit p2网站上找到),所以我也将其添加到目标定义中。当我从目标文件设置 Eclipse 的目标平台时,“目标平台状态”视图中会显示以下内容:
尽管org.hamcrest.library和org.hamcrest.core都存在(两个包都导出org.hamcrest 1.3.0包),但org.mockito包声称缺少org.hamcrest包。
尽管如此,我还是将org. mockito和org.hamcrest.Library添加到MANIFEST.MF中测试插件片段的依赖项中。
Require-Bundle: org.junit;bundle-version="4.11.0",
org.hamcrest.library;bundle-version="1.3.0",
org.mockito;bundle-version="1.9.5"
该片段似乎正在编译,但测试无法运行。tycho surefire插件报告:
An error has occurred. See the log file [...]\target\work\configuration\1405514016520.log.
日志文件显示:
!SESSION 2014-07-16 14:33:34.053 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.7.0_55
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE
Framework arguments: -application org.eclipse.tycho.surefire.osgibooter.headlesstest -testproperties F:\Users\Jakob\Documents\Bachelorprojekt\Code\myplugin.tests\target\surefire.properties
Command-line arguments: -data F:\Users\Jakob\Documents\Bachelorprojekt\Code\myplugin.tests\target\work\data -application org.eclipse.tycho.surefire.osgibooter.headlesstest -testproperties F:\Users\Jakob\Documents\Bachelorprojekt\Code\myplugin.tests\target\surefire.properties
!ENTRY org.eclipse.osgi 2 0 2014-07-16 14:33:40.508
!MESSAGE One or more bundles are not resolved because the following root constraints are not resolved:
!SUBENTRY 1 org.eclipse.osgi 2 0 2014-07-16 14:33:40.508
!MESSAGE Bundle initial@reference:file:../../../../../../.m2/repository/p2/osgi/bundle/org.eclipse.swt.gtk.linux.x86_64/3.102.1.v20130827-2048/org.eclipse.swt.gtk.linux.x86_64-3.102.1.v20130827-2048.jar was not resolved.
!SUBENTRY 2 org.eclipse.swt.gtk.linux.x86_64 2 0 2014-07-16 14:33:40.508
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(|(&(osgi.ee=CDC/Foundation)(version=1.0))(&(osgi.ee=JavaSE)(version=1.3)))".
!SUBENTRY 1 org.eclipse.osgi 2 0 2014-07-16 14:33:40.508
!MESSAGE Bundle initial@reference:file:../../../../../../.m2/repository/p2/osgi/bundle/org.eclipse.swt.cocoa.macosx.x86_64/3.102.1.v20130827-2048/org.eclipse.swt.cocoa.macosx.x86_64-3.102.1.v20130827-2048.jar was not resolved.
!SUBENTRY 2 org.eclipse.swt.cocoa.macosx.x86_64 2 0 2014-07-16 14:33:40.508
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(|(&(osgi.ee=CDC/Foundation)(version=1.0))(&(osgi.ee=JavaSE)(version=1.3)))".
!SUBENTRY 1 org.eclipse.osgi 2 0 2014-07-16 14:33:40.508
!MESSAGE Bundle initial@reference:file:../../../../../../.m2/repository/p2/osgi/bundle/org.mockito/1.9.5.v201311280930/org.mockito-1.9.5.v201311280930.jar was not resolved.
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.509
!MESSAGE Missing imported package org.hamcrest_[1.0.0,2.0.0).
!ENTRY org.eclipse.osgi 2 0 2014-07-16 14:33:40.547
!MESSAGE The following is a complete list of bundles which are not resolved, see the prior log entry for the root cause if it exists:
!SUBENTRY 1 org.eclipse.osgi 2 0 2014-07-16 14:33:40.547
!MESSAGE Bundle myplugin.tests_0.0.1.qualifier [2] was not resolved.
!SUBENTRY 2 myplugin.tests 2 0 2014-07-16 14:33:40.547
!MESSAGE Missing required bundle org.mockito_1.9.5.
!SUBENTRY 1 org.eclipse.osgi 2 0 2014-07-16 14:33:40.547
!MESSAGE Bundle org.mockito_1.9.5.v201311280930 [5] was not resolved.
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.547
!MESSAGE Missing optionally imported package COM.jrockit.reflect_0.0.0.
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.547
!MESSAGE Missing optionally imported package jrockit.vm_0.0.0.
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.547
!MESSAGE Missing imported package org.hamcrest_[1.0.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.547
!MESSAGE Missing imported package org.mockito_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.547
!MESSAGE Missing imported package org.mockito.configuration_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.547
!MESSAGE Missing imported package org.mockito.exceptions_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.547
!MESSAGE Missing imported package org.mockito.exceptions.base_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.547
!MESSAGE Missing imported package org.mockito.exceptions.misusing_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.547
!MESSAGE Missing imported package org.mockito.exceptions.stacktrace_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.547
!MESSAGE Missing imported package org.mockito.exceptions.verification_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.548
!MESSAGE Missing imported package org.mockito.exceptions.verification.junit_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.548
!MESSAGE Missing imported package org.mockito.invocation_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.548
!MESSAGE Missing imported package org.mockito.listeners_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.548
!MESSAGE Missing imported package org.mockito.mock_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.548
!MESSAGE Missing imported package org.mockito.plugins_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.548
!MESSAGE Missing imported package org.mockito.runners_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.548
!MESSAGE Missing imported package org.mockito.stubbing_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.548
!MESSAGE Missing imported package org.mockito.stubbing.answers_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.548
!MESSAGE Missing imported package org.mockito.verification_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.548
!MESSAGE Missing optionally imported package sun.reflect_0.0.0.
!SUBENTRY 1 org.eclipse.osgi 2 0 2014-07-16 14:33:40.548
!MESSAGE Bundle org.eclipse.swt.gtk.linux.x86_64_3.102.1.v20130827-2048 [147] was not resolved.
!SUBENTRY 2 org.eclipse.swt.gtk.linux.x86_64 2 0 2014-07-16 14:33:40.548
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(|(&(osgi.ee=CDC/Foundation)(version=1.0))(&(osgi.ee=JavaSE)(version=1.3)))".
!SUBENTRY 1 org.eclipse.osgi 2 0 2014-07-16 14:33:40.548
!MESSAGE Bundle org.eclipse.swt.cocoa.macosx.x86_64_3.102.1.v20130827-2048 [148] was not resolved.
!SUBENTRY 2 org.eclipse.swt.cocoa.macosx.x86_64 2 0 2014-07-16 14:33:40.548
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(|(&(osgi.ee=CDC/Foundation)(version=1.0))(&(osgi.ee=JavaSE)(version=1.3)))".
!ENTRY org.eclipse.osgi 2 0 2014-07-16 14:33:40.804
!MESSAGE One or more bundles are not resolved because the following root constraints are not resolved:
!SUBENTRY 1 org.eclipse.osgi 2 0 2014-07-16 14:33:40.804
!MESSAGE Bundle initial@reference:file:../../../../../../.m2/repository/p2/osgi/bundle/org.eclipse.swt.gtk.linux.x86_64/3.102.1.v20130827-2048/org.eclipse.swt.gtk.linux.x86_64-3.102.1.v20130827-2048.jar was not resolved.
!SUBENTRY 2 org.eclipse.swt.gtk.linux.x86_64 2 0 2014-07-16 14:33:40.804
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(|(&(osgi.ee=CDC/Foundation)(version=1.0))(&(osgi.ee=JavaSE)(version=1.3)))".
!SUBENTRY 1 org.eclipse.osgi 2 0 2014-07-16 14:33:40.804
!MESSAGE Bundle initial@reference:file:../../../../../../.m2/repository/p2/osgi/bundle/org.eclipse.swt.cocoa.macosx.x86_64/3.102.1.v20130827-2048/org.eclipse.swt.cocoa.macosx.x86_64-3.102.1.v20130827-2048.jar was not resolved.
!SUBENTRY 2 org.eclipse.swt.cocoa.macosx.x86_64 2 0 2014-07-16 14:33:40.804
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(|(&(osgi.ee=CDC/Foundation)(version=1.0))(&(osgi.ee=JavaSE)(version=1.3)))".
!SUBENTRY 1 org.eclipse.osgi 2 0 2014-07-16 14:33:40.804
!MESSAGE Bundle initial@reference:file:../../../../../../.m2/repository/p2/osgi/bundle/org.mockito/1.9.5.v201311280930/org.mockito-1.9.5.v201311280930.jar was not resolved.
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.804
!MESSAGE Missing imported package org.hamcrest_[1.0.0,2.0.0).
!ENTRY org.eclipse.osgi 2 0 2014-07-16 14:33:40.833
!MESSAGE The following is a complete list of bundles which are not resolved, see the prior log entry for the root cause if it exists:
!SUBENTRY 1 org.eclipse.osgi 2 0 2014-07-16 14:33:40.833
!MESSAGE Bundle myplugin.tests_0.0.1.qualifier [2] was not resolved.
!SUBENTRY 2 myplugin.tests 2 0 2014-07-16 14:33:40.833
!MESSAGE Missing required bundle org.mockito_1.9.5.
!SUBENTRY 1 org.eclipse.osgi 2 0 2014-07-16 14:33:40.833
!MESSAGE Bundle org.mockito_1.9.5.v201311280930 [5] was not resolved.
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.833
!MESSAGE Missing optionally imported package COM.jrockit.reflect_0.0.0.
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.833
!MESSAGE Missing optionally imported package jrockit.vm_0.0.0.
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.833
!MESSAGE Missing imported package org.hamcrest_[1.0.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.834
!MESSAGE Missing imported package org.mockito_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.834
!MESSAGE Missing imported package org.mockito.configuration_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.834
!MESSAGE Missing imported package org.mockito.exceptions_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.834
!MESSAGE Missing imported package org.mockito.exceptions.base_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.834
!MESSAGE Missing imported package org.mockito.exceptions.misusing_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.834
!MESSAGE Missing imported package org.mockito.exceptions.stacktrace_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.834
!MESSAGE Missing imported package org.mockito.exceptions.verification_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.834
!MESSAGE Missing imported package org.mockito.exceptions.verification.junit_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.834
!MESSAGE Missing imported package org.mockito.invocation_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.834
!MESSAGE Missing imported package org.mockito.listeners_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.835
!MESSAGE Missing imported package org.mockito.mock_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.835
!MESSAGE Missing imported package org.mockito.plugins_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.835
!MESSAGE Missing imported package org.mockito.runners_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.835
!MESSAGE Missing imported package org.mockito.stubbing_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.835
!MESSAGE Missing imported package org.mockito.stubbing.answers_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.835
!MESSAGE Missing imported package org.mockito.verification_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.835
!MESSAGE Missing optionally imported package sun.reflect_0.0.0.
!SUBENTRY 1 org.eclipse.osgi 2 0 2014-07-16 14:33:40.835
!MESSAGE Bundle org.eclipse.swt.gtk.linux.x86_64_3.102.1.v20130827-2048 [147] was not resolved.
!SUBENTRY 2 org.eclipse.swt.gtk.linux.x86_64 2 0 2014-07-16 14:33:40.835
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(|(&(osgi.ee=CDC/Foundation)(version=1.0))(&(osgi.ee=JavaSE)(version=1.3)))".
!SUBENTRY 1 org.eclipse.osgi 2 0 2014-07-16 14:33:40.835
!MESSAGE Bundle org.eclipse.swt.cocoa.macosx.x86_64_3.102.1.v20130827-2048 [148] was not resolved.
!SUBENTRY 2 org.eclipse.swt.cocoa.macosx.x86_64 2 0 2014-07-16 14:33:40.835
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(|(&(osgi.ee=CDC/Foundation)(version=1.0))(&(osgi.ee=JavaSE)(version=1.3)))".
!ENTRY org.eclipse.osgi 4 0 2014-07-16 14:33:40.857
!MESSAGE Application error
!STACK 1
java.lang.RuntimeException: Bundle myplugin.tests is not found
at org.eclipse.tycho.surefire.osgibooter.OsgiSurefireBooter.getBundleClassLoader(OsgiSurefireBooter.java:149)
at org.eclipse.tycho.surefire.osgibooter.OsgiSurefireBooter.run(OsgiSurefireBooter.java:67)
at org.eclipse.tycho.surefire.osgibooter.HeadlessTestApplication.run(HeadlessTestApplication.java:21)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:587)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
从Eclipse PDE启动插件测试会有效地产生相同的与mockito相关的错误(缺少与SWT相关的错误,但有其他捆绑包解析错误,因为我通常不从Eclipse运行这些测试,也没有从启动配置中消除一些冲突的捆绑包)。
即使软件包肯定是从目标平台的另一个必需的包导出的,丢失导入的软件包错误的可能原因是什么?我如何修复这个设置?
我遇到了同样的问题,第谷无法正确解决哈姆克雷斯特。在我的项目中,我使用了自己的目标平台(只是Luna SDK中的几个插件)。对于单元测试,我从SDK中获取了JUnit捆绑包。当我添加 Mockito 库时,我遇到了上述相同的问题。起初,我还尝试用具体版本重新包装Mockito捆绑包。但我无法修复它。然后我找到了你的问题和加博尔的答案,终于解决了我的问题!
起初,我按照说明添加了更新站点,并选择了所需的特性(Powermock with Mockito and JUnit)。然后我遇到了与Objenisis bundle的未解决的依赖关系。我不知道这是我的具体问题,因为我用几个包制作了自己的目标平台,还是Objenisis只是特性中缺少的?!
所以我将所需的包(包括Objenisis)从powermock-osgi更新站点复制到我自己的目标平台,现在它像预期的那样工作了!
你的问题的根本原因是org.hamcrest是一个拆分包。tycho或eclipse中显然有一个错误,这使得它无法工作。有关详细信息,请参见以下内容:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=334540·https://bugs.eclipse.org/bugs/show_bug.cgi?id=403196
请尝试一下我重新打包的Hamcrest和Mockito版本(Powermock-OSGI)。在我的版本中,Mockito清单指定,Mockito只需要org.hamcrest
包的“核心”部分:
动态观察版本:
Import-Package: COM.jrockit.reflect;resolution:=optional,jrockit.vm;re
solution:=optional,junit.framework;resolution:=optional,org.apache.to
ols.ant;resolution:=optional,org.apache.tools.ant.types;resolution:=o
ptional,org.hamcrest;version="[1.0,2.0)"
我的版本:
Import-Package: org.hamcrest;core=split,junit.framework,org.junit,org.ju
nit.internal.runners,org.junit.runner,org.junit.runner.manipulation,org
.junit.runner.notification,org.junit.runners,org.junit.runners.model,or
g.objenesis;version="[2.1,3)"
更新站点可在http://power mock-OSGi . Google code . com/SVN/updateSite/1 . 5 . 4 . 1/找到
项目主页:https://code.google.com/p/powermock-osgi/
在访问我的更新站点之前,您可能需要删除 Eclipse 和第谷捆绑池,如 Powermock-OSGI 站点:首次使用中所述
Tycho 和 Eclipse PDE 根据符号名称和版本缓存捆绑包。因此,如果用户过去任何时候已经拥有 Junit 的 4.11 版本,我们被黑客入侵的 powermock 版本将不会被采用。
因此,在第一次使用Eclipse之前,用户必须删除. metadata.plugins\org.eclipse.pde.core.bundle_pool和.metadata.plugins\org.eclipse.pde.core.external_libraries特定Eclipse安装的所有工作区(通过跨工作区查找捆绑包)。可以肯定的是,当您在eclipse中运行单元测试时,启动配置中的插件选项卡确实包含Powermock功能的JUnit、Mockito和Hamcrest插件,而不是其他版本。在第一次使用Tycho之前,请从maven本地存储库中删除.meta.cache和p2文件夹
如果有效,请给我反馈。
最近,我在Tycho构建和从PDE启动运行时Eclipse时都遇到了同样的问题:
!ENTRY org.mockito 4 0 2018-03-14 11:53:00.671
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.mockito [6]
Unresolved requirement: Import-Package: COM.jrockit.reflect; resolution:="optional"
Unresolved requirement: Import-Package: jrockit.vm; resolution:="optional"
Unresolved requirement: Import-Package: org.apache.tools.ant; resolution:="optional"
Unresolved requirement: Import-Package: org.apache.tools.ant.types; resolution:="optional"
Unresolved requirement: Import-Package: org.hamcrest; version="[1.0.0,2.0.0)"
在这两种情况下,我都能够解决这个问题,而无需重新包装的 Mockito。
org. hamcrest
显式添加到目标平台,而不仅仅是org.hamcrest.core
:相应的<代码>。目标代码:
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.hamcrest" version="1.1.0.v20090501071000"/>
<unit id="org.mockito" version="1.9.5.v201605172210"/>
<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20180206163158/repository/"/>
</location>
>
在《第谷》中,通过做同样的事情:
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho-version}</version>
<configuration>
<dependency-resolution>
<extraRequirements>
<!-- Workaround for an issue with mockito depending on hamcrest -->
<requirement>
<type>eclipse-plugin</type>
<id>org.hamcrest</id>
<versionRange>0.0.0</versionRange>
</requirement>
</extraRequirements>
</dependency-resolution>
</configuration>
</plugin>
问题内容: 命令: 异常(来自日志文件) 但是以下jar可用。 关于上述错误有什么建议吗? 问题答案: 您需要安装几个捆绑软件才能使用控制台,如果仅使用Equinox启动,则您将不会获得这些捆绑软件。 使此工作最快的方法是创建一个具有以下内容的文件: 注意, 您将不得不根据实际拥有的版本检查这些捆绑软件的版本号。我使用SDK-4.2M6进行了尝试,其中某些可能已在RC3中更改。
我是OSGi的新手。我正在使用Apache Felix。我已经构建了一个捆绑包,并且具有依赖性。当我尝试使用启动它会给我这个错误。 org . OSGi . framework . bundle exception:无法解析lk . ucsc . research . belly runner[20](R 20.0):缺失需求[lk . ucsc . research . belly runner
我知道这个答案:Pax考试:提供具有所有依赖项的捆绑包,但当我必须包含作为我项目外部捆绑包一部分的捆绑包时,感觉我做错了什么。 这是我得到的错误: 下面是我的pax考试的配置代码: 所以我的问题是:为什么我会遇到关于未解决约束的错误,我是否必须包括外部捆绑包,以及我需要做什么才能让我的测试运行?
以前部署的JDOM的OSGi包究竟是如何解决这些相同的依赖关系的?它们从来没有在捆绑进口包中列出?此外,如果我试图将这些作为项目的依赖项包含并嵌入它们,只会加剧问题。救命啊!
我正在开发一个应用程序,它利用Hibernate框架将OSGi转换为更具体的Equinox Server。因此,我生成了库包和客户端插件,我在其中利用前面提到的库包对业务逻辑和数据库之间的通信进行编程。在我的项目中,我有以下包结构: 在管理器包中,我有那些负责将客户端与数据库和映射进行通信的类,其中一个包含配置文件和Hibernate映射文件。然而,当我部署捆绑包时,引用运行良好,但是我得到一个异
我得到一个例外: 无法找到模板"" 其他类似的问题没有帮助;奇怪的是,它工作得很好,然后突然开始给我这个例外。 作曲家: 自动路由生成:单个RESTful控制器(用于简单资源) 配置: 路由: 控制器:
找不到MessageSource的ResourceBundle[classpath:/org/springframework/security/messages]源:找不到基本名称的bundle classpath:/org/springframework/security/messages,locale ru我找不到任何在Java中设置国际化的解决方案 我的代码是这样的
目前,要为Pax考试设置配置,我发现需要包含所有依赖项。比如说 但是由于依赖于,这感觉像是重复的信息。Pax Exam是否可能在不明确添加的情况下发现需要?